Skip to content

Commit 38a7a5c

Browse files
committed
initial commit
0 parents  commit 38a7a5c

File tree

6 files changed

+118
-0
lines changed

6 files changed

+118
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.prettier_cache

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- repo: https://github.com/psf/black
8+
rev: 24.10.0
9+
hooks:
10+
- id: black
11+
- repo: https://github.com/astral-sh/ruff-pre-commit
12+
rev: v0.7.3
13+
hooks:
14+
- id: ruff
15+
args: ["--fix"]
16+
- repo: https://github.com/rbubley/mirrors-prettier
17+
rev: v3.3.3
18+
hooks:
19+
- id: prettier
20+
args: ["--cache-location=.prettier_cache"]
21+
- repo: https://github.com/ComPWA/taplo-pre-commit
22+
rev: v0.9.3
23+
hooks:
24+
- id: taplo-format
25+
args: ["--option", "array_auto_collapse=false"]
26+
- id: taplo-lint
27+
args: ["--no-schema"]
28+
- repo: https://github.com/abravalheri/validate-pyproject
29+
rev: v0.22
30+
hooks:
31+
- id: validate-pyproject
32+
33+
ci:
34+
autofix_prs: true
35+
autoupdate_schedule: monthly

LICENSE

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Apache Software License 2.0
2+
3+
Copyright (c) 2024, Minimum dependency versions developers
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.

README.md

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# minimum-dependency-versions
2+
3+
Check that the minimum dependency versions follow `xarray`'s policy.
4+
5+
## Usage
6+
7+
To use the `minimum-dependency-versions` action in workflows, simply add a new step:
8+
9+
```yaml
10+
jobs:
11+
my-job:
12+
...
13+
14+
- uses: xarray-contrib/minimum-dependency-versions@version
15+
with:
16+
...
17+
```

action.yaml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: "minimum-dependency-versions"
2+
description: >-
3+
Check that the minimum dependency versions follow `xarray`'s policy.
4+
inputs:
5+
environment-paths:
6+
description: >-
7+
The paths to the environment files
8+
required: True
9+
outputs: {}
10+
11+
runs:
12+
using: "composite"
13+
steps: {}

pyproject.toml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[tool.ruff]
2+
target-version = "py39"
3+
builtins = ["ellipsis"]
4+
exclude = [
5+
".git",
6+
".eggs",
7+
"build",
8+
"dist",
9+
"__pycache__",
10+
]
11+
line-length = 100
12+
13+
[tool.ruff.lint]
14+
ignore = [
15+
"E402", # E402: module level import not at top of file
16+
"E501", # E501: line too long - let black worry about that
17+
"E731", # E731: do not assign a lambda expression, use a def
18+
# ignore for now, fix in a later PR
19+
"E722", # bare except
20+
"UP031", # percent-based string interpolation
21+
]
22+
select = [
23+
"F", # Pyflakes
24+
"E", # Pycodestyle
25+
"I", # isort
26+
"UP", # Pyupgrade
27+
"TID", # flake8-tidy-imports
28+
"W",
29+
]
30+
extend-safe-fixes = [
31+
"TID252", # absolute imports
32+
]
33+
fixable = ["I", "TID252"]
34+
35+
[tool.ruff.lint.flake8-tidy-imports]
36+
# Disallow all relative imports.
37+
ban-relative-imports = "all"

0 commit comments

Comments
 (0)