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

Replace sys.exit calls in conda_build/metadata.py #5371

Merged
merged 15 commits into from
Jul 8, 2024

Conversation

beeankha
Copy link
Member

@beeankha beeankha commented Jun 12, 2024

Description

Replacing sys.exit call in a few functions in conda_build/metadata.py with the new CondaBuildUserError exception for better error handling, along with corresponding unit tests.

The changes in this PR are separated out from work previously done by @kenodegard in #5255
Xref #4209

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?

@beeankha beeankha self-assigned this Jun 12, 2024
@conda-bot conda-bot added the cla-signed [bot] added once the contributor has signed the CLA label Jun 12, 2024
Copy link

codspeed-hq bot commented Jun 12, 2024

CodSpeed Performance Report

Merging #5371 will not alter performance

Comparing beeankha:sys.exit-select_lines (9d740b3) with main (c7a1e9b)

Summary

✅ 3 untouched benchmarks

@beeankha beeankha marked this pull request as ready for review June 17, 2024 15:52
@beeankha beeankha requested a review from a team as a code owner June 17, 2024 15:52
travishathaway
travishathaway previously approved these changes Jun 20, 2024
Comment on lines 57 to 60
sys.exit(
"Error: could not import yaml (required to read meta.yaml "
"files of conda recipes)"
)
Copy link
Member

Choose a reason for hiding this comment

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

Was that basically an implicit dependency? Do we require it now in meta.yml?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm surprised that it doesn't say "ruamel.yaml" but that package is certainly a regular dependency now.

Copy link
Member Author

Choose a reason for hiding this comment

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

It was previously an optional dependency but is currently listed as a requirement in meta.yml.

This particular code change is more "cleanup" vs "remove sys.exit" (per work originally done in this PR), so I will revert this change; once the broken-out parts of the "remove sys.exit calls" work are merged, the original PR will get rebased and will mostly focus on cleanup.

conda_build/metadata.py Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
conda_build/metadata.py Outdated Show resolved Hide resolved
@beeankha beeankha merged commit 87194f6 into conda:main Jul 8, 2024
28 checks passed
@beeankha beeankha mentioned this pull request Jul 16, 2024
55 tasks
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