Skip to content

Commit

Permalink
require output directory for RFE_analysis command
Browse files Browse the repository at this point in the history
  • Loading branch information
richardjgowers committed Nov 21, 2023
1 parent 347ccdd commit 75d8af5
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/openfe_analysis/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,14 @@ def cli():
file_okay=False,
dir_okay=True,
path_type=pathlib.Path))
def rfe_analysis(loc):
@click.argument('output', type=click.Path(writable=True,
dir_okay=False,
path_type=pathlib.Path))
def rfe_analysis(loc, output):
pdb = loc / "hybrid_system.pdb"
trj = loc / "simulation.nc"

data = rmsd.gather_rms_data(pdb, trj)
click.echo(json.dumps(data))

with click.open_file(output, 'w') as f:
f.write(json.dumps(data))

Check warning on line 29 in src/openfe_analysis/cli.py

View check run for this annotation

Codecov / codecov/patch

src/openfe_analysis/cli.py#L28-L29

Added lines #L28 - L29 were not covered by tests

0 comments on commit 75d8af5

Please sign in to comment.