Closed hohlb closed 4 years ago
anaconda-project is already stable; it rarely needs a new release because it changes only rarely -- it just keeps on working happily! :-) As you might guess from the name, anaconda-project is used in some of Anaconda's commercial products, which end up installed at external sites for many years, so there is no way we would delete this library or leave it in a broken state. So it should be safe to use and rely on it.
If you want to be as future-proof as possible, you can use the techniques illustrated at examples.pyviz.org for capturing your projects with anaconda-project in a way that is already fully compatible with conda environment files, so that your environments can be recreated using conda even without anaconda-project itself.
That said, I agree that having this functionality as part of conda itself would be very desirable, so that all users could capture reproducible projects without having to install anaconda-project separately. I'm working to make that happen, but it's a slow process of getting a lot of people to agree on a very specific set of supported functionality and syntax that can then always be a part of conda. Whether or not that ever happens, it should be safe to use anaconda-project, because if and when such functionality is brought into conda proper, anaconda-project will still remain available indefinitely. And if it does happen, I would expect it to be much easier to take your anaconda-project.yml specification and turn it into whatever syntax Conda ends up supporting for projects than if you had never captured your projects reproducibly initially. So, yes, use anaconda-project! :-)
Thanks so much for the comprehensive insights! I will be happy to use it, cheers :-)
Just for future readers, the technique illustrated at examples.pyviz.org is to use repeat the packages:
node using the YAML syntax &pkgs
for an anchor and *pkgs
for the reference:
# anaconda-project.yaml
...
packages: &pkgs
- python=3.9
...
dependencies: *pkgs # Repeated node
This allows you to use your anaconda-project.yaml
file as an environment.yaml
file, for example, on Read the Docs.
(It would be very nice if this simple usage was included in the docs.)
Unfortunately, you also have to duplicate those references in any other environments defined in that file, e.g. for testing, as illustrated in some but possibly not all of the anaconda-project.yml files at examples.pyviz.org. Doing that can get messy, and the error messages if you don't do it consistently can be very confusing.
Since I believe anaconda-project 0.8.4, anaconda-project accepts an environment.yml file as-is, even without those references. As long as you can be sure that you are using 0.8.4 or later, I'd strongly recommend not doing the reference trick that we are using at examples.pyviz.org, and once we are sure that 0.8.4 or later is installed everywhere we think people are using examples.pyviz.org projects, we'll remove the reference trick so that the .yml files are easier to understand. At that point the anaconda-project docs should probably all be updated to say dependencies
rather than packages
, and then files can simply be compatible between conda environments and anaconda-projects.
@jbednar Thanks! Much cleaner:
# anaconda-project.yaml
...
#packages: Call this "dependencies:" if you have anaconda-project>=0.8.4
dependencies:
- python=3.9
...
Hi,
Thank you for creating this project, it is definitly needed!
I am trying to decide if I should use it in my projects. Could you tell me what you think is the status of this project? There was no new release since over 6 months. Your reply would help me to potentially avoid investing time using a discontinued project.
There are similar open issues in the
conda
project. Can you estimate if and whenanaconda-project
will be stable or even part ofconda
itself?Thank you for your help.