Skip to content

Commit

Permalink
Add prettier pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
Armavica committed Nov 18, 2024
1 parent a34a66c commit 2537fbf
Show file tree
Hide file tree
Showing 26 changed files with 575 additions and 533 deletions.
2 changes: 1 addition & 1 deletion .binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ dependencies:
- h5py
- hdf5
- iris
- lxml # Optional dep of pydap
- lxml # Optional dep of pydap
- matplotlib
- nc-time-axis
- netcdf4
Expand Down
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ coverage:
flags:
- unittests
paths:
- "!xarray/tests/"
- "!xarray/tests/"
unittests:
target: 90%
flags:
Expand Down
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
version: 2
updates:
- package-ecosystem: 'github-actions'
directory: '/'
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates once a week
interval: 'weekly'
interval: "weekly"
groups:
actions:
patterns:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/benchmarks-last-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ jobs:
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '1.5.10-0'
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-environment: true
cache-environment-key: "${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}-benchmark"
create-args: >-
asv
- name: 'Get Previous tag'
- name: "Get Previous tag"
id: previoustag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
# with:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Set up conda environment
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: '1.5.10-0'
micromamba-version: "1.5.10-0"
environment-file: ${{env.CONDA_ENV_FILE}}
environment-name: xarray-tests
cache-environment: true
Expand All @@ -38,7 +38,6 @@ jobs:
python-build
mamba<=1.5.10
- name: Run benchmarks
shell: bash -l {0}
id: benchmark
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/hypothesis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@ jobs:
runs-on: "ubuntu-latest"
needs: detect-ci-trigger
if: |
always()
&& (
needs.detect-ci-trigger.outputs.triggered == 'false'
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
)
always()
&& (
needs.detect-ci-trigger.outputs.triggered == 'false'
&& ( (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| contains( github.event.pull_request.labels.*.name, 'run-slow-hypothesis'))
)
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -92,8 +92,8 @@ jobs:
if: success()
id: status
run: |
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
--report-log output-${{ matrix.python-version }}-log.jsonl
python -m pytest --hypothesis-show-statistics --run-slow-hypothesis properties/*.py \
--report-log output-${{ matrix.python-version }}-log.jsonl
# explicitly save the cache so it gets updated, also do this even if it fails.
- name: Save cached hypothesis directory
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
- published
push:
tags:
- 'v*'
- "v*"

jobs:
build-artifacts:
Expand Down Expand Up @@ -93,7 +93,6 @@ jobs:
repository_url: https://test.pypi.org/legacy/
verbose: true


upload-to-pypi:
needs: test-built-dist
if: github.event_name == 'release'
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/upstream-dev-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ jobs:
env:
ZARR_V3_EXPERIMENTAL_API: 1
if: |
always()
&& (
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| needs.detect-ci-trigger.outputs.triggered == 'true'
|| contains( github.event.pull_request.labels.*.name, 'run-upstream')
)
always()
&& (
(github.event_name == 'schedule' || github.event_name == 'workflow_dispatch')
|| needs.detect-ci-trigger.outputs.triggered == 'true'
|| contains( github.event.pull_request.labels.*.name, 'run-upstream')
)
defaults:
run:
shell: bash -l {0}
Expand Down Expand Up @@ -101,10 +101,10 @@ jobs:
runs-on: ubuntu-latest
needs: detect-ci-trigger
if: |
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-upstream')
)
always()
&& (
contains( github.event.pull_request.labels.*.name, 'run-upstream')
)
defaults:
run:
shell: bash -l {0}
Expand Down
12 changes: 8 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# https://pre-commit.com/
ci:
autoupdate_schedule: monthly
autoupdate_commit_msg: 'Update pre-commit hooks'
autoupdate_schedule: monthly
autoupdate_commit_msg: "Update pre-commit hooks"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
Expand All @@ -25,7 +25,7 @@ repos:
- id: text-unicode-replacement-char
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: 'v0.7.2'
rev: v0.7.2
hooks:
- id: ruff-format
- id: ruff
Expand All @@ -36,6 +36,10 @@ repos:
- id: blackdoc
exclude: "generate_aggregations.py"
additional_dependencies: ["black==24.8.0"]
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.3.3
hooks:
- id: prettier
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.13.0
hooks:
Expand All @@ -57,4 +61,4 @@ repos:
- repo: https://github.com/citation-file-format/cff-converter-python
rev: ebf0b5e44d67f8beaa1cd13a0d0393ea04c6058d
hooks:
- id: validate-cff
- id: validate-cff
188 changes: 94 additions & 94 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,94 +1,94 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Hoyer"
given-names: "Stephan"
orcid: "https://orcid.org/0000-0002-5207-0380"
- family-names: "Roos"
given-names: "Maximilian"
- family-names: "Joseph"
given-names: "Hamman"
orcid: "https://orcid.org/0000-0001-7479-8439"
- family-names: "Magin"
given-names: "Justus"
orcid: "https://orcid.org/0000-0002-4254-8002"
- family-names: "Cherian"
given-names: "Deepak"
orcid: "https://orcid.org/0000-0002-6861-8734"
- family-names: "Fitzgerald"
given-names: "Clark"
orcid: "https://orcid.org/0000-0003-3446-6389"
- family-names: "Hauser"
given-names: "Mathias"
orcid: "https://orcid.org/0000-0002-0057-4878"
- family-names: "Fujii"
given-names: "Keisuke"
orcid: "https://orcid.org/0000-0003-0390-9984"
- family-names: "Maussion"
given-names: "Fabien"
orcid: "https://orcid.org/0000-0002-3211-506X"
- family-names: "Imperiale"
given-names: "Guido"
- family-names: "Clark"
given-names: "Spencer"
orcid: "https://orcid.org/0000-0001-5595-7895"
- family-names: "Kleeman"
given-names: "Alex"
- family-names: "Nicholas"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0002-2176-0530"
- family-names: "Kluyver"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0003-4020-6364"
- family-names: "Westling"
given-names: "Jimmy"
- family-names: "Munroe"
given-names: "James"
orcid: "https://orcid.org/0000-0001-9098-6309"
- family-names: "Amici"
given-names: "Alessandro"
orcid: "https://orcid.org/0000-0002-1778-4505"
- family-names: "Barghini"
given-names: "Aureliana"
- family-names: "Banihirwe"
given-names: "Anderson"
orcid: "https://orcid.org/0000-0001-6583-571X"
- family-names: "Bell"
given-names: "Ray"
orcid: "https://orcid.org/0000-0003-2623-0587"
- family-names: "Hatfield-Dodds"
given-names: "Zac"
orcid: "https://orcid.org/0000-0002-8646-8362"
- family-names: "Abernathey"
given-names: "Ryan"
orcid: "https://orcid.org/0000-0001-5999-4917"
- family-names: "Bovy"
given-names: "Benoît"
- family-names: "Omotani"
given-names: "John"
orcid: "https://orcid.org/0000-0002-3156-8227"
- family-names: "Mühlbauer"
given-names: "Kai"
orcid: "https://orcid.org/0000-0001-6599-1034"
- family-names: "Roszko"
given-names: "Maximilian K."
orcid: "https://orcid.org/0000-0001-9424-2526"
- family-names: "Wolfram"
given-names: "Phillip J."
orcid: "https://orcid.org/0000-0001-5971-4241"
- family-names: "Henderson"
given-names: "Scott"
orcid: "https://orcid.org/0000-0003-0624-4965"
- family-names: "Awowale"
given-names: "Eniola Olufunke"
- family-names: "Scheick"
given-names: "Jessica"
orcid: "https://orcid.org/0000-0002-3421-4459"
- family-names: "Savoie"
given-names: "Matthew"
orcid: "https://orcid.org/0000-0002-8881-2550"
- family-names: "Littlejohns"
given-names: "Owen"
- family-names: "Hoyer"
given-names: "Stephan"
orcid: "https://orcid.org/0000-0002-5207-0380"
- family-names: "Roos"
given-names: "Maximilian"
- family-names: "Joseph"
given-names: "Hamman"
orcid: "https://orcid.org/0000-0001-7479-8439"
- family-names: "Magin"
given-names: "Justus"
orcid: "https://orcid.org/0000-0002-4254-8002"
- family-names: "Cherian"
given-names: "Deepak"
orcid: "https://orcid.org/0000-0002-6861-8734"
- family-names: "Fitzgerald"
given-names: "Clark"
orcid: "https://orcid.org/0000-0003-3446-6389"
- family-names: "Hauser"
given-names: "Mathias"
orcid: "https://orcid.org/0000-0002-0057-4878"
- family-names: "Fujii"
given-names: "Keisuke"
orcid: "https://orcid.org/0000-0003-0390-9984"
- family-names: "Maussion"
given-names: "Fabien"
orcid: "https://orcid.org/0000-0002-3211-506X"
- family-names: "Imperiale"
given-names: "Guido"
- family-names: "Clark"
given-names: "Spencer"
orcid: "https://orcid.org/0000-0001-5595-7895"
- family-names: "Kleeman"
given-names: "Alex"
- family-names: "Nicholas"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0002-2176-0530"
- family-names: "Kluyver"
given-names: "Thomas"
orcid: "https://orcid.org/0000-0003-4020-6364"
- family-names: "Westling"
given-names: "Jimmy"
- family-names: "Munroe"
given-names: "James"
orcid: "https://orcid.org/0000-0001-9098-6309"
- family-names: "Amici"
given-names: "Alessandro"
orcid: "https://orcid.org/0000-0002-1778-4505"
- family-names: "Barghini"
given-names: "Aureliana"
- family-names: "Banihirwe"
given-names: "Anderson"
orcid: "https://orcid.org/0000-0001-6583-571X"
- family-names: "Bell"
given-names: "Ray"
orcid: "https://orcid.org/0000-0003-2623-0587"
- family-names: "Hatfield-Dodds"
given-names: "Zac"
orcid: "https://orcid.org/0000-0002-8646-8362"
- family-names: "Abernathey"
given-names: "Ryan"
orcid: "https://orcid.org/0000-0001-5999-4917"
- family-names: "Bovy"
given-names: "Benoît"
- family-names: "Omotani"
given-names: "John"
orcid: "https://orcid.org/0000-0002-3156-8227"
- family-names: "Mühlbauer"
given-names: "Kai"
orcid: "https://orcid.org/0000-0001-6599-1034"
- family-names: "Roszko"
given-names: "Maximilian K."
orcid: "https://orcid.org/0000-0001-9424-2526"
- family-names: "Wolfram"
given-names: "Phillip J."
orcid: "https://orcid.org/0000-0001-5971-4241"
- family-names: "Henderson"
given-names: "Scott"
orcid: "https://orcid.org/0000-0003-0624-4965"
- family-names: "Awowale"
given-names: "Eniola Olufunke"
- family-names: "Scheick"
given-names: "Jessica"
orcid: "https://orcid.org/0000-0002-3421-4459"
- family-names: "Savoie"
given-names: "Matthew"
orcid: "https://orcid.org/0000-0002-8881-2550"
- family-names: "Littlejohns"
given-names: "Owen"
title: "xarray"
abstract: "N-D labeled arrays and datasets in Python."
license: Apache-2.0
Expand All @@ -98,12 +98,12 @@ repository-code: "https://github.com/pydata/xarray"
preferred-citation:
type: article
authors:
- family-names: "Hoyer"
given-names: "Stephan"
orcid: "https://orcid.org/0000-0002-5207-0380"
- family-names: "Joseph"
given-names: "Hamman"
orcid: "https://orcid.org/0000-0001-7479-8439"
- family-names: "Hoyer"
given-names: "Stephan"
orcid: "https://orcid.org/0000-0002-5207-0380"
- family-names: "Joseph"
given-names: "Hamman"
orcid: "https://orcid.org/0000-0001-7479-8439"
doi: "10.5334/jors.148"
journal: "Journal of Open Research Software"
month: 4
Expand Down
Loading

0 comments on commit 2537fbf

Please sign in to comment.