cookiecutter-science-project icon indicating copy to clipboard operation
cookiecutter-science-project copied to clipboard

Added pre-commit hooks (general pre-commit hooks, black, flake8, inte…

Open nenb opened this issue 3 years ago • 3 comments

…rrogate, isort) for both git commit and git push. Tried to add sensible default options in setup.cfg and pyproject.toml . Made some cosmetic changes to several other files (e.g. release.yaml) so that pre-commit checks are satisfied. Also introduced some basic documentation in some files (e.g. init.py) so that interrogate check is satisfied. Made 'linting' CI workflow compulsory.

nenb avatar Aug 06 '21 17:08 nenb

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

At the moment, I have the pre-commit hooks as mandatory for each commit and push. Perhaps this needs to be changed?

Most of the changes are cosmetic changes, so that pre-commit doesn't produce a million errors the first time a user decides to use pre-commit. I just did a pre-commit run --all-files to the original repository to produce this changes.

nenb avatar Aug 06 '21 17:08 nenb

Dear @nenb, thank you so much for all this work, and my sincere apologies for not responding earlier.

At the moment, I have the pre-commit hooks as mandatory for each commit and push. Perhaps this needs to be changed?

I think I would prefer to be able to have these checks on an 'opt-in' basis indeed. Ideally I want this cookiecutter to only provide the basic file structure and then have all other features be an easy 'opt-in' with explanations.

Before I review this, I think it would be nice if we have a way to automatically build a new 'demo' repo from this cookiecutter as a part of the CI. We could force push the repo to different branches to check on all the different feature packs? What do you think?

jbusecke avatar Dec 07 '21 17:12 jbusecke