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

[repo] generate version.py in Makefile #14791

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ehigham
Copy link
Member

@ehigham ehigham commented Jan 15, 2025

This generates the hail version in a way that's importable in python and javascript (for webpages). It simplifies how the version is used in those languages as well as the number of files we need to juggle in CI.

@ehigham ehigham marked this pull request as ready for review January 15, 2025 18:35
@ehigham ehigham force-pushed the ehigham/generate-hail-version branch 3 times, most recently from b42f83c to 572f03a Compare January 17, 2025 18:48
@ehigham ehigham force-pushed the ehigham/generate-hail-version branch from aed9c05 to 85a821b Compare January 23, 2025 17:01
Comment on lines +26 to +31
def __load_module(name, path):
spec = spec_from_file_location(name, path)
mod = module_from_spec(spec)
sys.modules[name] = mod
spec.loader.exec_module(mod)
return mod
Copy link
Member Author

Choose a reason for hiding this comment

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

This is arguably the only more complicated bit about this change. I could have used a regex to read extract this information but settled on this as I believe it would fail if we changed versioning in the future and forgot to modify this.

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.

1 participant