Use the default virtualenvs.in-project
of the developer
#4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR removes the poetry.toml file that forces the
virtualenvs.in-project = true
setting for poetry.
For my local development, I prefer to respect the default setting on my machine, which is set to
virtualenvs.in-project = null
In that way, when I run poetry install, the virtual environment is created under
Users/peter_v/Library/Caches/pypoetry/virtualenvs
.For the CI/CD (Github actions), it may be needed to have these files in a .venv in the working directory (also for the caching), but that is actually forced by this setting, if I understand correctly.
https://github.com/avsthiago/kopylot/blob/main/.github/actions/setup-poetry-env/action.yml#L21
So, if possible, I would prefer to not "force" the setting of virtualenvs.in-project = true on the developers and respect the default setting on their machine. But maybe there are other reasons why the current usage of virtualenvs.in-project = true is needed or is better.
Tested on command line and in PyCharm. I had to put the .python-version of #3 temporarily in place to install a 3.11 version (that I prefer for this project).
Also tested a fresh load in PyCharm (forget the previously loaded interpreters first to avoid general confusion in PyCharm) and that works perfectly (shows "Poetry (kopylot) [Python 3.11.2]").
FYI, all tests are run on Mac M1, without using Docker.