-
Notifications
You must be signed in to change notification settings - Fork 32
Single-sourcing the package version, user-agent and bug fixes #24
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
shaun-scale
left a comment
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.
Amazing upgrades here @fatihkurtoglu - I had already bumped to v1.0.2 yesterday (sorry I wasn't clear there) and then I had one comment about our versioning logic but all the important stuff is looking great.
setup.py
Outdated
| else: | ||
| raise RuntimeError("Unable to find a valid __version__ string in %s." % rel_path) |
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.
Is this a cool python trick to put else: after a for loop or was the tab indentation just off here? I suppose we could just have it be raise without the else: to the same effect?
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.
Yes, for/else is a pythonic way. else statement is triggered when the loop ends until the end without any interruption (break/return). More like a then stage for the loop.
Yes, it's the same as just keeping the raise there as you said, I'll update it.
fatihkurtoglu
left a comment
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.
Version upgraded.
|
@shaun-scale Made the changes regarding version bump and for/else statement. |
shaun-scale
left a comment
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.
Looks great
Summary of changes in separate commits as follows:
create_projectand missing payload inupdate_project)buildfolder from the repo. It's only required while building locally, similar todistfolderUser-Agentparameter in request headers with module version, Python version and OS details. Sample:_version.pyaccording to common practices:_version.pywill have a line for version in__version__variablescaleapi.__version__as in most packagessetup.pyfileVersion bumped to
1.0.2in file but will be built and uploaded to pypi after merge.