Skip to content

Commit 522e28d

Browse files
committed
Add prettier pre-commit hook
1 parent 9147783 commit 522e28d

26 files changed

+575
-533
lines changed

.binder/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ dependencies:
1616
- h5py
1717
- hdf5
1818
- iris
19-
- lxml # Optional dep of pydap
19+
- lxml # Optional dep of pydap
2020
- matplotlib
2121
- nc-time-axis
2222
- netcdf4

.codecov.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ coverage:
1010
flags:
1111
- unittests
1212
paths:
13-
- "!xarray/tests/"
13+
- "!xarray/tests/"
1414
unittests:
1515
target: 90%
1616
flags:

.github/dependabot.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
version: 2
22
updates:
3-
- package-ecosystem: 'github-actions'
4-
directory: '/'
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
55
schedule:
66
# Check for updates once a week
7-
interval: 'weekly'
7+
interval: "weekly"
88
groups:
99
actions:
1010
patterns:

.github/workflows/benchmarks-last-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ jobs:
2424
- name: Set up conda environment
2525
uses: mamba-org/setup-micromamba@v2
2626
with:
27-
micromamba-version: '1.5.10-0'
27+
micromamba-version: "1.5.10-0"
2828
environment-file: ${{env.CONDA_ENV_FILE}}
2929
environment-name: xarray-tests
3030
cache-environment: true
3131
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
3232
create-args: >-
3333
asv
3434
35-
- name: 'Get Previous tag'
35+
- name: "Get Previous tag"
3636
id: previoustag
3737
uses: "WyriHaximus/github-action-get-previous-tag@v1"
3838
# with:

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: Set up conda environment
2828
uses: mamba-org/setup-micromamba@v2
2929
with:
30-
micromamba-version: '1.5.10-0'
30+
micromamba-version: "1.5.10-0"
3131
environment-file: ${{env.CONDA_ENV_FILE}}
3232
environment-name: xarray-tests
3333
cache-environment: true
@@ -38,7 +38,6 @@ jobs:
3838
python-build
3939
mamba<=1.5.10
4040
41-
4241
- name: Run benchmarks
4342
shell: bash -l {0}
4443
id: benchmark

.github/workflows/hypothesis.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,12 @@ jobs:
3737
runs-on: "ubuntu-latest"
3838
needs: detect-ci-trigger
3939
if: |
40-
always()
41-
&& (
42-
needs.detect-ci-trigger.outputs.triggered == 'false'
43-
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
44-
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
45-
)
40+
always()
41+
&& (
42+
needs.detect-ci-trigger.outputs.triggered == 'false'
43+
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
44+
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
45+
)
4646
defaults:
4747
run:
4848
shell: bash -l {0}
@@ -92,8 +92,8 @@ jobs:
9292
if: success()
9393
id: status
9494
run: |
95-
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
96-
--report-log output-${{ matrix.python-version }}-log.jsonl
95+
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
96+
--report-log output-${{ matrix.python-version }}-log.jsonl
9797
9898
# explicitly save the cache so it gets updated, also do this even if it fails.
9999
- name: Save cached hypothesis directory

.github/workflows/pypi-release.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
- published
66
push:
77
tags:
8-
- 'v*'
8+
- "v*"
99

1010
jobs:
1111
build-artifacts:
@@ -93,7 +93,6 @@ jobs:
9393
repository_url: https://test.pypi.org/legacy/
9494
verbose: true
9595

96-
9796
upload-to-pypi:
9897
needs: test-built-dist
9998
if: github.event_name == 'release'

.github/workflows/upstream-dev-ci.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,12 @@ jobs:
4343
env:
4444
ZARR_V3_EXPERIMENTAL_API: 1
4545
if: |
46-
always()
47-
&& (
48-
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
49-
|| needs.detect-ci-trigger.outputs.triggered == 'true'
50-
|| contains( github.event.pull_request.labels.*.name, 'run-upstream')
51-
)
46+
always()
47+
&& (
48+
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
49+
|| needs.detect-ci-trigger.outputs.triggered == 'true'
50+
|| contains( github.event.pull_request.labels.*.name, 'run-upstream')
51+
)
5252
defaults:
5353
run:
5454
shell: bash -l {0}
@@ -101,10 +101,10 @@ jobs:
101101
runs-on: ubuntu-latest
102102
needs: detect-ci-trigger
103103
if: |
104-
always()
105-
&& (
106-
contains( github.event.pull_request.labels.*.name, 'run-upstream')
107-
)
104+
always()
105+
&& (
106+
contains( github.event.pull_request.labels.*.name, 'run-upstream')
107+
)
108108
defaults:
109109
run:
110110
shell: bash -l {0}

.pre-commit-config.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# https://pre-commit.com/
22
ci:
3-
autoupdate_schedule: monthly
4-
autoupdate_commit_msg: 'Update pre-commit hooks'
3+
autoupdate_schedule: monthly
4+
autoupdate_commit_msg: "Update pre-commit hooks"
55
repos:
66
- repo: https://github.com/pre-commit/pre-commit-hooks
77
rev: v5.0.0
@@ -25,7 +25,7 @@ repos:
2525
- id: text-unicode-replacement-char
2626
- repo: https://github.com/astral-sh/ruff-pre-commit
2727
# Ruff version.
28-
rev: 'v0.7.2'
28+
rev: v0.7.2
2929
hooks:
3030
- id: ruff-format
3131
- id: ruff
@@ -36,6 +36,10 @@ repos:
3636
- id: blackdoc
3737
exclude: "generate_aggregations.py"
3838
additional_dependencies: ["black==24.8.0"]
39+
- repo: https://github.com/rbubley/mirrors-prettier
40+
rev: v3.3.3
41+
hooks:
42+
- id: prettier
3943
- repo: https://github.com/pre-commit/mirrors-mypy
4044
rev: v1.13.0
4145
hooks:
@@ -57,4 +61,4 @@ repos:
5761
- repo: https://github.com/citation-file-format/cff-converter-python
5862
rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
5963
hooks:
60-
- id: validate-cff
64+
- id: validate-cff

CITATION.cff

Lines changed: 94 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,94 @@
11
cff-version: 1.2.0
22
message: "If you use this software, please cite it as below."
33
authors:
4-
- family-names: "Hoyer"
5-
given-names: "Stephan"
6-
orcid: "https://orcid.org/0000-0002-5207-0380"
7-
- family-names: "Roos"
8-
given-names: "Maximilian"
9-
- family-names: "Joseph"
10-
given-names: "Hamman"
11-
orcid: "https://orcid.org/0000-0001-7479-8439"
12-
- family-names: "Magin"
13-
given-names: "Justus"
14-
orcid: "https://orcid.org/0000-0002-4254-8002"
15-
- family-names: "Cherian"
16-
given-names: "Deepak"
17-
orcid: "https://orcid.org/0000-0002-6861-8734"
18-
- family-names: "Fitzgerald"
19-
given-names: "Clark"
20-
orcid: "https://orcid.org/0000-0003-3446-6389"
21-
- family-names: "Hauser"
22-
given-names: "Mathias"
23-
orcid: "https://orcid.org/0000-0002-0057-4878"
24-
- family-names: "Fujii"
25-
given-names: "Keisuke"
26-
orcid: "https://orcid.org/0000-0003-0390-9984"
27-
- family-names: "Maussion"
28-
given-names: "Fabien"
29-
orcid: "https://orcid.org/0000-0002-3211-506X"
30-
- family-names: "Imperiale"
31-
given-names: "Guido"
32-
- family-names: "Clark"
33-
given-names: "Spencer"
34-
orcid: "https://orcid.org/0000-0001-5595-7895"
35-
- family-names: "Kleeman"
36-
given-names: "Alex"
37-
- family-names: "Nicholas"
38-
given-names: "Thomas"
39-
orcid: "https://orcid.org/0000-0002-2176-0530"
40-
- family-names: "Kluyver"
41-
given-names: "Thomas"
42-
orcid: "https://orcid.org/0000-0003-4020-6364"
43-
- family-names: "Westling"
44-
given-names: "Jimmy"
45-
- family-names: "Munroe"
46-
given-names: "James"
47-
orcid: "https://orcid.org/0000-0001-9098-6309"
48-
- family-names: "Amici"
49-
given-names: "Alessandro"
50-
orcid: "https://orcid.org/0000-0002-1778-4505"
51-
- family-names: "Barghini"
52-
given-names: "Aureliana"
53-
- family-names: "Banihirwe"
54-
given-names: "Anderson"
55-
orcid: "https://orcid.org/0000-0001-6583-571X"
56-
- family-names: "Bell"
57-
given-names: "Ray"
58-
orcid: "https://orcid.org/0000-0003-2623-0587"
59-
- family-names: "Hatfield-Dodds"
60-
given-names: "Zac"
61-
orcid: "https://orcid.org/0000-0002-8646-8362"
62-
- family-names: "Abernathey"
63-
given-names: "Ryan"
64-
orcid: "https://orcid.org/0000-0001-5999-4917"
65-
- family-names: "Bovy"
66-
given-names: "Benoît"
67-
- family-names: "Omotani"
68-
given-names: "John"
69-
orcid: "https://orcid.org/0000-0002-3156-8227"
70-
- family-names: "Mühlbauer"
71-
given-names: "Kai"
72-
orcid: "https://orcid.org/0000-0001-6599-1034"
73-
- family-names: "Roszko"
74-
given-names: "Maximilian K."
75-
orcid: "https://orcid.org/0000-0001-9424-2526"
76-
- family-names: "Wolfram"
77-
given-names: "Phillip J."
78-
orcid: "https://orcid.org/0000-0001-5971-4241"
79-
- family-names: "Henderson"
80-
given-names: "Scott"
81-
orcid: "https://orcid.org/0000-0003-0624-4965"
82-
- family-names: "Awowale"
83-
given-names: "Eniola Olufunke"
84-
- family-names: "Scheick"
85-
given-names: "Jessica"
86-
orcid: "https://orcid.org/0000-0002-3421-4459"
87-
- family-names: "Savoie"
88-
given-names: "Matthew"
89-
orcid: "https://orcid.org/0000-0002-8881-2550"
90-
- family-names: "Littlejohns"
91-
given-names: "Owen"
4+
- family-names: "Hoyer"
5+
given-names: "Stephan"
6+
orcid: "https://orcid.org/0000-0002-5207-0380"
7+
- family-names: "Roos"
8+
given-names: "Maximilian"
9+
- family-names: "Joseph"
10+
given-names: "Hamman"
11+
orcid: "https://orcid.org/0000-0001-7479-8439"
12+
- family-names: "Magin"
13+
given-names: "Justus"
14+
orcid: "https://orcid.org/0000-0002-4254-8002"
15+
- family-names: "Cherian"
16+
given-names: "Deepak"
17+
orcid: "https://orcid.org/0000-0002-6861-8734"
18+
- family-names: "Fitzgerald"
19+
given-names: "Clark"
20+
orcid: "https://orcid.org/0000-0003-3446-6389"
21+
- family-names: "Hauser"
22+
given-names: "Mathias"
23+
orcid: "https://orcid.org/0000-0002-0057-4878"
24+
- family-names: "Fujii"
25+
given-names: "Keisuke"
26+
orcid: "https://orcid.org/0000-0003-0390-9984"
27+
- family-names: "Maussion"
28+
given-names: "Fabien"
29+
orcid: "https://orcid.org/0000-0002-3211-506X"
30+
- family-names: "Imperiale"
31+
given-names: "Guido"
32+
- family-names: "Clark"
33+
given-names: "Spencer"
34+
orcid: "https://orcid.org/0000-0001-5595-7895"
35+
- family-names: "Kleeman"
36+
given-names: "Alex"
37+
- family-names: "Nicholas"
38+
given-names: "Thomas"
39+
orcid: "https://orcid.org/0000-0002-2176-0530"
40+
- family-names: "Kluyver"
41+
given-names: "Thomas"
42+
orcid: "https://orcid.org/0000-0003-4020-6364"
43+
- family-names: "Westling"
44+
given-names: "Jimmy"
45+
- family-names: "Munroe"
46+
given-names: "James"
47+
orcid: "https://orcid.org/0000-0001-9098-6309"
48+
- family-names: "Amici"
49+
given-names: "Alessandro"
50+
orcid: "https://orcid.org/0000-0002-1778-4505"
51+
- family-names: "Barghini"
52+
given-names: "Aureliana"
53+
- family-names: "Banihirwe"
54+
given-names: "Anderson"
55+
orcid: "https://orcid.org/0000-0001-6583-571X"
56+
- family-names: "Bell"
57+
given-names: "Ray"
58+
orcid: "https://orcid.org/0000-0003-2623-0587"
59+
- family-names: "Hatfield-Dodds"
60+
given-names: "Zac"
61+
orcid: "https://orcid.org/0000-0002-8646-8362"
62+
- family-names: "Abernathey"
63+
given-names: "Ryan"
64+
orcid: "https://orcid.org/0000-0001-5999-4917"
65+
- family-names: "Bovy"
66+
given-names: "Benoît"
67+
- family-names: "Omotani"
68+
given-names: "John"
69+
orcid: "https://orcid.org/0000-0002-3156-8227"
70+
- family-names: "Mühlbauer"
71+
given-names: "Kai"
72+
orcid: "https://orcid.org/0000-0001-6599-1034"
73+
- family-names: "Roszko"
74+
given-names: "Maximilian K."
75+
orcid: "https://orcid.org/0000-0001-9424-2526"
76+
- family-names: "Wolfram"
77+
given-names: "Phillip J."
78+
orcid: "https://orcid.org/0000-0001-5971-4241"
79+
- family-names: "Henderson"
80+
given-names: "Scott"
81+
orcid: "https://orcid.org/0000-0003-0624-4965"
82+
- family-names: "Awowale"
83+
given-names: "Eniola Olufunke"
84+
- family-names: "Scheick"
85+
given-names: "Jessica"
86+
orcid: "https://orcid.org/0000-0002-3421-4459"
87+
- family-names: "Savoie"
88+
given-names: "Matthew"
89+
orcid: "https://orcid.org/0000-0002-8881-2550"
90+
- family-names: "Littlejohns"
91+
given-names: "Owen"
9292
title: "xarray"
9393
abstract: "N-D labeled arrays and datasets in Python."
9494
license: Apache-2.0
@@ -98,12 +98,12 @@ repository-code: "https://github.com/pydata/xarray"
9898
preferred-citation:
9999
type: article
100100
authors:
101-
- family-names: "Hoyer"
102-
given-names: "Stephan"
103-
orcid: "https://orcid.org/0000-0002-5207-0380"
104-
- family-names: "Joseph"
105-
given-names: "Hamman"
106-
orcid: "https://orcid.org/0000-0001-7479-8439"
101+
- family-names: "Hoyer"
102+
given-names: "Stephan"
103+
orcid: "https://orcid.org/0000-0002-5207-0380"
104+
- family-names: "Joseph"
105+
given-names: "Hamman"
106+
orcid: "https://orcid.org/0000-0001-7479-8439"
107107
doi: "10.5334/jors.148"
108108
journal: "Journal of Open Research Software"
109109
month: 4

0 commit comments

Comments
 (0)