Skip to content

Devops 1320 - #22

Open
sebhmg wants to merge 2 commits into
mainfrom
DEVOPS-1320
Open

sebhmg wants to merge 2 commits into
mainfrom
DEVOPS-1320

Conversation

@sebhmg

@sebhmg sebhmg commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI balanced review requested due to automatic review settings October 28, 2026 22:06
follow PEP 621 and PEP 735

poetry is only here now for packaging, locking and auto-versioning
@github-actions

Copy link
Copy Markdown

⚠️ Force push detected - Previous Copilot review comments may no longer be relevant to the current code. Please resolve any outdated threads and re-request a Copilot review when ready.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 thread pyproject.toml
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
RomFloreani self-requested a review November 5, 2026 15:32
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.

2 participants