Skip to content

Commit

Permalink
Merge branch 'multi-lst-blchunk' of github.com:hera-team/hera_opm int…
Browse files Browse the repository at this point in the history
…o multi-lst-blchunk
  • Loading branch information
steven-murray committed Jul 24, 2024
2 parents 88df480 + 59d58a1 commit 0ae85af
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 79 deletions.
1 change: 0 additions & 1 deletion hera_opm/mf_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1356,7 +1356,6 @@ def make_lstbin_config_file(
print(f"{flist[0].parent.name}: {len(flist)}")

matched_files = lstconfig.get_matched_files()

lst_file_config = lstconfig.create_config(matched_files)

lstbin_config_file = Path(outdir) / "file-config.h5"
Expand Down
78 changes: 0 additions & 78 deletions hera_opm/tests/test_lstbin_makeflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,6 @@ def lsttoml_notebook_datafiles(
return fl


# @pytest.mark.filterwarnings("ignore:The default for the `center` keyword has changed")
# @pytest.mark.filterwarnings("ignore: A value for the")
# @pytest.mark.filterwarnings("ignore:dlst should not be set to (string) 'None'")
@pytest.mark.parametrize(
"config_file",
[
Expand Down Expand Up @@ -208,78 +205,3 @@ def test_build_makeflow_from_config_lstbin_options(

# make sure the output files we expected appeared
assert outfile.exists()


# @hc_skip
# @pytest.mark.filterwarnings("ignore:The default for the `center` keyword has changed")
# @pytest.mark.filterwarnings("ignore:dlst should not be set to (string) 'None'")
# @pytest.mark.parametrize(
# "provide_outfile,v2", [(False, False), (True, False), (False, True)]
# )
# def test_build_lstbin_makeflow_from_config(
# config_options, tmp_path_factory, provide_outfile: bool, v2: bool
# ):
# # define load in config
# config_file = config_options["config_file_lstbin"]

# if v2:
# config_file = config_file.replace("lstbin", "lstbin_v2")

# # setup vars
# work_dir = tmp_path_factory.mktemp("test_output")
# if provide_outfile:
# mf_output = "output.mf"
# else:
# mf_output = os.path.splitext(os.path.basename(config_file))[0] + ".mf"
# outfile = work_dir / mf_output

# kwargs = {"work_dir": str(work_dir), "parent_dir": DATA_PATH, "outdir": work_dir}
# if provide_outfile:
# kwargs["mf_name"] = outfile

# mt.build_lstbin_makeflow_from_config(config_file, **kwargs)

# # make sure the output files we expected appeared
# assert outfile.exists()

# # check that the wrapper scripts have the right lines in them
# wrapper_scripts = [
# f for f in sorted(os.listdir(work_dir)) if f.startswith("wrapper_")
# ]
# with open(work_dir / wrapper_scripts[0]) as infile:
# lines = infile.readlines()
# assert lines[0].strip() == "#!/bin/bash"
# assert lines[1].strip() == "source ~/.bashrc"
# assert lines[2].strip() == "conda activate hera"
# assert lines[3].strip() == "date"


# @hc_skip
# @pytest.mark.filterwarnings("ignore:The default for the `center` keyword has changed")
# @pytest.mark.filterwarnings("ignore: A value for the")
# @pytest.mark.parametrize("provide_outfile", [True, False])
# def test_build_lstbin_makeflow_from_config_options(
# config_options, tmp_path_factory, provide_outfile
# ):
# # define load in config
# config_file = config_options["config_file_lstbin_options"]

# # setup vars
# work_dir = tmp_path_factory.mktemp("test_output")
# if provide_outfile:
# mf_output = "output.mf"
# else:
# mf_output = os.path.splitext(os.path.basename(config_file))[0] + ".mf"

# outfile = work_dir / mf_output

# mt.build_lstbin_makeflow_from_config(
# config_file,
# mf_name=outfile,
# work_dir=str(work_dir),
# parent_dir=DATA_PATH,
# outdir=work_dir,
# )

# # make sure the output files we expected appeared
# assert outfile.exists()

0 comments on commit 0ae85af

Please sign in to comment.