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

Support outputs in hint_noarch_python_use_python_min, also fix if/then/else flattening for non-list clauses #2218

Merged
merged 8 commits into from
Jan 15, 2025

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented Jan 14, 2025

Checklist

  • Added a news entry
  • Regenerated schema JSON if schema altered (python conda_smithy/schema.py)

Add support for checking python_min use in multi-output recipes (#2188). This involves some minimal refactoring to move shared code into common functions.

While at it, accidentally discovered a bug that the following dependency:

- if: foo
  then: bar
  else: baz

would be incorrectly flattened (bar would be iterated over as a list).

Fix the outdated message in assertion for no hints
in `hint_noarch_python_use_python_min` tests.  The tests no longer
correctly failed if the check produced hints, since the message was
changed.  Instead, assert on plain `python_min` substring, as that
is unlikely to ever disappear.
Check all `noarch: python` outputs for missing `{{ python_min }}` usage.
Move the code for grabbing test dependencies from v0 and v1 recipes
to a common function in `conda_smithy.linter.utils`.

Fixes conda-forge#2188
Fix flattening v1 `if/then/else` blocks where the `then` or `else`
clauses are immediate strings rather than sublists, e.g.:

```
- if: foo
  then: bar
  else: baz
```
@mgorny mgorny requested a review from a team as a code owner January 14, 2025 19:55
Copy link
Member

@beckermr beckermr left a comment

Choose a reason for hiding this comment

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

A few more random things.

@beckermr
Copy link
Member

pre-commit.ci autofix

@beckermr beckermr enabled auto-merge (squash) January 15, 2025 15:13
@beckermr beckermr merged commit 218453b into conda-forge:main Jan 15, 2025
2 checks passed
@mgorny mgorny deleted the hint-python-min-outputs branch January 15, 2025 15:24
@mgorny
Copy link
Contributor Author

mgorny commented Jan 15, 2025

Thanks. Just wanted to say it's always a pleasure working with you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants