-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Move conda env export
to conda export
#13577
Conversation
CodSpeed Performance ReportMerging #13577 will create unknown performance changesComparing Summary
|
d21d16a
to
ac16b24
Compare
conda env export
to conda export
commandconda env export
to conda export
command
tests/cli/test_main_export.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a duplicate of the conda env export
tests? can we combine them and parameterize the tests instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's been a little while since I touched this PR, but I'm pretty sure that the tests in tests/cli/test_main_export.py
are not duplicates of the conda env export
-related tests in tests/cli/test_env.py
; eventually once conda env export
is deprecated we can most likely move and update some of those related test_env.py
tests into test_main_export.py
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After thinking about it a bit more, I think it would be best to move the conda env export
-related tests from tests/cli/test_env.py
into test_main_export.py
; at the same time we could move some of the functions used in multiple tests (e.g. env_is_created
) into a test fixtures file so that they can be used in multiple places. In order to keep things as simple as possible, I'll do this work in a separate PR.
Co-authored-by: Ken Odegard <kodegard@anaconda.com>
conda env export
to conda export
commandconda env export
to conda export
command
c513fd4
to
949810b
Compare
@@ -43,7 +43,7 @@ def configure_parser(sub_parsers: _SubParsersAction | None, **kwargs) -> Argumen | |||
) | |||
main_env_config.configure_parser(env_parsers) | |||
main_env_create.configure_parser(env_parsers) | |||
main_env_export.configure_parser(env_parsers) | |||
main_export.configure_parser(env_parsers) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh! Yes! This is exactly what we want!
conda/cli/main_export.py
Outdated
filename = args.file | ||
# check for the proper file extension; otherwise when the export file is used later, | ||
# the user will get a file parsing error | ||
if not filename.endswith((".yml", ".yaml")): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use one of the yaml constants we already have defined? E.g.
conda/conda/common/configuration.py
Line 1310 in 6488061
YAML_EXTENSIONS = (".yml", ".yaml") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wasn't aware of this constant, thanks for pointing it out!
4584d0c
to
365e496
Compare
39a8839
to
4f279cf
Compare
conda env export
to conda export
commandconda env export
to conda export
Description
Related epic:
conda_env
intoconda
#11633Checklist - did you ...
news
directory (using the template) for the next release's release notes?