Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configure uv to use git commits and tags in cache key #86

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

bsweger
Copy link
Collaborator

@bsweger bsweger commented Jan 10, 2025

This is another attempt to make setuptools-scm work as intended when using the publish to test-pypi workflow. We previously configured setuptools-scm to generate PEP 440-compliant version numbers, and that change enabled a successful push to test-pypi.

However, the version number generated by setuptools-scm did not respect the most recent tagged release of Cladetime (v.0.2.3), and assigned a version number of cladetime-0.1.dev1 rather than the expected v.0.2.4.dev[somenumber]

The changeset follows uv guidance for using setuptools-scm/dynamic metadata: https://docs.astral.sh/uv/concepts/cache/#dynamic-metadata

This is another attempt to make setuptools-scm work as intended when using
the publish to test-pypi workflow. We previously configured setuptools-scm
to generate PEP 440-compliant version numbers, and that change enabled a
successful push to test-pypi.

However, the version number generated by setuptools-scm did not respect the
most recent tagged release of Cladetime (v.0.2.3), and assigned a version number
of cladetime-0.1.dev1 rather than the expected v.0.2.4.dev[somenumber]

The changeset follows uv guidance for using setuptools-scm/dynamic metadata:
https://docs.astral.sh/uv/concepts/cache/#dynamic-metadata
@bsweger bsweger requested a review from zkamvar January 10, 2025 17:17
Copy link
Member

@zkamvar zkamvar left a comment

Choose a reason for hiding this comment

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

Oh no not cache invalidation!

This looks good to me. This isn't the first time that we've had to work around our tools trying to be helpful and it won't be the last (though I do acknowledge that this is not a workaround and more an explicit customization, but I digress)

@bsweger
Copy link
Collaborator Author

bsweger commented Jan 10, 2025

Oh no not cache invalidation!

This looks good to me. This isn't the first time that we've had to work around our tools trying to be helpful and it won't be the last (though I do acknowledge that this is not a workaround and more an explicit customization, but I digress)

Yeaaaah...

If this doesn't work, I'll likely ditch uv as the build mechanism.

@bsweger bsweger merged commit 1b41960 into main Jan 10, 2025
3 checks passed
@bsweger bsweger deleted the bs/tweak-uv-caching-for-dynamic-metadata/80 branch January 10, 2025 19:02
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