You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched open reports and couldn't find a duplicate
What happened?
Description:
When following the directions for setting a private repository with Poetry using the command (this requires the user to install poetry, which cumbersome, and not required to lock non conda dependencies):
The config.toml file is created at ~/Library/Preferences/pypoetry.
However, conda-lock expects this config to be located at ~/Library/Application Support/pypoetry (see link1, link2).
As a workaround, the user can set the POETRY_CONFIG_DIR environment variable to ~/Library/Application Support/pypoetry as described in the Poetry documentation.
However, it would be more convenient and less error-prone if conda-lock could recognize the [[tool.poetry.source]] section in the pyproject.toml file, where private repository configurations are usually set:
[[tool.poetry.source]]
name = "my_software"
url = "https://pypi.hello.com/hi/prod/+simple"
default = true
Possible Solutions:
Update conda-lock to recognize the [[tool.poetry.source]] section in pyproject.toml.
Provide a conda-lock poetry-config option to set the private repository configuration.
Recommend a specific version of Poetry that sets the configuration in the Application Support directory, which is the location expected by conda-lock.
Conda Info
active environment : /Users/lleavitt/git/oligo_designer/.frak-venv
active env location : /Users/lleavitt/git/oligo_designer/.frak-venv
shell level : 2
user config file : /Users/lleavitt/.condarc
populated config files : /Users/lleavitt/opt/mambaforge/.condarc
/Users/lleavitt/.condarc
conda version : 22.11.1
conda-build version : not installed
python version : 3.10.9.final.0
virtual packages : __archspec=1=x86_64
__osx=12.6.3=0
__unix=0=0
base environment : /Users/lleavitt/opt/mambaforge (writable)
conda av data dir : /Users/lleavitt/opt/mambaforge/etc/conda
conda av metadata url : None
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /Users/lleavitt/opt/mambaforge/pkgs
/Users/lleavitt/.conda/pkgs
envs directories : /Users/lleavitt/opt/mambaforge/envs
/Users/lleavitt/.conda/envs
platform : osx-64
user-agent : conda/22.11.1 requests/2.28.2 CPython/3.10.9 Darwin/21.6.0 OSX/12.6.3
UID:GID : 1643950885:317021483
netrc file : None
offline mode : False
this requires the user to install poetry, which cumbersome, and not required to lock non conda dependencies
Agreed.
However, conda-lock expects this config to be located at...
There have been some substantial updates to Poetry since we vendored it. It's due for an update (#310). In particular, recent versions of Poetry seem to be using user_config_path from the platformdirs package (as opposed to the functions from your links), which probably leads to the discrepancy you note.
However, it would be more convenient and less error-prone if conda-lock could recognize the [[tool.poetry.source]] section in the pyproject.toml file
Yes, there is some great work in this direction by @croth1-liveeo, sitting in the review queue at #353. It would be of great help if you could check out that branch and see if it already accomplishes what you have in mind, and to provide feedback there.
Checklist
What happened?
Description:
When following the directions for setting a private repository with
Poetry
using the command (this requires the user to install poetry, which cumbersome, and not required to lock non conda dependencies):The config.toml file is created at
~/Library/Preferences/pypoetry
.However, conda-lock expects this config to be located at
~/Library/Application Support/pypoetry
(see link1, link2).As a workaround, the user can set the
POETRY_CONFIG_DIR
environment variable to~/Library/Application Support/pypoetry
as described in the Poetry documentation.However, it would be more convenient and less error-prone if
conda-lock
could recognize the [[tool.poetry.source]] section in thepyproject.toml
file, where private repository configurations are usually set:Possible Solutions:
Update conda-lock to recognize the [[tool.poetry.source]] section in pyproject.toml.
Provide a conda-lock poetry-config option to set the private repository configuration.
Recommend a specific version of Poetry that sets the configuration in the Application Support directory, which is the location expected by conda-lock.
Conda Info
Conda Config
Conda list
Additional Context
No response
The text was updated successfully, but these errors were encountered: