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

Feature: Add PyPI integration #87

Merged
merged 4 commits into from
Jun 12, 2023
Merged

Feature: Add PyPI integration #87

merged 4 commits into from
Jun 12, 2023

Conversation

Bartdoekemeijer
Copy link
Collaborator

@Bartdoekemeijer Bartdoekemeijer commented Jun 8, 2023

Feature or improvement description
Adds PyPI integration so that FLASC becomes pip installable without having to clone the repository from GitHub.

Related issue, if one exists
Issue #49.

Impacted areas of the software
Code deployment.

Additional supporting information
I have followed the style of FLORIS in the pyproject.toml and python-publish.yml files.

Test results, if applicable
See my test deployment on the PyPI testing environment, https://test.pypi.org/project/flasc/1.4/. I bumped this to version 1.4 because I made a mistake when uploading 1.3, and you cannot upload the code for the same version number more than once.

Steps remaining

# Building the code
python3 -m pip install --upgrade build
python3 -m build

# Uploading the packaged code
python3 -m pip install --upgrade twine
python3 -m twine upload --repository pypi dist/*  # Upload distributions to PyPI

@codecov-commenter
Copy link

Codecov Report

Patch and project coverage have no change.

Comparison is base (dab8eb9) 40.21% compared to head (2895bbf) 40.21%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #87   +/-   ##
=======================================
  Coverage   40.21%   40.21%           
=======================================
  Files          40       40           
  Lines        3971     3971           
=======================================
  Hits         1597     1597           
  Misses       2374     2374           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@paulf81
Copy link
Collaborator

paulf81 commented Jun 12, 2023

Looks good @Bartdoekemeijer I will approve and merge, thank you!

@paulf81 paulf81 merged commit 8050af8 into main Jun 12, 2023
@Bartdoekemeijer Bartdoekemeijer deleted the feature/pypi branch June 13, 2023 07:03
@Bartdoekemeijer
Copy link
Collaborator Author

That's great Paul, thanks!! Could you also make the PyPI API token and publish FLASC 1.3 to it? See instructions above.

@paulf81
Copy link
Collaborator

paulf81 commented Jun 14, 2023

hi @Bartdoekemeijer , I gave it a shot today! I made a token and followed all steps, and hit an error on the final one, have you seen this one:

(floris) pfleming-37929s:flasc pfleming$ python3 -m twine upload --repository pypi dist/*  # Upload distributions to PyPI
Uploading distributions to https://upload.pypi.org/legacy/
Uploading flasc-1.3-py3-none-any.whl
100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 51.6/51.6 kB • 00:00 • 44.4 MB/s
WARNING  Error during upload. Retry with the --verbose option for more details.
ERROR    HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/
         The user 'paulf81' isn't allowed to upload to project 'flasc'. See
         https://pypi.org/help/#project-name for more information.

maybe if you add me? I'm using the same username/email on pypi as I use on github

@Bartdoekemeijer
Copy link
Collaborator Author

Wait, I completely missed this... FLASC is already on PyPI??
https://pypi.org/project/flasc/

It seems that Raf did this before going on leave!

pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI I've added these secrets to the flasc repository

Bartdoekemeijer added a commit that referenced this pull request Jul 3, 2023
* Merge in changes from `main` branch (v1.3 -> v1.3.1) into `develop`, notably:

- Feature: Add PyPI integration by @Bartdoekemeijer in #87
- Bug fix: various small corrections by @Bartdoekemeijer in #86

---------

Co-authored-by: paulf81 <paul.fleming@nrel.gov>
Co-authored-by: Rafael M Mudafort <rafael.mudafort@nrel.gov>
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