python-poetry / python-poetry/poetry
Ability to have poetry add git+https://... saves to current directory
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 34.3k
- Forks
- 2.5k
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 30
Description
- [x ] I have searched the issues of this repo and believe that this is not a duplicate.
- [x ] I have searched the documentation and believe that my question is not covered.
Feature Request
Various projects I am working on requires separation of code into multiple different modules (and hence repositories). I can do this with pip via pip install -e git+https://.../my-module.git and it saves it into src/my-module in editable mode.
https://github.com/boto/boto3/blob/develop/requirements.txt is an example I found that has this pattern, where botocore got imported into boto inside src/.
This is important during development because you can work on both code bases at the same time such as updating the logic in my-module while running integration tests in your main project.
This pattern is commonly used in PHP's composer with the --preferred-source flag (which is equivalent to editable mode). The package will be checked out as a git repo inside the vendor directory where you can make any necessary modifications etc independently of the main project.
I've been looking through the code and I can't seem to find a way to do this with poetry 1.0.5. Currently it does a git checkout into the venv's src/my-module as a headless commit. Alternatively, you can add with a path, but that requires 2 packages sitting side by side, which is not always the case for various development setup.
I was hoping #755 would solve this issue, but it addresses a different problem altogether.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the poetry add command and the current Git checkout behavior described in the issue, then compare it with pip's editable git+https installation. Determine how a repository should be placed in the current project and remain editable rather than being checked out under the virtual environment. Done means the requested dependency workflow is supported and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, python
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100