-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Add --version commandline flag #970
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! Can you please take care of the tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good to me, have not tried it locally yet. I just have one minor suggestion.
Thanks for picking is up, adding a version command was overdue. :-)
Co-authored-by: Benjamin Hackl <devel@benjamin-hackl.at>
@leotrs How can I fix the dependency errors in the checks? |
You'll need to run |
I believe you need to run |
Hmm, this is weird: (manim-jRHFv4qq-py3.7) behackl@home:~/code/manim$ manim --version
Manim Community Edition v0.1.1 I am running this from the current version of this branch, the version should be |
@behackl No, that's rather odd. It shows 0.2.0 for me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this is weird:
(manim-jRHFv4qq-py3.7) behackl@home:~/code/manim$ manim --version Manim Community Edition v0.1.1
I am running this from the current version of this branch, the version should be
v0.2.0
. Any idea what is happening here?
(manim) C:\Users\a\Documents\repos\ManimCommunity\manim\example_scenes>manim --version
Manim Community Edition v0.2.0
Works fine for me. You might have multiple conflicting installs?
$ python
Python 3.7.5 (default, Nov 7 2019, 10:50:52)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import manim
>>> manim.__version__
'0.1.1' This is within the virtual environment provided by poetry, there are no other installations of manim present in there. |
I feel like this has to do with you using |
Running black locally didn't catch this for some reason..
Update for records sake: The issue described above was a local issue. The command works. Added a test_version pytest, all checks passed. Good to merge? |
Motivation
Aids helping Manim errors by providing version command. Will be needed for the Manim Showcase as well (#934). This command should be added before the next release as
--version
should be available in all Manim versions, but won't be because it is too late.Overview / Explanation for Changes
Reads the version from metadata from pyproject.toml (explained here). Adds a
--version
command to print the version. Adds it to--help
and the list of CLI flags in the documentation. Added a test to confirm the command continues to provide the correct version.Oneline Summary of Changes
Additional Comments
In the future, commit hashes or some other such thing should be included as well (#541)
Acknowledgements
Reviewer Checklist