Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Use Poetry for dependency management #122

Merged
merged 2 commits into from
Oct 27, 2023
Merged

Use Poetry for dependency management #122

merged 2 commits into from
Oct 27, 2023

Conversation

eloquence
Copy link
Member

@eloquence eloquence commented Sep 28, 2023

Status

Ready for review, but should not be merged until freedomofpress/securedrop-builder#467 and the changes in the poetry-support-with-proxy-changes in securedrop-builder are merged, after which we can drop the FIXME change from the CI config.

Description

This PR migrates the securedrop-proxy package to use Poetry for dependency management, consistent with our overall plan to use Poetry for most Python dependency management going forward. It also updates the documentation accordingly.

CI is red due to freedomofpress/securedrop-client#1681, which is unrelated to this change.

Test plan

The test plan in freedomofpress/securedrop-builder#467 verifies the basic workflow already: It asks the tester to install the dependencies via Poetry, and to add a dependency for testing purposes.

Beyond that, I would recommend testing the modified Makefile targets in this PR.

.circleci/config.yml Outdated Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

Nice :)

.circleci/config.yml Outdated Show resolved Hide resolved
.circleci/config.yml Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
README.md Show resolved Hide resolved
Makefile Outdated Show resolved Hide resolved
@eloquence
Copy link
Member Author

CI will now fail fully until freedomofpress/securedrop-builder#469 is merged.

We're installing the Poetry system package on Debian Bookworm -- that's
generally a preferable strategy going forward, and in fact, pip
will error out if you attempt to install it from PyPI. This
necessitates some conditional logic we can drop once we move fully
to Bookworm.
Copy link
Member

@legoktm legoktm left a comment

Choose a reason for hiding this comment

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

I squashed it down, overall LGTM! Waiting for CI, with the note that bookworm CI is expected to partially fail.

@legoktm legoktm merged commit 91056fd into main Oct 27, 2023
6 of 10 checks passed
@legoktm legoktm deleted the only-poetry branch October 27, 2023 19:29
legoktm added a commit to freedomofpress/securedrop-log that referenced this pull request Nov 3, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-log that referenced this pull request Nov 3, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-export that referenced this pull request Nov 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-export that referenced this pull request Nov 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-export that referenced this pull request Nov 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-export that referenced this pull request Nov 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Nov 13, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Nov 13, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Nov 13, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Nov 13, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Nov 13, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Dec 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
legoktm added a commit to freedomofpress/securedrop-client that referenced this pull request Dec 6, 2023
Switch dependency management to use poetry, which is much nicer than
pip-tools. This is largely based off of
<freedomofpress/securedrop-proxy#122> and
applies the same changes to the Makefile and CI.

The main difference is that we install PyQt5 via system packages, so the
two versions we specifically need are listed in pyproject.toml and vary
on the Python versions shipped with bullseye and bookworm.

We also don't actually need the pathlib2 dependency any more because
our Python version is high enough, so it's dropped now that poetry
is smart enough to detect it!
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants