-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pre-commit hook for pipeline checks #59
Comments
Hi @lorenzwalthert |
Not really, but https://github.com/pre-commit/pre-commit-hooks contains hooks with good practice. Here's how I'd imagine it to work for your package, with Expose a CLI
Then, we'd call
Define the pre-commit logic Now that we have a command line utility to access the functionality from this package, we need to connect it to pre-commit.
What's ran effectively then is The hooks will then always run when you change a python file, not just the pipeline definition, since the pipeline definition itself could depend on other modules and you want to ensure changes there don't break your pipeline. If all dependencies are contained in the file that defines the pipeline, you could also implement a different logic. As long as the validations don't take very long, it should be fine to run that hook on each commit. |
Thanks a lot for this writeup! Appreciate it, @lorenzwalthert ! I'm having a bit of a busy week, but plan to get back in detail next week. |
Hi @lorenzwalthert , |
Hi @lorenzwalthert, |
Sorry for the delay @stiebels. I hope I can find time next week to look at the PR. |
I see you are already using pre-commit hooks in this repo, but you could also expose one. I could help with that (at least conceptually), I have contributed to pre-commit (top ten contributor) and maintain R hooks myself. The idea would be to run the validations on every commit. Folowing sagemaker projects, the user could supply a module that contains a functinon
get_pipeline()
that returns the pipeline.The text was updated successfully, but these errors were encountered: