Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #333

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: CI
on:
push:
branches: ['main']
branches: ["main"]
pull_request:
branches: ['main']
branches: ["main"]
workflow_dispatch:
schedule:
- cron: '0 0 * * 0' # Weekly “At 00:00”
- cron: "0 0 * * 0" # Weekly “At 00:00”

# concurrency:
# group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11']
python-version: ["3.9", "3.10", "3.11"]
timeout-minutes: 20
defaults:
run:
Expand All @@ -40,7 +40,7 @@ jobs:
python=${{ matrix.python-version }}
# now called cache-environment
cache-environment: true
post-cleanup: 'none'
post-cleanup: "none"
cache-downloads: false

- name: Install package
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/[email protected]
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"

- name: Install dependencies
run: |
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
- uses: actions/[email protected]
name: Install Python
with:
python-version: '3.11'
python-version: "3.11"
- uses: actions/download-artifact@v4
with:
name: releases
Expand Down
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -15,30 +15,30 @@ repos:
- id: mixed-line-ending

- repo: https://github.com/asottile/pyupgrade
rev: v3.14.0
rev: v3.16.0
hooks:
- id: pyupgrade
args:
- '--py38-plus'
- "--py38-plus"

- repo: https://github.com/psf/black
rev: 23.9.1
rev: 24.4.2
hooks:
- id: black
- id: black-jupyter

- repo: https://github.com/keewis/blackdoc
rev: v0.3.8
rev: v0.3.9
hooks:
- id: blackdoc

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.276'
rev: "v0.5.0"
hooks:
- id: ruff
args: ['--fix']
args: ["--fix"]

- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.9-for-vscode
rev: v4.0.0-alpha.8
hooks:
- id: prettier
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-20.04
tools:
python: 'mambaforge-4.10'
python: "mambaforge-4.10"

# Build documentation in the doc/ directory with Sphinx
sphinx:
Expand Down
1 change: 1 addition & 0 deletions cmip6_downscaling/config.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Config file used by donfig"""

from __future__ import annotations

_defaults = {
Expand Down
2 changes: 1 addition & 1 deletion docs/running-flows.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ config.set({'runtime': 'cloud'})
```yaml
run_options:

runtime: 'cloud'
runtime: "cloud"
```

### Environment Variables
Expand Down
12 changes: 6 additions & 6 deletions flows/catalogs/web_catalog.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ def parse_cmip6_downscaled_pyramid(
query = {
'source_id': parameters['model'],
'member_id': parameters['member'],
'experiment_id': 'historical'
if parameters['scenario'] == 'hist'
else parameters['scenario'],
'experiment_id': (
'historical' if parameters['scenario'] == 'hist' else parameters['scenario']
),
'variable_id': parameters['variable'],
}

Expand Down Expand Up @@ -389,9 +389,9 @@ def parse_cmip6_downscaled_pyramid(
downscaling_method=attrs['method'],
root_path=root_path,
)
attrs[
'name'
] = f"{targets['destination_name']}.{attrs['timescale']}" # make sure the name is unique
attrs['name'] = (
f"{targets['destination_name']}.{attrs['timescale']}" # make sure the name is unique
)
attrs['destination_path'] = targets['destination_path']
attrs['source_path'] = from_az_to_https(attrs['daily_downscaled_data_uri'], root_path)

Expand Down
5 changes: 3 additions & 2 deletions flows/cmip6_raw_pyramids.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def preprocess(ds) -> xr.Dataset:
def _compute_summary_helper(path, freq, chunks):
import xarray as xr

with xr.set_options(keep_attrs=True), dask.config.set(
**{'array.slicing.split_large_chunks': False}
with (
xr.set_options(keep_attrs=True),
dask.config.set(**{'array.slicing.split_large_chunks': False}),
):
ds = xr.open_zarr(path).pipe(preprocess)
if ds.attrs['variable_id'] in {'tasmax', 'tasmin'}:
Expand Down
Loading