Enhancement/improved dependency management #76
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview
This PR closes MindGPT-75 but is conditional upon PR MindGPT-73.
Updates
pre-commit
dependency versions and introduces improved dependency management betweenpoetry
andpre-commit
.Details
This PR aims to:
poetry
andpre-commit
The main addition is the use of
sync_with_poetry
. This is a small meta-hook that is used to read thepoetry.lock
file and update the.pre-commit-config.yaml
file to match.Updates to any dependency specifications are inline with the
poetry
dependency spec documenationWhat is included
sync_with_poetry
hook topre-commit
black
andruff
to explicit dev dependenciesblack
andruff
What is not included
poetry update
)Footnotes
Several versions were specified as "^0.X.Y", when the leading value is 0 this locks the package so it cannot exceed 0.X.Y.
For example, "^0.14.2" would allow 0.14.2.1 -> 0.14.2.2 but not 0.14.2.1 -> 0.15.0, which I do not believe is the expected outcome here. Therefore I have truncated up one level to allow version increases. See here for more details. ↩
pre-commit-hooks
(notpre-commit
) has actually moved to v4, however, it is locked to a max of v3.* in pyproject.toml. I have left this restriction as the v3->v4 change introduces breaking changes so requires further investigation. Though I think it should be fine as the breaking change is the removal offlake8
which you do not use. ↩