From 1df2fc3a0a0d1202e7d47a22b2c647c7cc62ee30 Mon Sep 17 00:00:00 2001 From: Mathias Hauser Date: Wed, 10 Sep 2025 14:22:27 +0200 Subject: [PATCH 1/3] document optional `overrides`, `exclude` and `ignored_validations` --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 69ac401..41aaa40 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,16 @@ policy: - package4 ``` +if there are no packages with `overrides`, `exclude`, or `ignored_violations`, you can set +them to an empty dictionary or list, respectively: + +```yaml + ... + overrides: {} + exclude: [] + ignored_violations: [] +``` + then add a new step to CI: ```yaml From e4f3c87e3be9ce3a4d53fd3ed019470659414816 Mon Sep 17 00:00:00 2001 From: Mathias Hauser Date: Wed, 10 Sep 2025 14:22:38 +0200 Subject: [PATCH 2/3] add test --- .github/workflows/ci.yml | 8 +++++++- policy_no_extra_options.yaml | 14 ++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 policy_no_extra_options.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c911e61..09197c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,14 +50,20 @@ jobs: envs/env1.yaml envs/env2.yaml expected-failure: ["false"] + policy-file: ["policy.yaml"] include: - env-paths: | envs/failing-env1.yaml + policy-file: "policy.yaml" expected-failure: "true" - env-paths: | envs/env1.yaml envs/failing-env1.yaml + policy-file: "policy.yaml" expected-failure: "true" + - env-paths: "envs/env1.yaml" + policy-file: policy_no_extra_options.yaml + expected-failure: "false" steps: - name: clone the repository @@ -67,7 +73,7 @@ jobs: id: action-run continue-on-error: true with: - policy: policy.yaml + policy: ${{ matrix.policy-file }} environment-paths: ${{ matrix.env-paths }} today: 2024-12-20 - name: detect outcome diff --git a/policy_no_extra_options.yaml b/policy_no_extra_options.yaml new file mode 100644 index 0000000..b89a03f --- /dev/null +++ b/policy_no_extra_options.yaml @@ -0,0 +1,14 @@ +channels: + - conda-forge +platforms: + - noarch + - linux-64 +policy: + # all packages in months + packages: + python: 30 + numpy: 18 + default: 12 + overrides: {} + exclude: [] + ignored_violations: [] From 73b940f3c5a9bd1f9f019f414cce0361789543c0 Mon Sep 17 00:00:00 2001 From: Mathias Hauser Date: Wed, 10 Sep 2025 17:06:51 +0200 Subject: [PATCH 3/3] Apply suggestions from code review Co-authored-by: Justus Magin --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 41aaa40..62b3fba 100644 --- a/README.md +++ b/README.md @@ -32,8 +32,8 @@ policy: - package4 ``` -if there are no packages with `overrides`, `exclude`, or `ignored_violations`, you can set -them to an empty dictionary or list, respectively: +If there are no packages with `overrides`, `exclude`, or `ignored_violations`, you can set +them to an empty mapping or sequence, respectively: ```yaml ... @@ -42,7 +42,7 @@ them to an empty dictionary or list, respectively: ignored_violations: [] ``` -then add a new step to CI: +Then add a new step to CI: ```yaml jobs: