Skip to content

Commit 7303253

Browse files
Merge pull request #101 from epochpic/parametrize_pytest
Parametrize pytest
2 parents 31bb19c + ccfb059 commit 7303253

File tree

5 files changed

+406
-593
lines changed

5 files changed

+406
-593
lines changed

docs/key_functionality.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ and continue loading the SDF file as normal. This file contains the initial
155155
simulation setup information which is not present in SDF outputs. By loading
156156
this file, you can access these parameters as part of your dataset's metadata.
157157
To do this, use the ``deck_path`` parameter when loading an SDF file with
158-
`xarray.open_dataset`, `sdf_xarray.open_datatree`, `sdf_xarray.open_mfdataset`
159-
or `sdf_xarray.open_mfdatatree`.
158+
`sdf_xarray.open_dataset`, `xarray.open_dataset`, `sdf_xarray.open_datatree`,
159+
`xarray.open_datatree`, `sdf_xarray.open_mfdataset` or `sdf_xarray.open_mfdatatree`.
160160

161161
There are a few ways you can load an input deck:
162162

src/sdf_xarray/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def open_dataset(
268268

269269

270270
def open_mfdataset(
271-
path_glob: Iterable | str | Path | Callable[..., Iterable[Path]],
271+
paths: Iterable | str | Path | Callable[..., Iterable[Path]],
272272
*,
273273
separate_times: bool = False,
274274
keep_particles: bool = False,
@@ -301,7 +301,7 @@ def open_mfdataset(
301301
302302
Parameters
303303
----------
304-
path_glob
304+
paths
305305
List of filenames or string glob pattern
306306
separate_times
307307
If ``True``, create separate time dimensions for variables defined at
@@ -326,22 +326,22 @@ def open_mfdataset(
326326
from a relative or absolute file path. See :ref:`loading-input-deck` for details.
327327
"""
328328

329-
path_glob = _resolve_glob(path_glob)
329+
paths = _resolve_glob(paths)
330330

331331
if not separate_times:
332332
return combine_datasets(
333-
path_glob,
333+
paths,
334334
data_vars=data_vars,
335335
keep_particles=keep_particles,
336336
probe_names=probe_names,
337337
chunks=chunks,
338338
deck_path=deck_path,
339339
)
340340

341-
_, var_times_map = make_time_dims(path_glob)
341+
_, var_times_map = make_time_dims(paths)
342342

343343
all_dfs = []
344-
for f in path_glob:
344+
for f in paths:
345345
ds = xr.open_dataset(
346346
f,
347347
keep_particles=keep_particles,
@@ -451,7 +451,7 @@ def open_datatree(
451451

452452

453453
def open_mfdatatree(
454-
path_glob: Iterable | str | Path | Callable[..., Iterable[Path]],
454+
paths: Iterable | str | Path | Callable[..., Iterable[Path]],
455455
*,
456456
separate_times: bool = False,
457457
keep_particles: bool = False,
@@ -512,7 +512,7 @@ def open_mfdatatree(
512512
513513
Parameters
514514
----------
515-
path_glob
515+
paths
516516
List of filenames or string glob pattern
517517
separate_times
518518
If ``True``, create separate time dimensions for variables defined at
@@ -536,7 +536,7 @@ def open_mfdatatree(
536536
"""
537537
# First, combine the datasets as usual
538538
combined_ds = open_mfdataset(
539-
path_glob,
539+
paths,
540540
separate_times=separate_times,
541541
keep_particles=keep_particles,
542542
probe_names=probe_names,

0 commit comments

Comments
 (0)