Skip to content

feat: make VRS schema release info accessible in VRS-Python#467

Closed
jsstevenson wants to merge 10 commits intomainfrom
import-vrs-version
Closed

feat: make VRS schema release info accessible in VRS-Python#467
jsstevenson wants to merge 10 commits intomainfrom
import-vrs-version

Conversation

@jsstevenson
Copy link
Copy Markdown
Contributor

@jsstevenson jsstevenson commented Nov 27, 2024

(draft: don't worry about reviewing yet)

close #85

  • use a hook during setup to grab the most recent release tag from the VRS submodule, then write it as an importable Python module (not necessarily the most elegant way to do this, but I think it's the only realistic option)
  • This draft uses the scheme used by setuptools-scm to append commit hash/rev distance when the most recent tag isn't applied to the checked-out commit. I assume that the VRS submodule is tied to a branch and not a tag/commit due to its development status, and maybe this will be unnecessary once that stabilizes.
  • very, very low priority. Was just something I was thinking about yesterday.

Current status: for the life of me, I cannot get this to work in CI/CD. Seems to be something about how the GitHub checkout action works and what it does and doesn't get from the .git folder. Not sure how to move forward.

@jsstevenson jsstevenson added the priority:low Low priority label Nov 27, 2024
@jsstevenson
Copy link
Copy Markdown
Contributor Author

going with the slightly less elegant #543 instead

jsstevenson added a commit that referenced this pull request Apr 11, 2025
supercedes #467. In that PR, I defined a hook for setuptools that would
use the tag info in a submodule and auto-update a variable with the
latest VRS schema tag, so that wheels built by our release workflow
would contain the right value. There were probably going to be some
hiccups that way, though, and I also couldn't get it to be testable in
github actions on account of how actions/checkout seemed to be pulling
the git repos.

Here, we just define a little old constant with the schema version. This
is a fully manual process, but theoretically we won't need to update it
that often, so it should be fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:low Low priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

retrieve schema version

1 participant