Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion src/ephemeris/shed_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,7 @@ def test_tools(self,
log=None,
test_user_api_key=None,
test_user="ephemeris@galaxyproject.org",
test_history_name=None,
parallel_tests=1,
test_all_versions=False,
client_test_config_path=None,
Expand Down Expand Up @@ -261,7 +262,16 @@ def test_tools(self,
else:
client_test_config = None

test_history = galaxy_interactor.new_history()
if test_history_name:
for history in self.gi.histories.get_histories(name=test_history_name, deleted=False):
test_history = history['id']
log.debug("Using existing history with id '%s', last updated: %s",
test_history, history['update_time'])
break
else:
test_history = galaxy_interactor.new_history(history_name=test_history_name)
else:
test_history = galaxy_interactor.new_history()

with ThreadPoolExecutor(max_workers=parallel_tests) as executor:
try:
Expand Down Expand Up @@ -624,6 +634,7 @@ def main():
log=log,
test_user_api_key=args.test_user_api_key,
test_user=args.test_user,
test_history_name=args.test_history_name,
parallel_tests=args.parallel_tests,
test_all_versions=args.test_all_versions,
client_test_config_path=args.client_test_config,
Expand Down
9 changes: 9 additions & 0 deletions src/ephemeris/shed_tools_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,15 @@ def parser():
"--test_user_api_key isn't specified, this user email will be used. This "
"user will be created if needed."
)
test_command_parser.add_argument(
"--test_history_name",
dest="test_history_name",
default=None,
help="Use existing history or create history with provided name if none exists. "
"If --test_history_name is not set, a new history with a default name will always "
"be created. If multiple histories match the provided name, the first (newest) "
"one returned by the Galaxy API will be selected."
)
test_command_parser.add_argument(
"--parallel_tests",
dest="parallel_tests",
Expand Down