Conversation
| if os.path.isdir(benchmark_path): | ||
| content = os.listdir(benchmark_path) | ||
| if 'info.yml' in content: | ||
| benchmark = Bench.from_yaml(benchmark_path) | ||
| else: | ||
| benchmark = Bench.from_folders(benchmark_path) |
There was a problem hiding this comment.
this could be in a bench.load method
There was a problem hiding this comment.
I'm confused because I don't see a bench.load method in benckmark.py
There was a problem hiding this comment.
you could make one, this woudl be basically what it does
| if benchmark.written: | ||
| # Create Task object |
There was a problem hiding this comment.
how could this ever be false from the CLI usage?
There was a problem hiding this comment.
I thought about this question, I don't think it would ever be false. But I thought to myself in case something goes wrong in the previous step and we magically reach here I'll put this check
There was a problem hiding this comment.
we don't do magic. I think the constructor would fail, so we don't need redundant logic.
| if benchmark.bench_name: | ||
| click.echo(f"Running {task_name} of benchmark {benchmark.bench_name} now") | ||
| benchmark.run_task(task_name, runner, log_path) | ||
| else: | ||
| click.echo(f"path {benchmark_path} doesn't seem to have a benchmark in it") |
There was a problem hiding this comment.
I think the error would be caught by the constructor, wouldn't it
| if benchmark.bench_name: | ||
| click.echo(f"Running {benchmark.bench_name} now") | ||
| benchmark.run(runner, log_path) | ||
| else: | ||
| click.echo(f"path {benchmark_path} doesn't seem to have a benchmark in it") |
Co-authored-by: Sarah Brown <brownsarahm@uri.edu>
closing #56
@brownsarahm is this close to what you had in mind?