Repository navigation
Devops 1320 - #22
Open
sebhmg wants to merge 2 commits into
Open
Devops 1320#22sebhmg wants to merge 2 commits into
sebhmg wants to merge 2 commits into
Conversation
expect some speedup
follow PEP 621 and PEP 735 poetry is only here now for packaging, locking and auto-versioning
|
|
There was a problem hiding this comment.
🟡 Changes recommended
The dependency-group migration is incompatible with CI’s pinned Poetry 2.1.3, and the hook’s hard-coded .git path can cause incorrect JIRA-ID handling when GIT_DIR selects another repository.
2 open issues
What changed in this PR
This PR updates packaging and branch detection for the pre-commit hooks, adding Git-based dynamic versioning and direct reading of repository metadata.
Changes:
- Replace Git branch-list parsing with HEAD and rebase-state inspection, with tests for normal repositories and worktrees.
- Introduce generated version files, fallback version handling, and updated Poetry configuration.
- Refresh pre-commit tool revisions and copyright notices.
| File | Description |
|---|---|
tests/version_test.py |
Test fallback versions and generated-version consistency. |
tests/git_message_hook_test.py |
Cover repository discovery, worktrees, and rebase states. |
tests/check_copyright_test.py |
Update copyright year. |
tests/__init__.py |
Update copyright year. |
README.rst |
Refresh copyright notices and company name. |
pyproject.toml |
Configure dynamic versioning and migrate development dependency groups. |
poetry.lock |
Update lockfile format and dependency metadata. |
mirageoscience/hooks/git_message_hook.py |
Read branch information from Git metadata files. |
mirageoscience/hooks/check_copyright.py |
Update copyright year. |
mirageoscience/hooks/__init__.py |
Load the generated version with a dated development fallback. |
mirageoscience/__init__.py |
Update copyright year. |
LICENSE |
Refresh copyright years and company name. |
.pre-commit-config.yaml |
Update hook revisions. |
.gitignore |
Ignore generated version files. |
Review effort: Balanced
Comment on lines
+13
to
+14
| [dependency-groups] | ||
| dev = [ |
| In a normal repo, `.git` is a directory. | ||
| In a worktree, `.git` is a file containing "gitdir: <path>". | ||
| """ | ||
| git_path = pathlib.Path(".git") |
RomFloreani
self-requested a review
November 5, 2026 15:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.


No description provided.