-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ENH] pip check #332
Comments
How exactly is There are a bunch of pip-related issues that will probably require some refactoring to address. Do you want me to submit these as individual tickets or collect them in one? Some issues I have noticed:
|
Coming back to point 4: is there any reason that one can't have
but it seems like it might be a reasonable idea to have anaconda-project create a conda environment with things like I hope to have more time to dive in and start trying to resolve some of these issues in the new year, but would like to collect information in the meantime. |
Would the requirements.txt scenario in PR #275 be close to what you're interested in? Perhaps have the anaconda-project.yml file define the python version to create the env and all other. Is pyproject.toml the correct filename for poetry dependencies? Since poetry has its own lock definition it seems reasonable to support it in anaconda-project like we do pip. I'm not sure what |
The Conda can use this for example (but Example configuration files# anaconda-project.yaml
name: test_env
channels:
- defaults
dependencies:
- python=3.9
- conda-forge::pyfftw
- pip
- pip:
- .[fftw] # pyproject.toml
[tool.poetry]
name = "test_env"
version = "0.0.1"
description = "Test for anaconda-project + poetry."
authors = ["Michael McNeil Forbes <[email protected]>"]
license = "MIT"
[tool.poetry.dependencies]
# Server dependencies
python = "^3.8|^3.9"
# Optional performance dependences: these need underlying libraries
pyFFTW = {version = "^0.12.0", optional = true}
# Tests
pytest = {version = "^6.2.5", optional = true}
[tool.poetry.extras]
fftw = [
"pyfftw",
]
tests = [
"pytest",
]
[tool.poetry.dev-dependencies]
memory-profiler = "^0.58.0"
line-profiler = "^3.2.6"
black = "^21.6b0"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api" mkdir test_env; touch test_env/__init__.py # A stub for the actual "package"
conda env create -f anaconda-project.yaml
conda activate test_env
python -c "import pyfftw;print(pyfftw.__version__)"
$ anaconda-project prepare
anaconda-project.yaml: invalid pip package specifier: .[fftw]
Unable to load the project. Nothing special for poetry here there. This will look in I don't think PR #275 helps - I have no problem using My main goal is to allow something like Poetry, which is very persnickety about pure python dependencies (leading to more robust packages), to manage these. From a user perspective, it would be great if Anaconda-Project could do all this, but I think that would probably make it much more complex and difficult to maintain. Thus the idea is to be able to use the work going into projects like Poetry to deal with subtle details of pure python dependencies, but enable additional managing of conda stuff where non-python libraries could be used. I still need to dive into the code to see how it currently works with pip, but it would probably best if there were some way to specify which tool will be used. (Poetry has some great features, but I still feel like there is a lot of uncertainty about if is really the "one way" forward, so from a maintenance perspective, I would probably not want to build much explicit poetry support into anaconda-project.) However, there is currently one issue: Anaconda Project is often used for development, but the |
I see. It seams reasonable to support You'll find a file called |
I've been catching up with conda-lock today and I see that a good portion of what you need is there. It appears as though any packages listed in pyrpoject.toml would attempt to be installed with conda, but I may be reading that part wrong. https://github.com/conda-incubator/conda-lock#pyprojecttoml |
There is growing suppport for running pip check as a test in conda-forge recipes. Currently this will fail due the handling of yaml packages.
The text was updated successfully, but these errors were encountered: