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

added auto pypi update action #50

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

shimwell
Copy link
Member

Please follow these guidelines when making a Pull Request.
This template was adapted from here and here.

Description

This github action automates the updating of the pypi distribution

Motivation and Context

Saves having to manually update the distribution each time and therefore saves developer time

Changes

automation feature

Behavior

behavior of code is unchanged just the distribution

Other Information

this will need a few secrets adding to the github repo for an account that has access to the pypi distribution
secrets.PYPI_USERNAME
secrets.PYPI_PASSWORD

@shimwell
Copy link
Member Author

shimwell commented Mar 4, 2021

Updated this PR to use a token instead of the username and password.

For this to work a Pypi API token secret called TEST_PYPI_API_TOKEN to work

Copy link
Contributor

@kkiesling kkiesling left a comment

Choose a reason for hiding this comment

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

Just for my own clarification because I haven't setup anything like this before, is the goal to automatically update the pip package every time a PR is merged to main?

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
Copy link
Contributor

Choose a reason for hiding this comment

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

Have you gotten this to work with Python 3? Last we tried, we couldn't get VisIt to work with Python 3. I don't currently test on Python 3 as a result. So we probably want to get that working first before this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah sorry, I've just been using the remove graveyard tool with python 3. Good point I should have looked around a bit more before making this PR

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this specifying something about using Python 2 whereas below it specifies python 3? (I am not familiar with pypi updates at all)

Copy link
Member Author

Choose a reason for hiding this comment

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

The v2 here is not referring to python2 but the version 2 of actions/checkout and version 2 of actions/setup-python

@shimwell
Copy link
Member Author

shimwell commented Mar 4, 2021

Just for my own clarification because I haven't setup anything like this before, is the goal to automatically update the pip package every time a PR is merged to main?

Yep that is exactly the goal of the PR.

@shimwell shimwell marked this pull request as draft March 4, 2021 15:09
@shimwell
Copy link
Member Author

shimwell commented Mar 4, 2021

In view of the feedback, I have moved this to a draft PR. Perhaps we can come back to this once the whole package is working with python 3

Thanks for taking a look @kkiesling

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