Monas does not install optional dependencies for a local package
- Dominant language
- Python
- Stars
- 77
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
Research direction
Start by tracing the `monas install --include` workflow and how it matches local packages. Compare the proposed `--local_pkg pkgname[test]` and `--optional_dependencies test` entry points, then clarify which behavior should be implemented. Done should mean that a selected local package's requested optional dependencies are installed without navigating into the project.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100