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 #69

Merged
merged 3 commits into from
Jul 2, 2024
Merged
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
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ci:

repos:
- repo: "https://github.com/python-jsonschema/check-jsonschema"
rev: "0.27.3"
rev: "0.28.6"
hooks:
- id: "check-github-workflows"
# TODO: Re-enable. The checker and the docs say `build.tools` is
Expand All @@ -16,20 +16,20 @@ repos:
# - id: "check-readthedocs"

- repo: https://github.com/psf/black-pre-commit-mirror
rev: "23.12.1"
rev: "24.4.2"
hooks:
# With notebook support:
# - id: black-jupyter
- id: black

- repo: https://github.com/asottile/blacken-docs
rev: "1.16.0"
rev: "1.18.0"
hooks:
- id: blacken-docs
additional_dependencies: [black==23.9.1]

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v4.6.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand All @@ -52,8 +52,8 @@ repos:
- id: rst-directive-colons
- id: rst-inline-touching-normal

- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v3.0.2"
- repo: "https://github.com/rbubley/mirrors-prettier"
rev: "v3.3.2"
hooks:
- id: prettier
types_or: [json]
Expand All @@ -62,7 +62,7 @@ repos:
args: [--prose-wrap=always]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.1.9"
rev: "v0.5.0"
hooks:
- id: ruff
args: ["--fix", "--show-fixes", "--exit-non-zero-on-fix"]
Expand All @@ -80,7 +80,7 @@ repos:

# TODO: Configure in pyproject.toml
- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
rev: "v2.3.0"
hooks:
- id: codespell
exclude: >
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
NOTE: imports are done in functions to avoid needing to evaluate code within those
imports when doing `--help`.
"""

from pathlib import Path
from shutil import rmtree
from tempfile import mkdtemp
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/data_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

TODO: Better name! "Data types" isn't much better. "Data kinds"?
"""

import re
from dataclasses import dataclass
from functools import partial
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/ingest/cogs.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Convert non-CO GeoTIFFs to Cloud-Optimized GeoTIFFs."""

import subprocess
from pathlib import Path
from pprint import pformat
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/ingest/swe_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

CRITICAL: This code currently only expects and handles a single region of SWE data.
"""

import csv
import io
from pathlib import Path
Expand Down
4 changes: 2 additions & 2 deletions snow_today_webapp_ingest/types_/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,13 @@ class PlotData(BaseModel):
year_to_date: PlotPointColumn = Field(
description="Observed values for the current water year to date",
)
min: PlotPointColumn = Field( # noqa: A003
min: PlotPointColumn = Field(
description=(
"Observed values for the minimum water year (as specified in"
" `metadata.minYear`)"
),
)
max: PlotPointColumn = Field( # noqa: A003
max: PlotPointColumn = Field(
description=(
"Observed values for the maximum water year (as specified in"
" `metadata.maxYear`)"
Expand Down
11 changes: 7 additions & 4 deletions snow_today_webapp_ingest/types_/subregion_hierarchy.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,13 @@ class SubRegionsHierarchyCollectionRegionsIndex(RootModel):

class SubRegionsHierarchyCollectionRegion(BaseModel):
# TODO: Will this output as {} or null?
collections: None | dict[
SubRegionCollectionIdentifier,
SubRegionsHierarchyCollectionRegionsIndex,
] = None
collections: (
None
| dict[
SubRegionCollectionIdentifier,
SubRegionsHierarchyCollectionRegionsIndex,
]
) = None


class SubRegionsHierarchyCollection(BaseModel):
Expand Down
1 change: 1 addition & 0 deletions snow_today_webapp_ingest/util/field_transformers.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Currently for SWE JSON only.
"""

import math


Expand Down
Loading