rapidsai / dependency-file-generator

https://pypi.org/project/rapids-dependency-file-generator/
Apache License 2.0
15 stars 13 forks source link

Generated environments need unique names #6

Closed bdice closed 1 year ago

bdice commented 2 years ago

The generated conda environment files have names like name: all_cuda-115_arch-x86_64. If I install this environment with conda, it is not clear whether the dependency list came from rmm or cudf or another library, and the names will conflict between libraries.

We should make these names unique, perhaps by including a name: field in the dependencies.yaml file that contains a string like "rmm" or "cudf". Then the generated environments would be named like rmm_all_cuda-115_arch-x86_64.

(Also as a side note, we can't parse the file names / environment names to retrieve the matrix values because the underscore separator is used in x86_64, making it impossible to split on _. 🙃)

bdice commented 2 years ago

I guess we're currently working around this by specifying a name like conda env create --name cudf_dev --file conda/environments/all_cuda-115_arch-x86_64.yaml in the CONTRIBUTING/README files.

ajschmidt8 commented 2 years ago

Good points. I think we can do the following to address these:

Thoughts?

bdice commented 2 years ago

The key conda_env_prefix would be fine. I'd specify it at the same level as the conda_dir.

Two underscores feels awkward... hmm. I can't remember why I wanted to parse the output file name, but maybe it doesn't matter. There aren't a lot of great separator characters besides - or _.

ajschmidt8 commented 2 years ago

There aren't a lot of great separator characters besides - or _.

That's what I was thinking. So what's the verdict here? Should we just leave it? or should be adopt __? I'm indifferent

ajschmidt8 commented 2 years ago

The key conda_env_prefix would be fine. I'd specify it at the same level as the conda_dir.

How about a top-level key and a conda_dir level key? With the conda_dir level key taking precedence.

This way we wouldn't have to write conda_env_prefix in every files entry if it doesn't change.

bdice commented 2 years ago

This way we wouldn't have to write conda_env_prefix in every files entry if it doesn't change.

I don’t see how the top level would be useful. For repos with multiple projects like cudf and dask-cudf, this key would need to be customized for each project. I don’t see when I wouldn’t override the top level key.

bdice commented 2 years ago

So what's the verdict here? Should we just leave it? or should be adopt __? I'm indifferent

Let’s leave the status quo unless/until it becomes a problem for some real use case.

bdice commented 1 year ago

I no longer think this is an important need. Closing.