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

poetry: Switch from using pipenv to poetry #81

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dkoston
Copy link

@dkoston dkoston commented Dec 8, 2023

This should be a seamless switch to using poetry for you. I assume you were using twine for https reasons when publishing? Poetry has you covered there but can still use twine if you want to.

You'll need to export PYPI_TOKEN and PYPI_TEST_TOKEN and then run make configure_pypi_publishing to get publishing to pypi and test.pypi.org set up.

@manchenkoff
Copy link
Owner

manchenkoff commented Dec 8, 2023

Hey @dkoston, thanks for the contribution! Makefile was used mostly for the development environment, that's why I used native commands in the pipelines. I have this planned, but didn't have time for migration 😄 so, I assume it will close #32.

I will try to review this PR in the next couple of days!

By the way, there is some build error related to poetry, would appreciate it if you could take a look in the meantime 👍

@manchenkoff manchenkoff self-assigned this Dec 8, 2023
@manchenkoff manchenkoff added the enhancement New feature or request label Dec 8, 2023
@dkoston
Copy link
Author

dkoston commented Dec 8, 2023

@manchenkoff no problem. I realized I used too old of a poetry version. Pushed fix. Will keep an eye on the build.

Have a PR coming that allows all IANA content types as well

@manchenkoff manchenkoff self-requested a review December 11, 2023 20:17
.github/workflows/build.yml Outdated Show resolved Hide resolved
.github/workflows/build.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
.github/workflows/upload.yml Show resolved Hide resolved
Makefile Show resolved Hide resolved
@@ -0,0 +1,33 @@
[tool.poetry]
name = "openapi3-parser"
version = "1.1.16"
Copy link
Owner

Choose a reason for hiding this comment

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

there might be slight issue with this version, previously it was set in __init__.py file that is used during publishing process to increment the package version on pypi. If poetry uses this version for a new package for upload, then we should remove redundant package metadata from init file

Copy link
Author

Choose a reason for hiding this comment

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

How is the version being bumped now? Is that part of gh-action-pypi-publish or manual?

Should for sure only have one source of truth. If automated, could replace with: https://py-pkgs.org/07-releasing-versioning.html#automatic-version-bumping

Copy link
Owner

Choose a reason for hiding this comment

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

For now, it's a manual thing, I have planned to automate it in the future (#33) and might follow your suggestion. Currently, the publishing process uses the version defined in setup.py, which comes from the init file.

Copy link
Author

Choose a reason for hiding this comment

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

Ah, poetry requires a version so I'll circle back when I can convert setup.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants