-
Notifications
You must be signed in to change notification settings - Fork 85
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
Finish adding deploy testing with TestPyPI #436
Conversation
c.f. instructions on PyPI page: https://pypi.org/project/setuptools-scm-git-archive/
Testing every single commit is not necessary, but it is nice to know that every accepted PR passes
return ( | ||
{'local_scheme': lambda version: ''} | ||
if getenv('TESTPYPI_UPLOAD') == 'true' | ||
else False |
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 will cause a fallback to the version hardcoded in python code on line 81.
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, this is the intended behavior. We only want scm versioning for TestPyPI.
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.
Ah, I see :)
It's an interesting approach which I haven't met before...
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.
But be aware that this may cause version mismatches between tag and dist because of human errors
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.
Yeah, the main reason is that we currently control everything through bumpversion, and I wanted to keep this PR as atomic as possible. We could consider changing things in the future.
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.
We don't have GitHub actions on pyhf yet! But we are very much looking forward to using it when we get it, so we'll be following up with you! :)
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.
You need to sign up first https://github.com/features/actions/signup
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.
Indeed. I have it for my personal account, but our org doesn't yet.
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.
Oh, in this case, I invite you to complete this tutorial https://tutorial.octomachinery.dev :)
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! That looks great. :)
@@ -3,3 +3,8 @@ universal = 1 | |||
|
|||
[metadata] | |||
license_file = LICENSE | |||
|
|||
[options] | |||
setup_requires = |
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.
You know that with old setuptools this won't work, right?
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.
Yup. But deployments happen with Python 3.7 and modern setuptools. We're in the slow process of starting the migration of getting ready to drop Python 2.7, but our field (high energy physics) is still using older everything so we haven't gone Python 3 and modern libs only yet.
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.
Well, as long as you ship binary wheels building them yourself it shouldn't matter.
@webknjaz Thanks very much for being so generous with your time to give help and feedback! 👍 |
You're welcome :) |
Description
Completes PR #429 (which was merged early by accident) and resolves #425 and resolves #432.
Inspired by Issue #410 and @webknjaz's tweet which inspired Issue #425 to have more robust deployment to PyPI this PR implements PR level deployments to TestPyPI that are versioned with version structure of
{next_version}.dev{distance}
through use ofsetuptools-scm
andsetuptools-scm-git-archive
and heavy copying ofansible-lint
's approach.The level of deployment is set to push commits on
master
as we commit frequently enough that there isn't a need to pollute the area with a huge number of deployed versions.As an example of the system working, by turning on deployment from all branches this PR deployed
pyhf 0.0.17.dev23
on TestPyPI.This PR also sets up the path to then complete Issues #410 and #399.
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: