Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Monas does not install optional dependencies for a local package #11

@AGiantSquid

Description

@AGiantSquid

If I run monas install --include pkgname, that command will not install the optional dependencies. If that project needs pytest, for example, I will not be able to run tests in that project until I navigate to the project, and run pip install .[test]

Describe the solution you'd like
The existing workflow isn't terrible, but there might be something better.

When you run monas with the --include flag, it is using a fnmatch to match the pattern.
I wonder if we could use a different flag to target a package in the more traditional way, like

monas install --local_pkg pkgname[test]

That command could check against the package name rather than the directory. If it matches a local package exactly (or on a normalized name), then it would install the local dependencies with -e, and then install the specified package with [test] brackets at the end (or whatever option was specified).

Another option would be to add a flag for optional dependencies to install

monas install --include pkgname --optional_dependencies test

and that would similarly add [test] to the install command for the packges that match the --include pattern

Open to thoughts.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions