Skip to content
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

Split selector logic into conda_build.selectors #5500

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kenodegard
Copy link
Contributor

@kenodegard kenodegard commented Sep 20, 2024

Description

While tinkering with #5495 I noticed a few local imports to avoid circular imports between conda_build.metadata and conda_build.variants. This is an artifact of how selectors evolved where originally they were purely a meta.yaml feature (hence why it was defined within conda_build.metadata) and over time were introduced for the conda_build_config.yaml file.

To better reflect the agnostic nature of selectors I propose moving the related logic into a new submodule:

old path new path
conda_build.metadata.ARCH_MAP conda_build.utils.ARCH_MAP
conda_build.metadata.get_selectors conda_build.selectors.get_selectors
conda_build.metadata.ns_cfg conda_build.selectors.get_selectors
conda_build.metadata.sel_pat conda_build.selectors.RE_SELECTOR
conda_build.metadata.parseNameNotFound conda_build.selectors.parse_NameError
conda_build.metadata.eval_selector conda_build.selectors.eval_selector
conda_build.metadata._split_line_selector conda_build.selectors._split_line_selector
conda_build.metadata.select_lines conda_build.selectors.select_lines

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?

@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Sep 20, 2024
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
Status: 🏗️ In Progress
Development

Successfully merging this pull request may close these issues.

3 participants