Skip to content

Commit 1f40c3a

Browse files
erikvansebillepre-commit-ci[bot]VeckoTheGecko
authored
Renaming the default_* fields to ship_* fields (#125)
* Renaming the default_* fields to ship_* fields * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Changing more function names to ship_* * Renaming input files in test-directory * remove sphinx-autodoc-typehints dep --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Vecko <36369090+VeckoTheGecko@users.noreply.github.com>
1 parent c5a017e commit 1f40c3a

9 files changed

Lines changed: 19 additions & 19 deletions

File tree

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"sphinx.ext.intersphinx",
1515
"sphinx.ext.mathjax",
1616
"sphinx.ext.napoleon",
17-
"sphinx_autodoc_typehints",
17+
# "sphinx_autodoc_typehints",# https://github.com/OceanParcels/virtualship/pull/125#issuecomment-2668766302
1818
"sphinx_copybutton",
1919
]
2020

docs/user-guide/tutorials/Drifter_data_tutorial.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"outputs": [],
6363
"source": [
6464
"expedition_directory = Path(\"/Users/erik/Desktop/VSC_AgulhasDrifters\")\n",
65-
"fieldset = InputData._load_default_fieldset(expedition_directory)"
65+
"fieldset = InputData._load_ship_fieldset(expedition_directory)"
6666
]
6767
},
6868
{

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,6 @@ dependencies:
3131
- ipykernel
3232
- pandoc
3333
- sphinx-copybutton
34-
- sphinx-autodoc-typehints
34+
# - sphinx-autodoc-typehints # https://github.com/OceanParcels/virtualship/pull/125#issuecomment-2668766302
3535
- pydata-sphinx-theme
3636
- sphinx-autobuild

src/virtualship/cli/commands.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,17 +155,17 @@ def fetch(path: str | Path, username: str | None, password: str | None) -> None:
155155
"UVdata": {
156156
"dataset_id": "cmems_mod_glo_phy-cur_anfc_0.083deg_PT6H-i",
157157
"variables": ["uo", "vo"],
158-
"output_filename": "default_uv.nc",
158+
"output_filename": "ship_uv.nc",
159159
},
160160
"Sdata": {
161161
"dataset_id": "cmems_mod_glo_phy-so_anfc_0.083deg_PT6H-i",
162162
"variables": ["so"],
163-
"output_filename": "default_s.nc",
163+
"output_filename": "ship_s.nc",
164164
},
165165
"Tdata": {
166166
"dataset_id": "cmems_mod_glo_phy-thetao_anfc_0.083deg_PT6H-i",
167167
"variables": ["thetao"],
168-
"output_filename": "default_t.nc",
168+
"output_filename": "ship_t.nc",
169169
},
170170
}
171171

src/virtualship/expedition/input_data.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -52,21 +52,21 @@ def load(
5252
else:
5353
argo_float_fieldset = None
5454
if load_adcp or load_ctd or load_ship_underwater_st or load_xbt:
55-
default_fieldset = cls._load_default_fieldset(directory)
55+
ship_fieldset = cls._load_ship_fieldset(directory)
5656
if load_adcp:
57-
adcp_fieldset = default_fieldset
57+
adcp_fieldset = ship_fieldset
5858
else:
5959
adcp_fieldset = None
6060
if load_ctd:
61-
ctd_fieldset = default_fieldset
61+
ctd_fieldset = ship_fieldset
6262
else:
6363
ctd_fieldset = None
6464
if load_ship_underwater_st:
65-
ship_underwater_st_fieldset = default_fieldset
65+
ship_underwater_st_fieldset = ship_fieldset
6666
else:
6767
ship_underwater_st_fieldset = None
6868
if load_xbt:
69-
xbt_fieldset = default_fieldset
69+
xbt_fieldset = ship_fieldset
7070
else:
7171
xbt_fieldset = None
7272

@@ -80,12 +80,12 @@ def load(
8080
)
8181

8282
@classmethod
83-
def _load_default_fieldset(cls, directory: Path) -> FieldSet:
83+
def _load_ship_fieldset(cls, directory: Path) -> FieldSet:
8484
filenames = {
85-
"U": directory.joinpath("default_uv.nc"),
86-
"V": directory.joinpath("default_uv.nc"),
87-
"S": directory.joinpath("default_s.nc"),
88-
"T": directory.joinpath("default_t.nc"),
85+
"U": directory.joinpath("ship_uv.nc"),
86+
"V": directory.joinpath("ship_uv.nc"),
87+
"S": directory.joinpath("ship_s.nc"),
88+
"T": directory.joinpath("ship_t.nc"),
8989
}
9090
variables = {"U": "uo", "V": "vo", "S": "so", "T": "thetao"}
9191
dimensions = {

tests/expedition/expedition_dir/input_data/.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
!argo_float_t.nc
33
!argo_float_uv.nc
44
!bathymetry.nc
5-
!default_s.nc
6-
!default_t.nc
7-
!default_uv.nc
5+
!ship_s.nc
6+
!ship_t.nc
7+
!ship_uv.nc
88
!drifter_t.nc
99
!drifter_uv.nc

tests/expedition/expedition_dir/input_data/default_s.nc renamed to tests/expedition/expedition_dir/input_data/ship_s.nc

File renamed without changes.

tests/expedition/expedition_dir/input_data/default_t.nc renamed to tests/expedition/expedition_dir/input_data/ship_t.nc

File renamed without changes.

tests/expedition/expedition_dir/input_data/default_uv.nc renamed to tests/expedition/expedition_dir/input_data/ship_uv.nc

File renamed without changes.

0 commit comments

Comments
 (0)