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

Workflow to build python package #4

Closed
4 tasks done
mxochicale opened this issue May 22, 2023 · 7 comments
Closed
4 tasks done

Workflow to build python package #4

mxochicale opened this issue May 22, 2023 · 7 comments

Comments

@mxochicale
Copy link
Member

mxochicale commented May 22, 2023

mxochicale added a commit that referenced this issue Jul 2, 2023
mxochicale added a commit that referenced this issue Jul 2, 2023
…in examples/preparing_dataset_fetal_planes.ipynb (#4)
mxochicale added a commit that referenced this issue Jul 2, 2023
mxochicale added a commit that referenced this issue Jul 2, 2023
…d test it with preparing_dataset_fetal_planes.ipynb (#4)
mxochicale added a commit that referenced this issue Jul 2, 2023
mxochicale added a commit that referenced this issue Jul 2, 2023
mxochicale added a commit that referenced this issue Jul 2, 2023
@mxochicale mxochicale mentioned this issue Jul 2, 2023
@mxochicale
Copy link
Member Author

Switching to main branch and creating tag

git checkout main
git pull origin main
git tag -a v0.0.0 -m 'First pre-alpha release'
git push origin v0.0.0

@mxochicale
Copy link
Member Author

  1. Create a PyPI API token
  2. Add the PyPI API token to the GitHub project’s secrets https://github.com/mxochicale/medisynth/settings/secrets/actions >

Reference https://www.seanh.cc/2022/05/21/publishing-python-packages-from-github-actions/

@mxochicale
Copy link
Member Author

(1) Delete all local tags and get the list of remote tags:
(2) Remove all remote tags
(3) Clean up local tags

git tag -l | xargs git tag -d
git fetch
git tag -l | xargs -n 1 git push --delete origin
git tag -l | xargs git tag -d

@mxochicale
Copy link
Member Author

mxochicale commented Jul 2, 2023

then do it again

git checkout main
git pull origin main
git tag -a v0.0.0 -m 'First pre-alpha release'
git push origin v0.0.0

@mxochicale
Copy link
Member Author

mxochicale commented Jul 2, 2023

python setup.py bdist_wheel
pip install -e .
python setup.py sdist
python setup.py bdist_wheel sdist
twine upload dist/*

from > https://www.youtube.com/watch?v=7AF3HvKz070

🎉

(medisynVE) mxochicale@precision-5570:~/repositories/mxochicale/medisynth$ twine upload dist/*
Uploading distributions to https://upload.pypi.org/legacy/
Enter your username: mxochicale
Enter your password: 
Uploading medisynth-0.0.0-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.1/6.1 kB • 00:00 • ?
Uploading medisynth-0.0.0.tar.gz
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 kB • 00:00 • ?

View at:
https://pypi.org/project/medisynth/0.0.0/

https://pypi.org/project/medisynth/

@mxochicale
Copy link
Member Author

Close this one in favour of #22

@mxochicale mxochicale reopened this Jul 15, 2023
mxochicale added a commit that referenced this issue Jul 15, 2023
@mxochicale
Copy link
Member Author

mxochicale commented Jul 15, 2023

@mxochicale mxochicale changed the title add python-publish.yml Workflow to build python package Jul 15, 2023
mxochicale added a commit that referenced this issue Jul 15, 2023
…s already been used, use a different version (#4)
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

No branches or pull requests

1 participant