-
Notifications
You must be signed in to change notification settings - Fork 0
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
Convert to poetry #10
Conversation
Remove setup.py, add poetry, update README, update github workflow
This affects requests>=2.3.0,<2.31.0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one question about the pypi deploy
@@ -0,0 +1,46 @@ | |||
[tool.poetry] | |||
name = "ocs-archive" | |||
version = "0.2.10" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The setup.py deploy to pypi used the tagged version, but now you are explicitly setting the version here. Does this mean we have to be careful to keep this version in sync with the tagged version so it is deployed to pypi as the correct version now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought about this too - maybe we can do something like this?
We'd have a dummy placeholder in the pyproject.toml
, but then on tag we'd update it when pushing to PyPI. The downside of this is when the user installs it locally from the git repo, it would show them as having the dummy version installed. But realistically, most users are going to be installing it from PyPI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO, it's semantically more correct to keep the version in pyproject.toml
file and then commit & tag. Tags should be thought of as pointers to the complete source code w/ the versions included. To help avoid synchronization errors, I would create a manually trigger-able workflow that does that for us, e.g. sourcing it from poetry version -s
.
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -e .[tests] | ||
pip install coverage 'coveralls<3.3' | ||
python -m pip install 'poetry' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you were asking about conventions...something I've been thinking about is how to make sure we're using the same version of poetry here, locally and in the Dockerfile. I've been creating a poetry-requirements.txt
with poetry>1,<2
and then pip install -r poetry-requirements.txt
everywhere so that you don't have to repeat the version. Maybe something to consider for the other repos.
Thanks for the help, Jesus! (can't add him til he accepts the org invite)