Ouranosinc / PAVICS-landing

The landing page serving as the entrance to PAVICS
1 stars 0 forks source link

Add precommit formatters #39

Closed Zeitsperre closed 2 years ago

Zeitsperre commented 2 years ago

This PR adds a lightweight pre-commit configuration to clean up the code, imports, and conventions automatically in the notebooks and scripts. No interventions required, just pre-commit install at the top-level, and the rest is automated.

review-notebook-app[bot] commented 2 years ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Zeitsperre commented 2 years ago

LGTM. As a committer to this repo, how does my workflow changes?

In the conda environment you use to commit changes:

$ conda install -c conda-forge pre_commit
# alternatively: $ pip install pre-commit 
$ pre-commit install

Everything is automated from there. If a check fails, it will try to perform the needed fixes, so you can commit again. If something is code breaking (e.g. bad syntax) it will tell you where to intervene.