neuroinformatics-unit / python-cookiecutter

Utility to create a basic Python project structure with tests, CI etc.
BSD 3-Clause "New" or "Revised" License
24 stars 3 forks source link

Testing cookiecutter #21

Closed JoeZiminski closed 2 years ago

JoeZiminski commented 2 years ago

It would be nice to test certain aspects of the cookiecutter (e.g. if pass linting #19, #20). I started this in a team coding a while back but didn't look at it since. I'm not sure how useful it is, but we could use this PR as a basis for discussing tests of python-cookiecutter.

Currently it installs cookiecutter (using a config file rather than command line), checks the pyproject.toml values from the created project are as expected and installs with pip install -e . and checks it has installed correctly. Its quite rough ATM lots of things not optimal.

It would also be useful to pip install . and check it is installed to site packages, and maybe git init, and run some linting checks or others.

adamltyson commented 2 years ago

This is great thanks @JoeZiminski! I'll have a go at building this up further.

adamltyson commented 2 years ago

I've generalised this, so it should run on any machine, and added a workflow to run this via GH actions.

adamltyson commented 2 years ago

I haven't changed the tests much, so we may be able to streamline these a bit. pre-commit should also be run on the built package.

adamltyson commented 2 years ago

I think it's probably best to get this initial version merged, then work on linting etc later, what do you think @JoeZiminski?

Requesting review from @niksirbi / @lauraporta

niksirbi commented 2 years ago

Looks good to me. Great job with the tests @JoeZiminski. I would also say let's merge this and add more testing functionalities later

JoeZiminski commented 2 years ago

Agree looks good to me and can implement linting etc later