8000 Changes to dev version output by FernandaDguez · Pull Request #831 · getpopper/popper · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

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

8000
Merged
merged 10 commits into from
May 20, 2020
Merged

Changes to dev version output #831

merged 10 commits into from
May 20, 2020

Conversation

FernandaDguez
Copy link
Collaborator
  • The version command output now includes the commit in development mode
  • Added --version option

@pep8speaks
Copy link
pep8speaks commented May 13, 2020

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

Copy link
Collaborator
@ivotron ivotron left a 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


__version__ = dunamai.Version.from_any_vcs().serialize()
ver = f'__popper_version__ = "{__version__}"'
path = os.path.split(os.getcwd())
Copy link
Collaborator

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.

@@ -0,0 +1 @@
__popper_version__ = "2.5.1"
Copy link
Collaborator

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.

@ivotron ivotron merged commit 9bbbe33 into getpopper:master May 20, 2020
@ivotron
Copy link
Collaborator
ivotron commented May 20, 2020

thanks @FernandaDguez, and congrats on your first merged PR! 🎉

ivotron pushed a commit that referenced this pull request May 24, 2020
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
ivotron pushed a commit that referenced this pull request May 25, 2020
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
ivotron pushed a commit that referenced this pull request May 25, 2020
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
ivotron pushed a commit that referenced this pull request May 25, 2020
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
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.

3 participants
0