Skip to content

fix: Make project version dynamic#204

Merged
akrherz merged 1 commit intopython-metar:mainfrom
akrherz:gh201_project_version
Mar 20, 2026
Merged

fix: Make project version dynamic#204
akrherz merged 1 commit intopython-metar:mainfrom
akrherz:gh201_project_version

Conversation

@akrherz
Copy link
Collaborator

@akrherz akrherz commented Mar 20, 2026

closes #201

Copy link

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 removes the duplicated hard-coded version definitions by switching the package to a SCM-derived version (via setuptools_scm) and exposing that version through metar.__version__.

Changes:

  • Make the project version dynamic in pyproject.toml and configure setuptools_scm.
  • Add metar/_version.py and compute metar.__version__ from metadata/VCS info.
  • Add a changelog entry for the change.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
pyproject.toml Switches to dynamic versioning and adds setuptools_scm build configuration.
metar/_version.py Introduces runtime version resolution logic (metadata + editable install handling).
metar/__init__.py Replaces hard-coded __version__ with computed version from _version.get_version().
CHANGELOG.md Notes the SCM-based versioning change for the next release entry.

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

@akrherz
Copy link
Collaborator Author

akrherz commented Mar 20, 2026

I am unsure about this yet, I largely copied what MetPy does, but the current implementation does not locally work for me :/ Will boggle some more unless others have better ideas!

Copy link

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

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


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

@akrherz akrherz requested a review from Copilot March 20, 2026 15:18
@akrherz
Copy link
Collaborator Author

akrherz commented Mar 20, 2026

Sorry for the thrashing on this PR and copilot churn. Trying not to foul this up 😓

Copy link

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated no new comments.


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

@akrherz
Copy link
Collaborator Author

akrherz commented Mar 20, 2026

In my local dev,

python -m build
...
$ tar -tzf dist/metar-2.0.0.post12+g3b1cb95e0.tar.gz | grep _version
metar-2.0.0.post12+g3b1cb95e0/metar/_version.py

Gonna cleanup the git history here and plow forward.

@akrherz akrherz force-pushed the gh201_project_version branch from 3b1cb95 to 78d2a91 Compare March 20, 2026 15:26
@akrherz akrherz force-pushed the gh201_project_version branch from 78d2a91 to f4ac72b Compare March 20, 2026 15:27
@akrherz akrherz merged commit 37c6c04 into python-metar:main Mar 20, 2026
6 checks passed
@akrherz akrherz deleted the gh201_project_version branch March 20, 2026 15:30
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.

project version defined twice

2 participants