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

Force bump pre-commit hooks #359

Merged
merged 2 commits into from
Mar 5, 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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
repos:
- repo: https://github.com/paddyroddy/.github
rev: v0.146.0
rev: v0.148.0
hooks:
- id: general-hooks
- id: python-hooks
2 changes: 1 addition & 1 deletion src/sleplet/_string_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def multiples_of_pi(angle: float) -> str:
i.e. pi, 2pi, 3pi.
"""
multiple = int(angle / np.pi)
return f"{multiple if multiple != 1 else ''}\u03C0"
return f"{multiple if multiple != 1 else ''}\u03c0"


def angle_as_degree(radian: float) -> int:
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/africa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Africa` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `AxisymmetricWaveletCoefficientsAfrica` class."""

import logging

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `AxisymmetricWaveletCoefficientsEarth` class."""

import logging

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `AxisymmetricWaveletCoefficientsSouthAmerica` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/axisymmetric_wavelets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `AxisymmetricWavelets` class."""

import logging

import numpy as np
Expand Down
13 changes: 7 additions & 6 deletions src/sleplet/functions/coefficients.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `Coefficients` class."""

import abc
import dataclasses

Expand Down Expand Up @@ -35,12 +36,12 @@ class Coefficients:
"""Whether to set a region or not, used in the Slepian case."""
smoothing: int | None = None
"""How much to smooth the topographic map of the Earth by."""
_unnoised_coefficients: (
npt.NDArray[np.complex128 | np.float64] | None
) = pydantic.Field(
default=None,
init_var=False,
repr=False,
_unnoised_coefficients: npt.NDArray[np.complex128 | np.float64] | None = (
pydantic.Field(
default=None,
init_var=False,
repr=False,
)
)
coefficients: npt.NDArray[np.complex128 | np.float64] = pydantic.Field(
default_factory=lambda: np.empty(0),
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/dirac_delta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `DiracDelta` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/earth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Earth` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/elongated_gaussian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `ElongatedGaussian` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/flm.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `Flm` class."""

import abc

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/fp.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `Fp` class."""

import abc

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/gaussian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Gaussian` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/harmonic_gaussian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `HarmonicGaussian` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/identity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Identity` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/noise_earth.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `NoiseEarth` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/ridgelets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Ridgelets` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Slepian` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_africa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianAfrica` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_dirac_delta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianDiracDelta` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_identity.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianIdentity` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_noise_africa.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianNoiseAfrica` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_noise_south_america.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianNoiseSouthAmerica` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_south_america.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianSouthAmerica` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianWaveletCoefficientsAfrica` class."""

import logging

import numpy as np
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianWaveletCoefficientsSouthAmerica` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/slepian_wavelets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianWavelets` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/south_america.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SouthAmerica` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/spherical_harmonic.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SphericalHarmonic` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/squashed_gaussian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SquashedGaussian` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/functions/wmap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Wmap` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/harmonic_methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to perform operations in Fourier space of the sphere or mesh."""

import collections
import typing

Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Mesh` class."""

import dataclasses

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_basis_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshBasisFunctions` class."""

import logging

import numpy as np
Expand Down
13 changes: 7 additions & 6 deletions src/sleplet/meshes/mesh_coefficients.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `MeshCoefficients` class."""

import abc
import dataclasses

Expand Down Expand Up @@ -30,12 +31,12 @@ class MeshCoefficients:
"""How much to noise the data."""
region: bool = False
"""Whether to set a region or not, used in the Slepian case."""
_unnoised_coefficients: (
npt.NDArray[np.complex128 | np.float64] | None
) = pydantic.Field(
default=None,
init_var=False,
repr=False,
_unnoised_coefficients: npt.NDArray[np.complex128 | np.float64] | None = (
pydantic.Field(
default=None,
init_var=False,
repr=False,
)
)
coefficients: npt.NDArray[np.complex128 | np.float64] = pydantic.Field(
default_factory=lambda: np.empty(0),
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshField` class."""

import igl
import numpy as np
import numpy.typing as npt
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_harmonic_coefficients.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `MeshHarmonicCoefficients` class."""

import abc

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_noise_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshNoiseField` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepian` class."""

import concurrent.futures
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_coefficients.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `MeshSlepianCoefficients` class."""

import abc

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepianField` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepianFunctions` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_noise_field.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepianNoiseField` class."""

import numpy as np
import numpy.typing as npt
import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_wavelet_coefficients.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepianWaveletCoefficients` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/meshes/mesh_slepian_wavelets.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `MeshSlepianWavelets` class."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/noise.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to handle noise in Fourier or wavelet space."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/plot_methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to help in creating plots."""

import logging

import matplotlib as mpl
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/slepian/region.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `Region` class."""

import logging

import pydantic
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/slepian/slepian_arbitrary.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianArbitrary` class."""

import concurrent.futures
import logging
import os
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/slepian/slepian_functions.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the abstract `SlepianFunctions` class."""

import abc
import dataclasses
import logging
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/slepian/slepian_polar_cap.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Contains the `SlepianPolarCap` class."""

import concurrent.futures
import dataclasses
import logging
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/slepian_methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to work with Slepian coefficients."""

import logging

import numpy as np
Expand Down
1 change: 1 addition & 0 deletions src/sleplet/wavelet_methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Methods to work with wavelet and wavelet coefficients."""

import numpy as np
import numpy.typing as npt

Expand Down
2 changes: 1 addition & 1 deletion tests/test_strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def test_add_angle_to_filename() -> None:
def test_print_multiple_of_pi() -> None:
"""Test that the pi prefix is added."""
arguments = [0, 1, 2, 2.5]
output = ["0\u03C0", "\u03C0", "2\u03C0", "2\u03C0"]
output = ["0\u03c0", "\u03c0", "2\u03c0", "2\u03c0"]
for c, arg in enumerate(arguments):
np.testing.assert_equal(
sleplet._string_methods.multiples_of_pi(arg * np.pi),
Expand Down
Loading