Skip to content

Adds git based versioning for get_nxdl_version#1318

Closed
domna wants to merge 4 commits intonexusformat:mainfrom
FAIRmat-NFDI:vcs-based-versioning
Closed

Adds git based versioning for get_nxdl_version#1318
domna wants to merge 4 commits intonexusformat:mainfrom
FAIRmat-NFDI:vcs-based-versioning

Conversation

@domna
Copy link
Copy Markdown
Contributor

@domna domna commented Oct 31, 2023

We started to add a version based on the git tag and hash in pynxtools (see FAIRmat-NFDI/pynxtools#124) and I thought could be useful as a general feature. This PR is just to start a discussion whether it is desired to have a versioning like this in this repository, too.

When a git repository is available it constructs a version string based on the last tag, commit distance and commit hash. If no repository is available this falls back to reading NXDL_VERSION.

Comment thread dev_tools/globals/nxdl.py
@domna
Copy link
Copy Markdown
Contributor Author

domna commented Feb 8, 2024

Currently it's failing because it needs reformatted according to black>24. This will be fixed by #1344

@PeterC-DLS
Copy link
Copy Markdown
Contributor

You need to rebase to the tip of main for the fixed formatting of xsd_units.py

@domna domna force-pushed the vcs-based-versioning branch from 34a2ca9 to e4e25a2 Compare February 8, 2024 17:00
@PeterC-DLS
Copy link
Copy Markdown
Contributor

And then format your altered file

@domna
Copy link
Copy Markdown
Contributor Author

domna commented Feb 9, 2024

And then format your altered file

That's the grouping of the subprocess imports. It seems like isort doesn't like them being grouped

Copy link
Copy Markdown
Contributor

@PeterC-DLS PeterC-DLS left a comment

Choose a reason for hiding this comment

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

LGTM

@lukaspie lukaspie closed this Mar 26, 2025
@lukaspie lukaspie deleted the vcs-based-versioning branch March 26, 2025 10:55
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.

3 participants