Skip to content

Add --version#182

Open
jayvdb wants to merge 1 commit into
guyzmo:develfrom
jayvdb:show_version_basic
Open

Add --version#182
jayvdb wants to merge 1 commit into
guyzmo:develfrom
jayvdb:show_version_basic

Conversation

@jayvdb

@jayvdb jayvdb commented Nov 21, 2017

Copy link
Copy Markdown
Collaborator

No description provided.

@guyzmo guyzmo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a super great thing you've done, that might help in debugging issues related to changes in the dependencies.

Though I got a few design comments!

Comment thread git_repo/repo.py
def cli(): # pragma: no cover
try:
sys.exit(main(docopt(__doc__.format(self=sys.argv[0].split(os.path.sep)[-1], version=__version__))))
sys.exit(main(docopt(__doc__.format(self=sys.argv[0].split(os.path.sep)[-1], version=__version__),

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the --help version should also contain --version

Comment thread git_repo/repo.py
return 2


class Version:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be moved to either:

import os, json, platform


SERVICE_PACKAGE = pybitbucket

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like that pattern, it feels a bit redundant with the register target decorator. What I'd rather do is either make a new decorator that manages version, or add an argument to register_target with the version string.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other better side of that is that you don't need the full loading of the module into the main system, and if a module has a version string that's not standard (i.e. not using __version__ we're good for that.

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.

2 participants