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

Improve handling of git info in version number #348

Merged
merged 4 commits into from
Dec 4, 2024

Conversation

Luthaf
Copy link
Member

@Luthaf Luthaf commented Nov 19, 2024

The version is now automatically increased from the previous release when building a dev version. The full code hash is also included, which prevents pip from caching a wheel during development without having to use uuid in the file:// URL. Removing uuid means that we can now install featomic with uv pip install.

Still TBD:

  • update version number in the same way in CMake.

Part of #281


📚 Documentation preview 📚: https://featomic--348.org.readthedocs.build/en/348/

⚙️ Download Python wheels for this pull-request (you can install these with pip)

@Luthaf Luthaf force-pushed the better-dev-version branch 4 times, most recently from 4d873ad to 62b1197 Compare November 21, 2024 14:46
@Luthaf Luthaf force-pushed the better-dev-version branch 2 times, most recently from 0714b3e to 556923a Compare November 27, 2024 13:19
@Luthaf Luthaf force-pushed the better-dev-version branch 2 times, most recently from 698924f to 0f36ab2 Compare November 28, 2024 13:03
@Luthaf Luthaf force-pushed the better-dev-version branch 4 times, most recently from a522d42 to f006875 Compare November 28, 2024 14:28
@Luthaf Luthaf marked this pull request as ready for review November 28, 2024 14:46
@Luthaf Luthaf requested a review from PicoCentauri November 28, 2024 14:46
@Luthaf Luthaf force-pushed the better-dev-version branch 2 times, most recently from 6427dd2 to db08514 Compare November 29, 2024 17:32
@Luthaf
Copy link
Member Author

Luthaf commented Dec 3, 2024

To be fixed: Linux wheels version is 0.1.0.dev604+dirty.a8aa426 on CI, where it should be something like 0.1.0.dev604+git.a8aa426

@Luthaf Luthaf force-pushed the better-dev-version branch 5 times, most recently from f64bb23 to c06df2f Compare December 3, 2024 14:26
The version is now automatically increased from the previous release
when building a dev version. The full code hash is also included to
find which exact version of the code was used after an installation
from a git checkout
@Luthaf Luthaf force-pushed the better-dev-version branch from c06df2f to 96e8fe1 Compare December 3, 2024 14:39
@Luthaf Luthaf force-pushed the better-dev-version branch from 96e8fe1 to eb502fd Compare December 3, 2024 14:41

set(URL_ROOT "https://github.com/lab-cosmo/metatensor/releases/download")
include(FetchContent)
FetchContent_Declare(
metatensor_torch
URL ${URL_ROOT}/metatensor-torch-v${METATENSOR_FETCH_VERSION}/metatensor-torch-cxx-${METATENSOR_FETCH_VERSION}.tar.gz
URL_HASH SHA256=f050743662ece38948b2087dd025d60110645716840dbfc5370c059e1275d0cf
URL_HASH SHA256=0941da4bc6d25ee73b597774d3c8c6edf6a44f134139bd93b33834eae52ac4dd
Copy link
Contributor

Choose a reason for hiding this comment

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

We should maybe document somewhere what to do when lifting the metatensor version.

Including updating the hashes etc...

Copy link
Member Author

Choose a reason for hiding this comment

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

I mean, if you update the version number above and not this, then CMake will yell at you. But yeah, we should add documentation around this!

Copy link
Member Author

@Luthaf Luthaf Dec 4, 2024

Choose a reason for hiding this comment

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

I added some comments in the CMakeLists.txt, should be good for now!

@@ -1,6 +1,6 @@
[package]
name = "featomic"
version = "0.1.0"
version = "0.0.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

Next version is -0.1.0? xD

Copy link
Member Author

Choose a reason for hiding this comment

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

yep =D

The first release might actually be something like 0.6.0 (to indicate the actual level of maturity).

@Luthaf Luthaf requested a review from PicoCentauri December 4, 2024 10:35
@Luthaf Luthaf merged commit d5bd60a into metatensor:main Dec 4, 2024
27 checks passed
@Luthaf Luthaf deleted the better-dev-version branch December 4, 2024 14:22
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