Skip to content

Use package metadata for version and remove version.py#229

Merged
shanejbrown merged 2 commits intoadobe:mainfrom
shanejbrown:package-version
Feb 25, 2026
Merged

Use package metadata for version and remove version.py#229
shanejbrown merged 2 commits intoadobe:mainfrom
shanejbrown:package-version

Conversation

@shanejbrown
Copy link
Contributor

@shanejbrown shanejbrown commented Feb 25, 2026

This PR does two things:

  1. Revert to d909509
  • Reverts the version-fix and version-fix2 work so the codebase is back to the state at that commit.
  1. Single source of truth for version
  • buildrunner/init.py: Reads version with importlib.metadata.version("buildrunner"), falling back to "DEVELOPMENT" when the package is not installed (e.g. in development). Removes the old version.py loading and unused types import.
  • buildrunner/config/loader.py: Drops VERSION_FILE_PATH and file-based version reading. Uses buildrunner.version for config version validation and treats "DEVELOPMENT" as “skip validation” with a warning.
  • Tests: tests/test_version.py no longer uses a real version.py or VERSION_FILE_PATH; it patches buildrunner.version to cover valid version, DEVELOPMENT, single-component version, config-too-high, and non-numeric version.

Version is now defined only in pyproject.toml and consumed via standard package metadata, with no version.py file.

What does this PR do?

What issues does this PR fix or reference?

Previous Behavior

New Behavior

Merge requirements satisfied?

  • I have updated the documentation or no documentation changes are required.
  • I have added tests to cover my changes.
  • I have updated the base version in pyproject.toml (if appropriate).

shanejbrown and others added 2 commits February 25, 2026 09:38
Co-authored-by: Cursor <cursoragent@cursor.com>
Single source of truth in pyproject.toml; loader and tests updated accordingly.
@shanejbrown shanejbrown changed the title Use package metadata for version and remove version.pyUse package metadata for version and remove version.py Use package metadata for version and remove version.py Feb 25, 2026
@shanejbrown shanejbrown merged commit 1c20808 into adobe:main Feb 25, 2026
18 of 20 checks passed
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