Skip to content

Fixed version reporting across all packages#112

Merged
mawad-amd merged 3 commits intomainfrom
metrix/version-from-scm
Apr 10, 2026
Merged

Fixed version reporting across all packages#112
mawad-amd merged 3 commits intomainfrom
metrix/version-from-scm

Conversation

@mawad-amd
Copy link
Copy Markdown
Member

@mawad-amd mawad-amd commented Apr 3, 2026

Summary

  • Fixed __version__ returning hardcoded values in all packages — now reads the real version from installed metadata via importlib.metadata
  • Fixed pip show not displaying the License field — changed license = "MIT" to license = {text = "MIT"} in pyproject.toml
  • Fixed requires-python claiming >=3.8 when fastmcp>=2.0.0 requires >=3.10
  • Fixed scikit-build-core packages (accordo, nexus, kerncap) not picking up setuptools-scm — added metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
  • Deleted metrix's legacy setup.py that hardcoded version="0.1.0" and overrode setuptools-scm — replaced with a minimal one (like iris) for backward compatibility

Packages updated

metrix, linex, accordo, nexus, kerncap

Before / After

# Before
pip show metrix → Version: 0.1.0
python -c "import metrix; print(metrix.__version__)" → 0.1.0

# After
pip show metrix → Version: 0.1.0.post120+gd6b0b56ad
python -c "import metrix; print(metrix.__version__)" → 0.1.0.post120+gd6b0b56ad

Test plan

Tested all 5 packages on hpcfund (Python 3.12) with 3 install methods each:

Package pip install -e . pip install . pip install git+...
metrix pass pass pass
linex pass pass pass
accordo pass pass pass
nexus pass pass pass
kerncap pass pass pass
  • All packages show correct .postN+g<hash> version
  • All packages show License: MIT in pip show
  • CI lint and tests pass
  • ruff format/check clean

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings April 3, 2026 03:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Metrix’s version reporting to reflect the installed distribution version produced by setuptools-scm (including git commit hash), and removes a legacy setup.py that hardcoded the package version.

Changes:

  • Removed metrix/setup.py which hardcoded version="0.1.0" and could override setuptools-scm versioning.
  • Updated metrix.__version__ to be derived from importlib.metadata (installed package metadata) with a fallback when metadata isn’t available.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
metrix/src/metrix/init.py Switches runtime __version__ to read from installed distribution metadata.
metrix/setup.py Deletes legacy setuptools entrypoint that hardcoded the version.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@mawad-amd mawad-amd force-pushed the metrix/version-from-scm branch 4 times, most recently from 6622f29 to 7a75987 Compare April 3, 2026 11:15
Delete legacy setup.py that hardcoded version="0.1.0", which overrode
setuptools-scm. Replace hardcoded __version__ in __init__.py with
importlib.metadata lookup so the installed version (computed by
setuptools-scm with commit hash) is exposed at runtime.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mawad-amd mawad-amd force-pushed the metrix/version-from-scm branch from 7a75987 to 93471f4 Compare April 3, 2026 11:17
@mawad-amd mawad-amd changed the title metrix: embed git commit hash in package version Fixed version reporting across all packages Apr 3, 2026
Same changes as metrix: replace hardcoded __version__ with
importlib.metadata lookup, fix license field format for pip show,
and bump requires-python to >=3.10 (fastmcp requires it).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coleramos425
Copy link
Copy Markdown
Collaborator

@mawad-amd , would you please make the same change to kerncap for consistent versioning across all IntelliKit projects?

Add __version__ via importlib.metadata, add scikit-build-core
metadata provider for setuptools-scm, fix license field format.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@mawad-amd
Copy link
Copy Markdown
Member Author

@mawad-amd , would you please make the same change to kerncap for consistent versioning across all IntelliKit projects?

Done! d6b0b56

@mawad-amd mawad-amd merged commit b915e8c into main Apr 10, 2026
32 checks passed
@mawad-amd mawad-amd deleted the metrix/version-from-scm branch April 10, 2026 19:03
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.

4 participants