conda-merge icon indicating copy to clipboard operation
conda-merge copied to clipboard

Feature request: Command line option to specify new environment name

Open jemissik opened this issue 3 years ago • 3 comments
trafficstars

Description

Currently, if .yml files contain names, conda-merge will use the name from the last specified file for the name in the new .yml file. It would be nice to have an option to use a command line argument to specify a different name to be used in the new .yml file for a new environment.

Motivation

This way, the new environment .yml file wouldn't have a name that matched the name of an existing environment, and conda env create --file could be used without having to pass --name to it (and creating an environment with a name that doesn't match the name in the .yml file that was used to create the environment).

Steps to accomplish

I looked at the source code, and it seems like it would be fairly straightforward to add a --name argument to the parse_args function, and then handle the name in the merge_envs function if a name was passed in. I would be happy to implement this and submit a PR if you think it would be useful!

jemissik avatar Mar 14 '22 17:03 jemissik

Was this resolved?

Hanuphant avatar Apr 23 '22 19:04 Hanuphant

Hey, I missed that email. It wasn't resolved, and I'd be happy to get a PR @jemissik 😄

amitbeka avatar Apr 24 '22 19:04 amitbeka

I'll submit a PR for this :) My schedule is rather hectic over the next week and a half though, so it will probably be a couple of weeks before I can get to it.

jemissik avatar May 04 '22 15:05 jemissik