Skip to content

Commit

Permalink
test: add test of using bl chunk size None
Browse files Browse the repository at this point in the history
  • Loading branch information
steven-murray committed Jul 24, 2024
1 parent 6114561 commit 88df480
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion hera_opm/tests/test_lstbin_makeflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def make_lstbin_config_file(
lstbin_opts=None,
file_cfg=None,
lstavg_opts=None,
bl_chunk_size: int | None = 5000,
):
"""Make a lstbin config file."""
options = {
Expand Down Expand Up @@ -55,7 +56,7 @@ def make_lstbin_config_file(
lstavg_opts = {
**{
"outdir": "../data",
"bl_chunk_size": 5000,
"bl_chunk_size": bl_chunk_size,
"fname_format": "{inpaint_mode}/zen.{kind}.{lst:7.5f}.sum.uvh5",
"overwrite": True,
"write_med_mad": True,
Expand Down Expand Up @@ -104,6 +105,18 @@ def lsttoml_direct_datafiles(tmp_path_factory) -> Path:
return fl


@pytest.fixture(scope="module")
def lsttoml_direct_datafiles_blchunk_none(tmp_path_factory) -> Path:
"""Make a direct lstbin config file."""
fl = tmp_path_factory.mktemp("data") / "lstbin_direct.toml"
make_lstbin_config_file(
fl,
datafiles=["zen.2458043.40141.HH.uvh5", "zen.2458043.40887.HH.uvh5"],
bl_chunk_size=None,
)
return fl


@pytest.fixture(scope="module")
def lsttoml_direct_datafiles_glob(tmp_path_factory) -> Path:
"""Make a direct lstbin config file."""
Expand Down Expand Up @@ -161,6 +174,7 @@ def lsttoml_notebook_datafiles(
"config_file",
[
"lsttoml_direct_datafiles",
"lsttoml_direct_datafiles_blchunk_none",
"lsttoml_direct_datafiles_glob",
"lsttoml_notebook_datafiles",
],
Expand Down

0 comments on commit 88df480

Please sign in to comment.