Skip to content

Commit bda385d

Browse files
committed
also move exclude into the policy section
1 parent 061479d commit bda385d

File tree

3 files changed

+28
-21
lines changed

3 files changed

+28
-21
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@ Check that the minimum dependency versions follow `xarray`'s policy.
77
To use the `minimum-dependency-versions` action in workflows, create a policy file (`policy.yaml`):
88

99
```yaml
10-
# these packages are completely ignored
11-
exclude:
12-
- package1
13-
- package2
14-
- ...
1510
channels:
1611
- conda-forge
1712
platforms:
@@ -27,6 +22,11 @@ policy:
2722
overrides:
2823
# override the policy for specific packages
2924
package3: 0.3.1
25+
# these packages are completely ignored
26+
exclude:
27+
- package1
28+
- package2
29+
- ...
3030
# these packages don't fail the CI, but will be printed in the report as a warning
3131
ignored_violations:
3232
- package4

minimum_versions.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
schema = {
2424
"type": "object",
2525
"properties": {
26-
"exclude": {"type": "array", "items": {"type": "string"}},
2726
"channels": {"type": "array", "items": {"type": "string"}},
2827
"platforms": {"type": "array", "items": {"type": "string"}},
2928
"policy": {
@@ -44,15 +43,22 @@
4443
},
4544
"additionalProperties": False,
4645
},
46+
"exclude": {"type": "array", "items": {"type": "string"}},
4747
"ignored_violations": {
4848
"type": "array",
4949
"items": {"type": "string", "pattern": "^[a-z][-a-z_]*$"},
5050
},
5151
},
52-
"required": ["packages", "default", "overrides", "ignored_violations"],
52+
"required": [
53+
"packages",
54+
"default",
55+
"overrides",
56+
"exclude",
57+
"ignored_violations",
58+
],
5359
},
5460
},
55-
"required": ["exclude", "channels", "platforms", "policy"],
61+
"required": ["channels", "platforms", "policy"],
5662
}
5763

5864

@@ -161,7 +167,7 @@ def parse_policy(file):
161167
return Policy(
162168
channels=policy["channels"],
163169
platforms=policy["platforms"],
164-
exclude=policy["exclude"],
170+
exclude=package_policy["exclude"],
165171
package_months=package_policy["packages"],
166172
default_months=package_policy["default"],
167173
ignored_violations=package_policy["ignored_violations"],

policy.yaml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
# these packages are completely ignored
2-
exclude:
3-
- coveralls
4-
- pip
5-
- pytest
6-
- pytest-asyncio
7-
- pytest-cov
8-
- pytest-env
9-
- pytest-mypy-plugins
10-
- pytest-timeout
11-
- pytest-xdist
12-
- pytest-hypothesis
131
channels:
142
- conda-forge
153
platforms:
@@ -21,7 +9,20 @@ policy:
219
python: 30
2210
numpy: 18
2311
default: 12
12+
# overrides for the policy
2413
overrides: {}
14+
# these packages are completely ignored
15+
exclude:
16+
- coveralls
17+
- pip
18+
- pytest
19+
- pytest-asyncio
20+
- pytest-cov
21+
- pytest-env
22+
- pytest-mypy-plugins
23+
- pytest-timeout
24+
- pytest-xdist
25+
- pytest-hypothesis
2526
# these packages don't fail the CI, but will be printed in the report
2627
ignored_violations:
2728
- pydap

0 commit comments

Comments
 (0)