Skip to content

Commit f011061

Browse files
committed
include the policy file in the readme
1 parent 1007c10 commit f011061

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

README.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,35 @@ Check that the minimum dependency versions follow `xarray`'s policy.
44

55
## Usage
66

7-
To use the `minimum-dependency-versions` action in workflows, simply add a new step:
7+
To use the `minimum-dependency-versions` action in workflows, create a policy file (`policy.yaml`):
8+
9+
```yaml
10+
# these packages are completely ignored
11+
exclude:
12+
- package1
13+
- package2
14+
- ...
15+
channels:
16+
- conda-forge
17+
platforms:
18+
- noarch
19+
- linux-64
20+
policy:
21+
# policy in months
22+
# Example is xarray's values
23+
packages:
24+
python: 30
25+
numpy: 18
26+
default: 12
27+
overrides:
28+
# override the policy for specific packages
29+
package3: 0.3.1
30+
# these packages don't fail the CI, but will be printed in the report as a warning
31+
ignored_violations:
32+
- package4
33+
```
34+
35+
then add a new step to CI:
836
937
```yaml
1038
jobs:
@@ -14,6 +42,7 @@ jobs:
1442
...
1543
- uses: xarray-contrib/minimum-dependency-versions@version
1644
with:
45+
policy: policy.yaml
1746
environment-paths: path/to/env.yaml
1847
```
1948

0 commit comments

Comments
 (0)