Skip to content

Commit

Permalink
BUG: missing changes to md_out_dir param name change (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
lizgehret committed Oct 4, 2023
1 parent 347dc8a commit 3d58c39
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions q2cli/builtin/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,7 +997,7 @@ def provenance_replay(
suppress_header: bool = False,
verbose: bool = True,
dump_recorded_metadata: bool = True,
metadata_out_fp: str = ''
metadata_out_dir: str = ''
):
"""
Replay provenance from a QIIME 2 Artifact filepath to a written executable
Expand Down Expand Up @@ -1026,7 +1026,7 @@ def provenance_replay(
suppress_header=suppress_header,
verbose=verbose,
dump_recorded_metadata=dump_recorded_metadata,
md_out_fp=metadata_out_fp
md_out_dir=metadata_out_dir
)
filename = os.path.realpath(out_fp)
click.echo(f'{usage_driver} replay script written to {filename}')
Expand Down
9 changes: 6 additions & 3 deletions q2cli/tests/test_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ def test_dump_recorded_md_file_to_custom_dir(self):

with tempfile.TemporaryDirectory() as tempdir:
cfg = ReplayConfig(use=ReplayCLIUsage(),
pm=self.pm, md_out_fp=(tempdir + '/' + out_dir))
pm=self.pm,
md_out_dir=(tempdir + '/' + out_dir))
dump_recorded_md_file(cfg, provnode, action_name, md_id, fn)
out_path = pathlib.Path(tempdir) / out_dir / action_name / fn

Expand Down Expand Up @@ -350,7 +351,8 @@ def test_replay_optional_param_is_none(self):
dag = self.das.int_seq_optional_input.dag
with tempfile.TemporaryDirectory() as tempdir:
out_path = pathlib.Path(tempdir) / 'ns_coll.txt'
replay_provenance(ReplayCLIUsage, dag, out_path, md_out_fp=tempdir)
replay_provenance(ReplayCLIUsage, dag, out_path,
md_out_dir=tempdir)

with open(out_path, 'r') as fp:
rendered = fp.read()
Expand All @@ -377,7 +379,8 @@ def test_replay_from_provdag_ns_collision(self):
exp = ['concatenated-ints-0', 'concatenated-ints-1']
with tempfile.TemporaryDirectory() as tempdir:
out_path = pathlib.Path(tempdir) / 'ns_coll.txt'
replay_provenance(ReplayCLIUsage, dag, out_path, md_out_fp=tempdir)
replay_provenance(ReplayCLIUsage, dag, out_path,
md_out_dir=tempdir)

with open(out_path, 'r') as fp:
rendered = fp.read()
Expand Down

0 comments on commit 3d58c39

Please sign in to comment.