Skip to content
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

Add github action to publish to pypi #188

Merged
merged 1 commit into from
Feb 8, 2022
Merged

Conversation

staylorx
Copy link
Member

@staylorx staylorx commented Feb 8, 2022

Description

As discussed in discussion item #181:
This adds a GitHub action file to build and publish a source (bdist) and binary (wheel) distribution to PyPI.
On any release, the action will build and publish to the test PyPI repo.
On any tagged release the artifacts will be published to the production PyPI repo.
The /dist directory is added to the .gitignore file.
A prior PR (#187) was submitted, but the changes were too broad.

What is the nature of your change?

  • Bug fix (fixes an issue).
  • Enhancement (adds functionality).
  • Breaking change (fix or feature that would cause existing functionality to not work as expected).
  • This change requires a documentation update.

Checklist

Please ensure that all boxes are checked before indicating that a pull request is ready for review.

  • I have read the CONTRIBUTING.md guidelines.
  • My code follows the style guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • New and existing unit tests pass locally with my changes.
  • I have added tests that prove my fix is effective or that my feature works.
  • I have deleted all non-relevant text in this pull request template.

@staylorx
Copy link
Member Author

staylorx commented Feb 8, 2022

My version of the .github/workflows/publish-to-pypi.yml file has an ending newline, which I added from comments from #187.

Copy link
Member

@gwaybio gwaybio left a comment

Choose a reason for hiding this comment

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

Looks good

uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
repository_url: https://test.pypi.org/legacy/
Copy link
Member

Choose a reason for hiding this comment

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

should this point to the pycytominer url? What is legacy?

Copy link
Member Author

Choose a reason for hiding this comment

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

repository_url is the API endpoint for the test PyPI system. By default that URL points to production PyPI.

https://github.com/pypa/gh-action-pypi-publish

@codecov-commenter
Copy link

Codecov Report

Merging #188 (0d1f97b) into master (48af26a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #188   +/-   ##
=======================================
  Coverage   98.04%   98.04%           
=======================================
  Files          50       50           
  Lines        2403     2403           
=======================================
  Hits         2356     2356           
  Misses         47       47           
Flag Coverage Δ
unittests 98.04% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 48af26a...0d1f97b. Read the comment docs.

@gwaybio gwaybio merged commit ea3340c into cytomining:master Feb 8, 2022
@gwaybio
Copy link
Member

gwaybio commented Feb 8, 2022

p.s. @niranjchandrasekaran - I am not sure why both of us aren't automatically assigned to review. We're both listed as CODEOWNERS.

I wonder if we should disable this feature though - do you find it useful being tagged?

@niranjchandrasekaran
Copy link
Member

I am not sure why both of us aren't automatically assigned to review. We're both listed as CODEOWNERS.

Not sure but it seems like it always assigns me.

I wonder if we should disable this feature though - do you find it useful being tagged?

We could disable it as long as we are keeping track of PRs and determine who is going to review it.

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.

4 participants