-
Notifications
You must be signed in to change notification settings - Fork 62
Changes to dev version output #831
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
Hello @FernandaDguez! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-05-20 06:31:42 UTC |
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.
thanks a lot @FernandaDguez, this is looking great! one couple of changes and it'll be done
cli/popper/__init__.py
Outdated
|
||
__version__ = dunamai.Version.from_any_vcs().serialize() | ||
ver = f'__popper_version__ = "{__version__}"' | ||
path = os.path.split(os.getcwd()) |
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.
since popper version
might not be executed from the popper repository folder always, the value returned by os.getcwd()
doesn't necessarily correspond to the project root directory. Instead, what we can do is obtain the path to the current script, which in python 3 can be done by doing:
import pathlib
_init_script_dir = pathlib.Path(__file__).parent.absolute()
So the _init_script_dir
will always point to the folder containing the __init__.py
script.
cli/popper/_version.py
Outdated
@@ -0,0 +1 @@ | |||
__popper_version__ = "2.5.1" |
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.
this could be assigned to 0.0.0
, and then the tests we execute could check that the value is not 0.0.0
but instead is the value that dunamai
returns.
thanks @FernandaDguez, and congrats on your first merged PR! 🎉 |
makes use of the dunamai package to display versioning information (`popper version`). In addition, this commit adds a `--version` flag to the `popper` command. fixes #783
makes use of the dunamai package to display versioning information (`popper version`). In addition, this commit adds a `--version` flag to the `popper` command. fixes #783
makes use of the dunamai package to display versioning information (`popper version`). In addition, this commit adds a `--version` flag to the `popper` command. fixes #783
makes use of the dunamai package to display versioning information (`popper version`). In addition, this commit adds a `--version` flag to the `popper` command. fixes #783
--version
option