@computron I'm very sorry about this. Turns out I did sloppy work in #476. Should have included tests that would have caught the fact I was importing importlib incorrectly:
- import importlib # bad
+ import importlib.metadata # good
The former does not make importlib.metadata.version available resulting in the following error when trying to use any of the CLIs:
Traceback (most recent call last):
File "/Users/janosh/.venv/py310/bin/qlaunch", line 8, in <module>
sys.exit(qlaunch())
File "/Users/janosh/.venv/py310/lib/python3.10/site-packages/fireworks/scripts/qlaunch_run.py", line 104, in qlaunch
fw_version = importlib.metadata.version("fireworks")
AttributeError: module 'importlib' has no attribute 'metadata'
This PR fixes all 4 CLIs and adds tests for this new functionality. I hope it can also serve as a starting point to test other parts of the CLIs in Fireworks in the future. I started with the lpad get_fws command.
Hopefully, this can be released as a patch release before many people upgrade to 2.0.0 and encounter this error.
Follow up to #476.
@computron I'm very sorry about this. Turns out I did sloppy work in #476. Should have included tests that would have caught the fact I was importing
importlib
incorrectly:The former does not make
importlib.metadata.version
available resulting in the following error when trying to use any of the CLIs:This PR fixes all 4 CLIs and adds tests for this new functionality. I hope it can also serve as a starting point to test other parts of the CLIs in Fireworks in the future. I started with the
lpad get_fws
command.Hopefully, this can be released as a patch release before many people upgrade to 2.0.0 and encounter this error.