-
Notifications
You must be signed in to change notification settings - Fork 370
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
fix: Export 'channels'
as part of environments' export
#3587
Conversation
@pytest.mark.parametrize("channel_subdir_flag", [None, "--channel-subdir"]) | ||
@pytest.mark.parametrize("md5_flag", [None, "--md5", "--no-md5"]) | ||
@pytest.mark.parametrize("explicit_flag", [None, "--explicit"]) | ||
@pytest.mark.parametrize("no_build_flag", [None, "--no-build", "--no-builds"]) | ||
@pytest.mark.parametrize("json_flag", [None, "--json"]) | ||
def test_env_export( | ||
export_env, json_flag, no_build_flag, explicit_flag, md5_flag, channel_subdir_flag | ||
channel_subdir_flag, md5_flag, explicit_flag, no_build_flag, json_flag, export_env |
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.
This is the order it is mentioned above, it's better to have the same order everywhere
else: | ||
ret = yaml.safe_load(output) | ||
# json is already parsed | ||
ret = output if json_flag else yaml.safe_load(output) |
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 think this is quite easy to read as a one-line
env export
'channels'
as part of environments' export
I think the CI failure is spurious and this can be merged |
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.
Thank you, @mathbunnyru!
If I run the following:
it will give me:
Note:
channels
,dependencies
are always printed, even if empty.But if I run
export
with--json
, it will not printchannels:
:I think it's always good to print
channels
, it makes parsing easier.Related: #3582