Skip to content

Commit d8aeae0

Browse files
Renaming Backend to Parcels backend
Following suggestion by @VeckoTheGecko
1 parent b7a7d38 commit d8aeae0

2 files changed

Lines changed: 26 additions & 25 deletions

File tree

src/parcels/_reprs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def to_dict(self) -> dict[str, str]:
200200
"Type": self.type_,
201201
"Grid number": str(self.model_id) if self.model_id is not None else "-",
202202
"Interp method / value": self.interp_method_or_value,
203-
"Backend": self.backend if self.backend is not None else "-",
203+
"Parcels backend": self.backend if self.backend is not None else "-",
204204
}
205205

206206

tests/test_fieldset.py

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -400,16 +400,17 @@ def test_fieldset_describe(fieldset_two_models: FieldSet):
400400
io = StringIO()
401401
expected = """\
402402
| Name | Type | Grid number | Interp method / value | Backend |
403-
|:---------------|:------------|:--------------|:------------------------|:----------|
404-
| my_list | Context | - | [1, 2, 'hello'] | - |
405-
| my_value | Context | - | 2.0 | - |
406-
| U | Field | 0 | XLinear(...) | NumPy |
407-
| V | Field | 0 | XLinear(...) | NumPy |
408-
| UV | VectorField | 0 | XLinear_Velocity(...) | - |
409-
| U_wind | Field | 1 | XLinear(...) | NumPy |
410-
| V_wind | Field | 1 | XLinear(...) | NumPy |
411-
| UV_wind | VectorField | 1 | XLinear_Velocity(...) | - |
412-
| constant_field | Field | 2 | XConstantField(...) | NumPy |
403+
| Name | Type | Grid number | Interp method / value | Parcels backend |
404+
|:---------------|:------------|:--------------|:------------------------|:------------------|
405+
| my_list | Context | - | [1, 2, 'hello'] | - |
406+
| my_value | Context | - | 2.0 | - |
407+
| U | Field | 0 | XLinear(...) | NumPy |
408+
| V | Field | 0 | XLinear(...) | NumPy |
409+
| UV | VectorField | 0 | XLinear_Velocity(...) | - |
410+
| U_wind | Field | 1 | XLinear(...) | NumPy |
411+
| V_wind | Field | 1 | XLinear(...) | NumPy |
412+
| UV_wind | VectorField | 1 | XLinear_Velocity(...) | - |
413+
| constant_field | Field | 2 | XConstantField(...) | NumPy |
413414
414415
mesh: flat
415416
time interval: (np.datetime64('2000-01-01T00:00:00.000000000'), np.datetime64('2001-01-01T00:00:00.000000000'))
@@ -433,13 +434,13 @@ def test_fieldset_describe_backends():
433434

434435
io = StringIO()
435436
expected = """\
436-
| Name | Type | Grid number | Interp method / value | Backend |
437-
|:-------|:------------|--------------:|:------------------------|:----------|
438-
| U | Field | 0 | XLinear(...) | Dask |
439-
| V | Field | 0 | XLinear(...) | Dask |
440-
| W | Field | 0 | XLinear(...) | Dask |
441-
| UV | VectorField | 0 | CGrid_Velocity(...) | - |
442-
| UVW | VectorField | 0 | CGrid_Velocity(...) | - |
437+
| Name | Type | Grid number | Interp method / value | Parcels backend |
438+
|:-------|:------------|--------------:|:------------------------|:------------------|
439+
| U | Field | 0 | XLinear(...) | Dask |
440+
| V | Field | 0 | XLinear(...) | Dask |
441+
| W | Field | 0 | XLinear(...) | Dask |
442+
| UV | VectorField | 0 | CGrid_Velocity(...) | - |
443+
| UVW | VectorField | 0 | CGrid_Velocity(...) | - |
443444
444445
mesh: spherical
445446
time interval: (np.datetime64('2000-01-02T12:00:00.000000000'), np.datetime64('2000-01-27T12:00:00.000000000'))
@@ -453,13 +454,13 @@ def test_fieldset_describe_backends():
453454

454455
io = StringIO()
455456
expected = """\
456-
| Name | Type | Grid number | Interp method / value | Backend |
457-
|:-------|:------------|--------------:|:------------------------|:--------------|
458-
| U | Field | 0 | XLinear(...) | WindowedArray |
459-
| V | Field | 0 | XLinear(...) | WindowedArray |
460-
| W | Field | 0 | XLinear(...) | WindowedArray |
461-
| UV | VectorField | 0 | CGrid_Velocity(...) | - |
462-
| UVW | VectorField | 0 | CGrid_Velocity(...) | - |
457+
| Name | Type | Grid number | Interp method / value | Parcels backend |
458+
|:-------|:------------|--------------:|:------------------------|:------------------|
459+
| U | Field | 0 | XLinear(...) | WindowedArray |
460+
| V | Field | 0 | XLinear(...) | WindowedArray |
461+
| W | Field | 0 | XLinear(...) | WindowedArray |
462+
| UV | VectorField | 0 | CGrid_Velocity(...) | - |
463+
| UVW | VectorField | 0 | CGrid_Velocity(...) | - |
463464
464465
mesh: spherical
465466
time interval: (np.datetime64('2000-01-02T12:00:00.000000000'), np.datetime64('2000-01-27T12:00:00.000000000'))

0 commit comments

Comments
 (0)