8000 feat(config): enforce required habit-hooks version by tayfuryldz · Pull Request #196 · habit-hooks/habit-hooks · GitHub
[go: up one dir, main page]

Skip to content

feat(config): enforce required habit-hooks version - #196

Merged
devill merged 3 commits into
habit-hooks:mainfrom
tayfuryldz:feat/110-config-requires
Sep 25, 2026
Merged

devill merged 3 commits into
habit-hooks:mainfrom
tayfuryldz:feat/110-config-requires

Conversation

@tayfuryldz
Copy link
Copy Markdown
Contributor

Adds the root requires config key and validates it as a PEP 440 version specifier. Configuration loading refuses an unmet floor before sensors are configured, with an error naming both the requirement and running version. Invalid requirements are refused instead of ignored. Validation: 38 focused config/CLI tests passed; git diff --check passed. Closes #110.

@devill
devill commented Sep 24, 2026
Copy link
Copy Markdown
Collaborator

The CI run failed for this PR. Please also note that normally we accept PRs if people get the issue assigned to them first after a short conversation on the issue. I'm willing to skip that requirement, since the PR is small and seems well done, but the CI run still needs to be fixed.

@tayfuryldz
Copy link
Copy Markdown
Contributor Author

Thanks for the heads-up. I moved the version requirement validation into a focused helper so load_config stays below the Ruff PLR0915 threshold. The update is pushed; CI should rerun on the new commit.

@devill
devill merged commit 2ecc2af into habit-hooks:main Sep 25, 2026
3 checks passed
@devill
devill commented Sep 25, 2026
Copy link
Copy Markdown
Collaborator

Thanks for the PR! Merged

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.

Add a root requires key so .habit-hooks/config.toml can state the habit-hooks version it needs

2 participants

0