Precommit config #4
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve Development Workflow and Packaging Setup
PR Description:
This PR introduces several improvements to our repository to enhance code quality, streamline development, and improve our PyPI packaging:
Pre-commit Hooks and GitHub Actions Workflow:
Added a new
.pre-commit-config.yamlfile to enforce code quality standards using popular hooks such as Black, isort, flake8, and additional hooks for cleaning up trailing whitespace, fixing end-of-file issues, and validating YAML files.Created a GitHub Actions workflow at
.github/workflows/pre-commit.ymlthat runs pre-commit checks on every push or pull request to themainbranch. This ensures that our code consistently adheres to style and linting rules before it is merged.Python Code Syntax Update (very naive):
We discussed and integrated tools like
pyupgrade(or2to3) to facilitate the transition from Python 2 syntax to Python 3 syntax in way too meetings. These tools help automatically convert legacy syntax (e.g., Python 2printstatements) to Python 3, ensuring our codebase is fully compatible with modern Python versions.Clarified the usage of Black for automatically rewriting and formatting our source code. We now have hopefully will have a consistent code style.
These changes should make the development process smoother and ensure our package maintains a high standard of code quality and packaging metadata.