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

Make version accesible as bytewax.__version__ from python code #326

Open
cra opened this issue Nov 23, 2023 · 1 comment
Open

Make version accesible as bytewax.__version__ from python code #326

cra opened this issue Nov 23, 2023 · 1 comment

Comments

@cra
Copy link
Contributor

cra commented Nov 23, 2023

Is your feature request related to a problem? Please describe.
With the upcoming merge of py-operators and additional changes it would be beneficial to have an easy way that the bytewax you installed is the one you actually intended to use.

Describe the solution you'd like
I want to be able to do a simple

import bytewax
print(bytewax.__version__)

And see the version. I don't think we need any additional info at this point, but we can of course push the sha tag as well.

Describe alternatives you've considered
Comparing the tag to the git branch installed. Kinda works but when I'm in the middle of hacking around it would be nice to have a simple sanity check (I'm talking about my own sanity here ofc)

Additional context
I imagine it would also help debugging user issues or even as much as make the enforcing asserts in the example code, like assert bytewax.__version__ == '0.17.2'. We also probably want to use something like bumpversion to sync the versions between rust impl and python, but I think it can be done later, as we don't have that many releases at the moment

@github-actions github-actions bot added the needs triage New issue, needs triage label Nov 23, 2023
@whoahbot whoahbot removed the needs triage New issue, needs triage label Nov 27, 2023
@whoahbot
Copy link
Contributor

importlib has some interesting tools to determine the version of a package:

In [4]: from importlib.metadata import version

In [5]: version('bytewax')
Out[5]: '0.17.1'

Is that sufficient for what you would like, or do you think including it adds some functionality that importlib doesn't provide?

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