Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explore integrating pre-commit into repo #64

Closed
ntjohnson1 opened this issue Feb 25, 2023 · 3 comments
Closed

Explore integrating pre-commit into repo #64

ntjohnson1 opened this issue Feb 25, 2023 · 3 comments
Assignees
Labels
dev Making dev life better doing Actively being worked on
Milestone

Comments

@ntjohnson1
Copy link
Collaborator

For things like linting and formatting pre-commit hooks might be easier. Need to explore the ease of opting in or opting out of pre-commit setup and if that requires additional instructions.

@dmdunla
Copy link
Collaborator

dmdunla commented Feb 25, 2023

For the pre-community hooks, I imagine this is before each commit as setup on the dev side. There are also GitHub actions, and we could create one that verifies all the formatting and complains when it fails. That would require that devs fix it before they finalize their PRs. And all of the mechanics of verification happen on GitHub rather than be each dev.

@ntjohnson1
Copy link
Collaborator Author

ntjohnson1 commented Feb 25, 2023

Yes this would simplify (hopefully) the dev side to make sure things are compliant at least for fixes that are automated (black/isort). I already added an update to the github actions in #60 to verify black/isort now that I've made the project compliant. I additionally baked the checks only piece into our pytest (which I documented in the contributors guide). IMO having a few ways to hit the same end goal isn't too complicated in this case and gives flexibility in workflow. Happy to iterate if instructions are unclear or there is a cleaner way you want to handle it.

I just posted a duplicate note on the black/isort ticket referring to delaying the pre-commit to here since I didn't have time to verify the opt-in/opt-out mechanism. Adding the config is fairly straightforward. Here are isorts instructions

@dmdunla dmdunla added this to the v2.0 milestone Mar 16, 2023
@dmdunla dmdunla added the dev Making dev life better label Mar 16, 2023
@ntjohnson1 ntjohnson1 added the doing Actively being worked on label Mar 20, 2023
@ntjohnson1 ntjohnson1 mentioned this issue Apr 5, 2023
@ntjohnson1
Copy link
Collaborator Author

PR added preliminary opt-in precommit support. Further extension or instructions can be follow up as needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev Making dev life better doing Actively being worked on
Projects
None yet
Development

No branches or pull requests

2 participants