-
Notifications
You must be signed in to change notification settings - Fork 1
Implement CI pipeline pre-commit hooks #45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ine-pre-commit-hooks
- Introduced a .pre-commi-config.yaml to enforce standards when commiting to this repository. - Includes Black, pre-commit-hooks, flake8 and isort. - Applied 'pre-commit run --all-files', this automatically formatted a majority of the code, some manual intervention was needed. - Addressed issue #41 with ensuring any instances of numpy is refered to as np. and not .nmp
- Updated CI.yaml to allow Github Actions to run: - tests - docs - pre-commit - Moved the tests directory to the root of the repository, mentioned in issue #40
jimboid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of things to check.
_version.py - do we actually need this since we are now moving away from setuptools approach in setup.py. I think this might have been some code form a cookie cutter.
There are a few stray comments using "#" with nothing there after it so these can be deleted.
There are a number of missing docstrings on methods, can you record somewhere that we need to get Sarah to search for """ """ and add the missing docstrings, if we need to seek help from others then we should.
Can you also make note of there are many comments at the end of methods that simply say end of method. This is not a python pattern of coding, these should be removed in a future PR.
The only thing I would really like to see altered before merge is the _version.py removed if safe. If it is not safe then please comment back and I will approve for merge.
- Removed CodeEntropy/_version.py as this is no longer needed - Remove stray comment markers in CodeEntropy/PoseidonHelper.py - Added in missing docstring for CodeEntropy/poseidon/analysis/helper.py - Removed brackets in comments for tests/test_EntropyFunctions/test_frequency_calculation.py
jimboid
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good to merge. Thanks a lot Harry!
Summary
This PR implements a CI pipeline and pre-commit hooks to maintain high coding standards when pushing to the repository.
Changes
Pre-commit hooks :
.pre-commit-config.yamlto enforce standards when commiting to this repository.CI Pipeline :
CI.yamlto allow Github Actions to run: tests, docs and pre-commitPull Request Template :
Numpy naming convention:
Impact