conda-forge / conda-forge-ci-setup-feedstock

A conda-smithy repository for conda-forge-ci-setup.
BSD 3-Clause "New" or "Revised" License
13 stars 53 forks source link

Don't fail run_conda_forge_build_setup when conda-forge.yml missing #151

Closed ryanvolz closed 3 years ago

ryanvolz commented 3 years ago

The run_conda_forge_build_setup scripts read from conda-forge.yml to get the channel_priority, defaulting to strict if the setting is missing. But if conda-forge.yml is missing completely, the script would fail because shyaml does not return the default when there is no YAML to parse at all. This fixes that by ensuring that "strict" is returned in those cases as well.

While conda-forge.yml would never normally be missing, if https://github.com/conda-forge/conda-smithy/pull/1469 is merged then it becomes possible to put the feedstock configuration in another file. If that is done, then the existing scripts will fail. With this fix, that change to conda-smithy becomes usable, even though it would be impossible to override channel_priority (possibilities for doing this could be explored later, if necessary). At any rate, this change doesn't hurt and could provide some extra robustness.

Checklist

conda-forge-linter commented 3 years ago

Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.