-
Notifications
You must be signed in to change notification settings - Fork 33
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
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.
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. |
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_project
and missing payload inupdate_project
)build
folder from the repo. It's only required while building locally, similar todist
folderUser-Agent
parameter in request headers with module version, Python version and OS details. Sample:_version.py
according to common practices:_version.py
will have a line for version in__version__
variablescaleapi.__version__
as in most packagessetup.py
fileVersion bumped to
1.0.2
in file but will be built and uploaded to pypi after merge.