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

install only given dev dependency #3623

Closed
wants to merge 1 commit into from

Conversation

finswimmer
Copy link
Member

@finswimmer finswimmer commented Jan 30, 2021

This PR introduce a new option --dev for the poetry install command. Instead of installing all development dependencies, one can use this option, to limit the installation to the given dev dependencies. --dev can be used together with --dev-only to decide, whether the dev dependencies should be installed together with the package or without.

Closes: #3570

Pull Request Check List

  • Added tests for changed code.
  • Updated documentation for changed code.

@finswimmer finswimmer marked this pull request as ready for review January 30, 2021 20:34
@finswimmer finswimmer requested a review from a team January 30, 2021 20:34
@finswimmer finswimmer added the kind/feature Feature requests/implementations label Jan 30, 2021
@sdispater
Copy link
Member

I think it would be better to wait for the implementation of the dependency groups before we go this route.

Poetry was never about installing single dependencies separately but always about managing groups of dependencies consistently.

Also, it could lead to option bloat and confusion which defeats the simplicity purpose of Poetry.

@jcmdln
Copy link

jcmdln commented Mar 31, 2021

I think rather than providing yet another option, it would be better for poetry install to accept arguments much like how poetry add works, but only refers to packages defined in poetry.lock if it exists. Alternatively, poetry add could add some invariant option to --lock where it only adds a package based on a lockfile.

Dependency groups look nice but are overkill for parallelized jobs where you want to run one utility, like mypy, without having to install a bunch of other dependencies. The solution to that with dependency groups would be to assign something to multiple groups, one with the package name and another in a broader ci group or something if desired, but I'd rather have one less explicit location to declare since my tests are wrapped with tox anyway.

@finswimmer
Copy link
Member Author

Closing this in favor of dependency-groups #4260

@finswimmer finswimmer closed this Aug 3, 2021
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poetry install dependencies/dev-dependencies from lock file
3 participants