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

Convert to poetry #10

Merged
merged 6 commits into from
Oct 11, 2023
Merged

Convert to poetry #10

merged 6 commits into from
Oct 11, 2023

Conversation

mgdaily
Copy link
Contributor

@mgdaily mgdaily commented Aug 24, 2023

  • Uses poetry for dependency management
  • Constrain to python>=3.8
  • Update GH workflows
  • Update README

Thanks for the help, Jesus! (can't add him til he accepts the org invite)

Copy link
Member

@jnation3406 jnation3406 left a 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"
Copy link
Member

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?

Copy link
Contributor Author

@mgdaily mgdaily Aug 25, 2023

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

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'

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.

@mgdaily mgdaily merged commit 2eab62f into main Oct 11, 2023
8 of 9 checks passed
@mgdaily mgdaily deleted the fix/add-poetry branch October 11, 2023 17:56
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.

3 participants