-
Notifications
You must be signed in to change notification settings - Fork 1
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
build: make use of poetry
dependency groups
#152
Conversation
Poetry 1.2+ allows for dependency groups now. Three new groups were created to split up what used to be considered the `dev` dependencies. All three groups were made to be optional and will therefore require specifying during a `poetry install` command with the `--with` option. The `test` group includes packages needed to run the test suite. The `ci` group includes packages that are only used in the Continuous Integration (CI) environment, in GitHub workflows. The `qa` group includes (or will include, when there are more) packages related to ensuring Quality Assurance (QA) (e.g., with linting, formatting, and typing tools).
The lockfile was regenerated and updated to match the latest install of `poetry` and the updated `pyproject.toml` file.
The `export` command is now provided as a plugin. It is installed by default for the `poetry` v1.2 release, but future releases will deprecate this automatic install. Installing the plugin directly now does not harm the function of the plugin or cause any errors given that it may already be installed. This change is getting ahead of the future deprecation.
Phylum OSS Supply Chain Risk Analysis - SUCCESSThe Phylum risk analysis is complete and did not identify any issues. |
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.
Is test/ci/qa
just supersets/subsets of each other? I don't understand why one would want to make their testing setup so much more complicated for what seems to be like no benefit?
What do you gain other than saving 3kb of network traffic when running your CI?
It turns out that the project does not need to be installed in order for `poetry` to update the lockfile. Removing this step saves some workflow execution time.
The release notes for poetry 1.2 has a section on dependency groups that might help to explain some of this:
This PR makes the three new groups that were previously part of "dev-dependencies" optional so they will NOT be installed by default.
Agreed...which is how these are setup.
Since the transition to groups (and the use of new |
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.
This system definitely seems overly granular, though I suppose that's mostly a complaint against poetry and not this PR. So this should be good to go.
Poetry 1.2+ allows for dependency groups. Three new groups were created to split up what used to be considered the
dev
dependencies. All three groups were made to be optional and will therefore require specifying during apoetry install
command with the--with
option. Thetest
group includes packages needed to run the test suite. Theci
group includes packages that are only used in the Continuous Integration (CI) environment, in GitHub workflows. Theqa
group includes (or will include, when there are more) packages related to ensuring Quality Assurance (QA) (e.g., with linting, formatting, and typing tools).Additional actions taken:
tox
environments havetest
dependency group installedpoetry.lock
dependenciespoetry
and the updatedpyproject.toml
filelevenshtein
packageLevenshtein
poetry
, the lockfile was manually updated to change the case on this package to enable analysis completionpoetry-plugin-export
forexport
commandexport
command is now provided as a pluginpoetry
v1.2 release, but future releases will deprecate this automatic installCONTRIBUTING.md
to account for poetry dependency groupsCloses #15
Checklist
closes #<issueNum>
in description above)?auto_updates
andtest
workflows were exercised manually with the changes here and shown to work as expectedpreview
andrelease
workflows have essentially the same changes and will be verified when this branch is merged tomain
and included in a release, respectively