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

Publish to PyPI with GitHub Action #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

alexey-tereshenkov-aiven
Copy link

@alexey-tereshenkov-aiven alexey-tereshenkov-aiven commented Nov 25, 2022

The project is not currently published to PyPI which makes it impossible to use in a standard virtual environment setup.
This PR adds a GitHub Action that publishes sdist and wheel to PyPI based on pushed annotated tag. The code is copied from the aiven-client action.

The secret secrets.PYPI_API_TOKEN needs to be set up. Could someone please help me with that? Thank you!

@codecov-commenter
Copy link

codecov-commenter commented Nov 25, 2022

Codecov Report

Base: 76.22% // Head: 76.35% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (d42a2f0) compared to base (87fed45).
Patch has no changes to coverable lines.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #103      +/-   ##
==========================================
+ Coverage   76.22%   76.35%   +0.12%     
==========================================
  Files          16       16              
  Lines        3941     3941              
  Branches      941      941              
==========================================
+ Hits         3004     3009       +5     
+ Misses        714      712       -2     
+ Partials      223      220       -3     
Impacted Files Coverage Δ
myhoard/basebackup_operation.py 87.71% <0.00%> (-1.28%) ⬇️
myhoard/basebackup_restore_operation.py 84.61% <0.00%> (+3.84%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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

@alanfranz
Copy link
Contributor

makes it impossible to use in a standard virtual environment setup.

What is your use case? What is your setup? If you pip install --editable . it's certainly usable in venv.

I don't think we currently publish non-libraries to pypi (e.g. we publish rohmu) but I don't see a real reason why we shouldn't.

ccing @aiven/aiven-open-source-reviews for opinions and @aiven/team-security for secrets configuration info.

@alanfranz alanfranz requested review from a team November 28, 2022 20:47
@alexey-tereshenkov-aiven
Copy link
Author

makes it impossible to use in a standard virtual environment setup.

What is your use case? What is your setup? If you pip install --editable . it's certainly usable in venv.

Thanks for looking at this! I don't have a concrete use case yet, but being able to bootstrap an environment from requirements.txt may be helpful (for me and others) instead of cloning the GitHub repository. That's pretty much the reason why Python projects are built into wheels and published on PyPI.

This is not critical to get merged, only if that's appropriate given the current circumstances. Many thanks!

@alanfranz
Copy link
Contributor

Thanks for looking at this! I don't have a concrete use case yet, but being able to bootstrap an environment from requirements.txt may be helpful (for me and others) instead of cloning the GitHub repository. That's pretty much the reason why Python projects are built into wheels and published on PyPI.

You can use github source in requirements.txt as well; but, myhoard is not a library. You should use it as an application; so, installing it from requirements in another virtualenv sound strange to me.

Technically, I don't think it's a real problem, it's more a matter of policy than anything else.

@alexey-tereshenkov-aiven
Copy link
Author

Thanks for looking at this! I don't have a concrete use case yet, but being able to bootstrap an environment from requirements.txt may be helpful (for me and others) instead of cloning the GitHub repository. That's pretty much the reason why Python projects are built into wheels and published on PyPI.

You can use github source in requirements.txt as well; but, myhoard is not a library. You should use it as an application; so, installing it from requirements in another virtualenv sound strange to me.

You may want to install your applications into a virtual environment as well e.g. with pipx. Totally agree everything is possible and installing from sources is a valid path, and having a wheel is not critical as I wrote before. It brings convenience and benefits for certain people and use cases and in general tidier than sources (you can query PyPI packages to see what is the Python version compatibility, have releases yanked, platform compatibility etc).

But please merge only if you deem this appropriate!

Technically, I don't think it's a real problem, it's more a matter of policy than anything else.

@jelmer
Copy link
Contributor

jelmer commented Jan 9, 2023

Anything left blocking this?

@alanfranz
Copy link
Contributor

Anything left blocking this?

  1. We don't know whether we need or want this. This is not a library.
  2. API token should be generated, then configured in github secrets.

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.

None yet

5 participants