Skip to content

Fix typos and update pre-commit hooks #64

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

Merged
merged 1 commit into from
Feb 20, 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
17 changes: 12 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.13
rev: v0.2.2
hooks:
- id: ruff
args:
Expand All @@ -21,13 +21,20 @@ repos:
exclude: ^examples/|^tests/|^setup.py$
args: ["--rcfile=pyproject.toml"]
# - repo: https://github.com/pre-commit/mirrors-mypy # FIXME
# rev: v1.7.1
# rev: v1.8.0
# hooks:
# - id: mypy
# name: mypy
# args:
# - --config-file=pyproject.toml
# - cmethods
# - --install-types
# - --non-interactive
- repo: https://github.com/codespell-project/codespell
rev: v2.2.6
hooks:
- id: codespell
additional_dependencies:
- tomli
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
Expand Down Expand Up @@ -61,7 +68,7 @@ repos:
- id: rst-directive-colons
- id: text-unicode-replacement-char
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.2.0
hooks:
- id: black
# - repo: https://github.com/adamchainz/blacken-docs
Expand All @@ -75,7 +82,7 @@ repos:
- id: isort
args: ["--profile=black"] # solves conflicts between black and isort
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
rev: v3.0.2
hooks:
- id: prettier
exclude: '\.nc$|^tests/fixture/|\.ipynb$'
2 changes: 1 addition & 1 deletion cmethods/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def ensure_dividable(
:type numerator: np.ndarray
:param denominator: Denominator that can be zero
:type denominator: np.ndarray
:return: Zero-ensured devision
:return: Zero-ensured division
:rtype: np.ndarray | float
"""
with np.errstate(divide="ignore", invalid="ignore"):
Expand Down
2 changes: 1 addition & 1 deletion doc/src/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ method specific documentation.
simp = xr.open_dataset("input_data/scenario.nc")

ls_result = adjust(
mathod="linear_scaling",
method="linear_scaling",
obs=obsh["tas"][:, 0, 0],
simh=simh["tas"][:, 0, 0],
simp=simp["tas"][:, 0, 0],
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ dynamic = ["version"]
authors = [
{ name = "Benjamin Thomas Schwertfeger", email = "[email protected]" },
]
maintainers = [
{ name = "Benjamin Thomas Schwertfeger", email = "[email protected]" },
]
description = "Collection of bias correction procedures for single and multidimensional climate data"
readme = "README.md"
license = { file = "LICENSE" }
Expand Down Expand Up @@ -98,6 +101,8 @@ dev = [

examples = ["click", "matplotlib"]

[tool.codespell]
check-filenames = true

# ========= T Y P I N G ========================================================
#
Expand Down