add pre-commit workflow for checks+isort and add to CI#708
Conversation
|
Additional pre-commit hooks: https://github.com/pre-commit/pre-commit-hooks I was trying to figure out if it's useful including: |
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
I've added pre-commit to the POSYDON repo and run it on all the files in the repository to clean them up. Once accepted, this will run I checked on an online rST text editor that when there's no whitespace at the end of a line, it automatically adds a space in the rendered file. Example: https://rsted.info.ucl.ac.be/?theme=basic&n=299bcfb0feb2e1f9cf343aaae14ab248 |
Testing out a pre-commit for basic checks and isort to fix imports.
This is opt-in and not on by default:
Developers can do
pip install '.[dev]'to install the required packages.Then with
pre-commit install, you can initializepre-committo run before every commit you do.This checks the following:
It's only been ran on the files in this PR, not on the general codebase.
We can include
pre-commit.ciinto the repository if we want automatic fixes on PRs.