shirtsgroup / physical_validation

Physical validation of molecular simulations
https://physical-validation.readthedocs.io
MIT License
55 stars 19 forks source link

Add pre-commit #209

Closed mattwthompson closed 2 years ago

mattwthompson commented 2 years ago

A bot from https://pre-commit.ci should run in and automatically run black with its most recent version

mattwthompson commented 2 years ago

I was wrong, somebody with more permissions in the organization would need to allow the App to access this repo: https://github.com/marketplace/pre-commit-ci

codecov[bot] commented 2 years ago

Codecov Report

Merging #209 (0953684) into master (4f33372) will not change coverage. The diff coverage is 100.00%.

ptmerz commented 2 years ago

I was wrong, somebody with more permissions in the organization would need to allow the App to access this repo: https://github.com/marketplace/pre-commit-ci

I think only @mrshirts can do that!

mrshirts commented 2 years ago

Did I manage to activate it correctly?

mattwthompson commented 2 years ago

Probably - although I think it's likely the bot won't run until the config file exists on the default branch (i.e. until this is merged). So I didn't give sufficient instructions when asking for help, sorry!

@ptmerz would you consider reviewing this as-is? The changes to the source code are only because of black's recent update. You're probably familiar with git hooks but you could verifiy things locally with i.e.

$ git checkout upstream/add-pre-commit
$ pip install pre-commit
$ pre-commit install
$ pre-commit run --all-files

Depending on interest and effort there's plenty more cool stuff that can be done. But my goal here was only to update with the new version of black and set up automation so that a bot would do it the next time there's an update.