Skip to content

Conversation

soapy1
Copy link
Contributor

@soapy1 soapy1 commented Jul 3, 2025

Description

This PR fixes the EnvironmentConfig model so that the channel_settings field is a list of dict instead of a dict.

From the context object, channel settings are defined as:

channel_settings = ParameterLoader(
        SequenceParameter(MapParameter(PrimitiveParameter("", element_type=str)))
    )

A single channel setting takes the form:

{
  "channel": channel_name,
  "param": value,
}

So, merging channel settings should also merge these dicts, based on matching channel keys.

Checklist - did you ...

  • Add a file to the news directory (using the template) for the next release's release notes?
  • Add / update necessary tests?
  • Add / update outdated documentation?

@github-project-automation github-project-automation bot moved this to 🆕 New in 🔎 Review Jul 3, 2025
@soapy1 soapy1 force-pushed the channel-settings-is-list branch from 78dbb79 to 3060d52 Compare July 3, 2025 16:10
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jul 3, 2025
@soapy1
Copy link
Contributor Author

soapy1 commented Jul 3, 2025

pre-commit.ci autofix

@soapy1 soapy1 marked this pull request as ready for review July 3, 2025 16:12
@soapy1 soapy1 requested a review from a team as a code owner July 3, 2025 16:12
@soapy1 soapy1 force-pushed the channel-settings-is-list branch 2 times, most recently from 669a226 to e5b3cf1 Compare July 3, 2025 16:28
Copy link

codspeed-hq bot commented Jul 3, 2025

CodSpeed Instrumentation Performance Report

Merging #14984 will not alter performance

Comparing soapy1:channel-settings-is-list (68bed0c) with main (8665808)

Summary

✅ 21 untouched benchmarks

@soapy1 soapy1 force-pushed the channel-settings-is-list branch from e5b3cf1 to 5aa3cd1 Compare July 3, 2025 16:45
jaimergp
jaimergp previously approved these changes Jul 4, 2025
Copy link
Contributor

@jaimergp jaimergp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Couple of extra newlines that need to be removed, but looks good otherwise!

@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Approved in 🔎 Review Jul 4, 2025
jaimergp
jaimergp previously approved these changes Jul 6, 2025
jezdez
jezdez previously approved these changes Jul 8, 2025
Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated it a little to use functools/itertools

@jezdez jezdez changed the title channel_settings is a list of dicts, not a dict Fix channel_settings since it's a list of dicts, not a dict Jul 8, 2025
@jezdez jezdez enabled auto-merge (squash) July 8, 2025 10:58
jezdez
jezdez previously approved these changes Jul 8, 2025
@jezdez
Copy link
Member

jezdez commented Jul 8, 2025

pre-commit.ci autofix

jezdez
jezdez previously approved these changes Jul 8, 2025
@soapy1 soapy1 force-pushed the channel-settings-is-list branch from 3831beb to a8a959e Compare July 8, 2025 15:58
@jezdez
Copy link
Member

jezdez commented Jul 8, 2025

this undoes my changes to this PR

@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏗️ In Progress in 🔎 Review Jul 8, 2025
@soapy1
Copy link
Contributor Author

soapy1 commented Jul 8, 2025

this undoes my changes to this PR

Ah, that's my bad. I rebased to fix merge conflicts. Sorry about that

@jezdez jezdez force-pushed the channel-settings-is-list branch from 3600b7e to 49ac93d Compare July 8, 2025 16:37
soapy1 and others added 6 commits July 8, 2025 09:43
Channel settings should be merged with like "channels".
Co-authored-by: jaimergp <jaimergp@users.noreply.github.com>
…proved readability and efficiency. The new implementation simplifies the construction of the result list by using a dictionary comprehension.
@soapy1 soapy1 force-pushed the channel-settings-is-list branch from 49ac93d to 32781b0 Compare July 8, 2025 16:45
@soapy1 soapy1 force-pushed the channel-settings-is-list branch from 32781b0 to 2b7add2 Compare July 8, 2025 17:09
@github-project-automation github-project-automation bot moved this from 🏗️ In Progress to ✅ Approved in 🔎 Review Jul 8, 2025
@jezdez jezdez merged commit dbc5b07 into conda:main Jul 8, 2025
75 checks passed
@github-project-automation github-project-automation bot moved this from ✅ Approved to 🏁 Done in 🔎 Review Jul 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed [bot] added once the contributor has signed the CLA
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants