Skip to content

Commit

Permalink
Avoid downloading data on initial import (#336)
Browse files Browse the repository at this point in the history
  • Loading branch information
paddyroddy authored Nov 24, 2023
1 parent 31374ca commit 1bc47f7
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AxisymmetricWaveletCoefficientsAfrica(Flm):
j: int | None = None
"""Option to select a given wavelet. `None` indicates the scaling function,
whereas `0` would correspond to the selected `j_min`."""
_africa: Africa = pydantic.Field(
default=Africa(1),
_africa: Africa | None = pydantic.Field(
default=None,
init_var=False,
repr=False,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ class AxisymmetricWaveletCoefficientsEarth(Flm):
j: int | None = None
"""Option to select a given wavelet. `None` indicates the scaling function,
whereas `0` would correspond to the selected `j_min`."""
_earth: Earth = pydantic.Field(
default=Earth(0),
_earth: Earth | None = pydantic.Field(
default=None,
init_var=False,
repr=False,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ class AxisymmetricWaveletCoefficientsSouthAmerica(Flm):
j: int | None = None
"""Option to select a given wavelet. `None` indicates the scaling function,
whereas `0` would correspond to the selected `j_min`."""
_south_america: SouthAmerica = pydantic.Field(
default=SouthAmerica(1),
_south_america: SouthAmerica | None = pydantic.Field(
default=None,
init_var=False,
repr=False,
)
Expand Down
4 changes: 2 additions & 2 deletions src/sleplet/functions/fp.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
class Fp(Coefficients):
"""Abstract parent class to handle Slepian coefficients on the sphere."""

slepian: sleplet.slepian.slepian_functions.SlepianFunctions = pydantic.Field(
default=sleplet.slepian.slepian_polar_cap.SlepianPolarCap(0, theta_max=1),
slepian: sleplet.slepian.slepian_functions.SlepianFunctions | None = pydantic.Field(
default=None,
init_var=False,
repr=False,
)
Expand Down
2 changes: 1 addition & 1 deletion src/sleplet/meshes/mesh.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class Mesh:
zoom: bool = False
"""Whether to zoom in on the pre-selected region of the mesh in the
plots."""
_camera_view: go.layout.scene.Camera = pydantic.Field(
_camera_view: go.layout.scene.Camera | None = pydantic.Field(
default=go.layout.scene.Camera(),
init_var=False,
repr=False,
Expand Down
5 changes: 2 additions & 3 deletions src/sleplet/meshes/mesh_slepian_coefficients.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

import sleplet._validation
import sleplet.noise
from sleplet.meshes.mesh import Mesh
from sleplet.meshes.mesh_coefficients import MeshCoefficients
from sleplet.meshes.mesh_slepian import MeshSlepian

Expand All @@ -17,8 +16,8 @@
class MeshSlepianCoefficients(MeshCoefficients):
"""Abstract parent class to handle Slepian coefficients on the mesh."""

mesh_slepian: MeshSlepian = pydantic.Field(
default=MeshSlepian(Mesh("bird")),
mesh_slepian: MeshSlepian | None = pydantic.Field(
default=None,
init_var=False,
repr=False,
)
Expand Down

0 comments on commit 1bc47f7

Please sign in to comment.