Skip to content

Conversation

@eerovaher
Copy link
Contributor

I am adding basic configuration for pre-commit. It is a tool for managing and running code quality and style checks that is recommended by the Scientific Python Development Guide and astropy has been using it for quite some time. I am opening the PR with only a few checks, but more can be added either in this PR or in follow-ups. My end goal is to completely replace the codestyle tox environment with pre-commit.

pre-commit can run in CI, but I don't have permissions to set that up here. See the Scientific Python Development Guide and the references within.

@@ -0,0 +1,18 @@
ci:
autofix_prs: false
autoupdate_schedule: 'monthly'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In astropy we update monthly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given this repo's activity I would go with quarterly instead.

rev: v6.0.0
hooks:
- id: check-added-large-files
args: ["--enforce-all", "--maxkb=100"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default file size limit is 500 kB, but here 100 kB seems to be plenty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants