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

It would be nice to add the latest commit hash to __init__.py #37

Open
jsf9k opened this issue Nov 30, 2017 · 2 comments
Open

It would be nice to add the latest commit hash to __init__.py #37

jsf9k opened this issue Nov 30, 2017 · 2 comments
Assignees

Comments

@jsf9k
Copy link
Member

jsf9k commented Nov 30, 2017

It would be nice to somehow add the latest commit hash as part of the version string or as a separate variable in __init__.py. This would be a useful piece of information to have when debugging issues reported by third parties, since they can always check out some random branch or commit instead of using what is in PyPI. If we proceed with #36, this would be particularly useful when debugging code built from the develop branch.

I'm not quite sure how to implement this (maybe via a git hook), but this information can be obtained via git rev-parse HEAD.

@jsf9k jsf9k self-assigned this Nov 30, 2017
@IanLee1521
Copy link
Collaborator

IanLee1521 commented Dec 4, 2017

I usually use git describe [--tags] to get this information, as in:

> git describe --tags
0.3.0-3-g47d112c

Where the last tagged version is 0.3.0, we are 3 commits from it, and our git commit hash is 47d112c.

@jsf9k
Copy link
Member Author

jsf9k commented Dec 4, 2017

Thanks, @IanLee1521. I didn't know about git describe --tags.

mcdonnnj pushed a commit that referenced this issue Jan 23, 2023
Add static type checking to the Python skeleton
mcdonnnj added a commit that referenced this issue Jan 23, 2023
Incorporate the Python version into keys for pip and pre-commit caches.
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

No branches or pull requests

2 participants