Skip to content

Commit 88a23cb

Browse files
Merge pull request #44 from ecmwf/feature/review-docs
Review docs
2 parents 51bc682 + 206b1e6 commit 88a23cb

7 files changed

Lines changed: 16 additions & 16 deletions

File tree

src/earthkit/geo/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
r"""Latitude of the north pole in degrees."""
1414

1515
SOUTH_POLE_LAT = -90
16-
r"""Latitude of the south pole in degrees"""
16+
r"""Latitude of the south pole in degrees."""
1717

1818
FULL_ANGLE = 360.0
1919
r"""Full angle in degrees."""
2020

2121
STRAIGHT_ANGLE = 180.0
22-
r"""Half angle in degrees"""
22+
r"""Half angle in degrees."""

src/earthkit/geo/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010

1111
class Figure:
12-
"""Figure representing the size and shape of a spheroid"""
12+
"""Figure representing the size and shape of a spheroid."""
1313

1414
pass
1515

src/earthkit/geo/regrid/backends/db.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,11 +555,11 @@ def __len__(self):
555555
return len(self.index)
556556

557557
def _clear_index(self):
558-
"""For testing only"""
558+
"""For testing only."""
559559
self._index = None
560560

561561
def _reset(self):
562-
"""For testing only"""
562+
"""For testing only."""
563563
self._index = None
564564
self._accessor.reset()
565565

src/earthkit/geo/regrid/data/xarray.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def _distinct_lons(lons):
9494

9595

9696
# TODO: move this code to earthkit-geo
97-
class XarrrayGeographyBuilder:
97+
class XarrayGeographyBuilder:
9898
def __init__(self, grid_spec):
9999
self.grid = GridWrapper(grid_spec)
100100
self.grid_spec = grid_spec
@@ -255,7 +255,7 @@ def get_out_geo(grid):
255255
if out_grid is None:
256256
raise ValueError("grid must be provided")
257257

258-
out_geo = XarrrayGeographyBuilder(out_grid)
258+
out_geo = XarrayGeographyBuilder(out_grid)
259259
return out_geo
260260

261261
@staticmethod
@@ -347,7 +347,7 @@ def _regrid(da):
347347

348348
# The output geography might have changed, so we need to create a new geography builder
349349
# with the new grid spec
350-
out_geo = XarrrayGeographyBuilder(method.out_grid)
350+
out_geo = XarrayGeographyBuilder(method.out_grid)
351351

352352
self.add_geo_coords(ds_out, out_geo)
353353

src/earthkit/geo/regrid/gridspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def spec(self):
125125
class CustomGridSpec(GridSpec):
126126
"""Custom grid spec that cannot be parsed by eckit.geo.
127127
128-
This is a placeholder for now, and can be extended in the future to suppor
128+
This is a placeholder for now, and can be extended in the future to support
129129
custom gridspecs.
130130
"""
131131

src/earthkit/geo/utils/config.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def explain(self):
4242

4343

4444
class ValuesValidator(Validator):
45-
"""Check if value is in a list of valid values"""
45+
"""Check if value is in a list of valid values."""
4646

4747
def __init__(self, values):
4848
self.values = values
@@ -55,7 +55,7 @@ def explain(self):
5555

5656

5757
class ListValidator(Validator):
58-
"""Check if a list of values is in a list of valid values"""
58+
"""Check if a list of values is in a list of valid values."""
5959

6060
def __init__(self, values):
6161
self.values = values
@@ -209,7 +209,7 @@ def validate(self, name, value):
209209

210210
@contextmanager
211211
def new_config(s):
212-
"""Context manager to create new config"""
212+
"""Context manager to create new config."""
213213
CONFIG._stack.append(s)
214214
CONFIG._notify()
215215
try:

src/earthkit/geo/utils/memcache.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def matrix_size(m):
3636

3737

3838
def estimate_matrix_size(entry):
39-
"""Estimate the size of a matrix entry"""
39+
"""Estimate the size of a matrix entry."""
4040
try:
4141
return entry["_raw"]["memory"]
4242
except Exception as e:
@@ -281,7 +281,7 @@ def _create_with_pre_check(self, find_entry, create_from_entry, *args):
281281
return create_from_entry(entry)
282282

283283
def update(self):
284-
"""Called when settings change"""
284+
"""Called when settings change."""
285285
if self._has_settings:
286286
from earthkit.geo.utils.config import CONFIG
287287

@@ -323,7 +323,7 @@ def _reduce(self, target_size=None):
323323
self.policy.reduce(target_size=target_size)
324324

325325
def clear(self):
326-
"""Clear the cache"""
326+
"""Clear the cache."""
327327
with self.lock:
328328
self._clear()
329329

@@ -339,7 +339,7 @@ def _curr_mem(self):
339339
return sum(v.size for v in self.items.values())
340340

341341
def info(self):
342-
"""Report cache statistics"""
342+
"""Report cache statistics."""
343343
with self.lock:
344344
return _CacheInfo(
345345
self.hits,

0 commit comments

Comments
 (0)