Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for running Dockstore page URLs and TRS IDs #5102

Merged
merged 60 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
413d2bc
Add support for running Dockstore page URLs and TRS IDs
adamnovak Sep 24, 2024
90071d7
Add missing cast to satisfy typing
adamnovak Sep 24, 2024
98e64c6
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Sep 26, 2024
dfca680
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Sep 26, 2024
e369caf
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Sep 26, 2024
46580f5
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Sep 30, 2024
1bd7c13
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 1, 2024
2b6ea10
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 3, 2024
a491cca
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 3, 2024
d70127c
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 3, 2024
42ebea5
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 4, 2024
e0bf621
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 4, 2024
869d09d
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 7, 2024
35f5a60
Start porting over to ZIP download based TRS retrieval
adamnovak Oct 7, 2024
d89da40
Finish ZIP download and use a workflow cache to avoid responsibility …
adamnovak Oct 8, 2024
8b9b2a8
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 8, 2024
d911fbf
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 9, 2024
2f73546
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 9, 2024
070130f
Merge remote-tracking branch 'upstream/master' into issues/5049-run-f…
adamnovak Oct 11, 2024
81f0c71
Fix tests and add always-cached test
adamnovak Oct 11, 2024
de8fddd
Add session with user agent for TRS requests
adamnovak Oct 11, 2024
02a9d7f
Stop passing extra URL to fetch
adamnovak Oct 14, 2024
924ca23
Merge remote-tracking branch 'upstream/master' into issues/5049-run-f…
adamnovak Oct 14, 2024
69f03bc
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 21, 2024
3877cfc
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 22, 2024
d27c1a7
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 22, 2024
d51b54f
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 22, 2024
084bb6d
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 22, 2024
117f10b
Merge branch 'master' into issues/5049-run-from-dockstore
adamnovak Oct 24, 2024
e2a69e8
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 25, 2024
daa5bd1
Add missing comma
adamnovak Oct 25, 2024
ee88b53
Merge remote-tracking branch 'upstream/issues/5049-run-from-dockstore…
adamnovak Oct 25, 2024
40e8ce3
Add docstring and boilerplate to new file
adamnovak Oct 25, 2024
e97308c
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 28, 2024
3d3d656
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 30, 2024
ad5a182
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Oct 31, 2024
626ae1a
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Nov 1, 2024
79fd113
Merge master into issues/5049-run-from-dockstore
github-actions[bot] Nov 5, 2024
893d2ae
Add missing import
adamnovak Nov 6, 2024
38ec75b
Move Slurm test to Python 3.9 (latest installed in its Docker images)
adamnovak Nov 6, 2024
18c2b31
Bump psutil and remove cast MyPy suddenly hates in CI but not on my m…
adamnovak Nov 6, 2024
9db3484
Remove some 3.8-isms
adamnovak Nov 6, 2024
0db8b91
Pyupgrade the new integration file
adamnovak Nov 6, 2024
d26b6d7
Remove more 3.8-isms
adamnovak Nov 6, 2024
93d8130
Don't leave behind job store if CWL options don't parse, and add more…
adamnovak Nov 6, 2024
c4a278e
Revert "Remove more 3.8-isms"
adamnovak Nov 6, 2024
d9119f1
Revert "Remove some 3.8-isms"
adamnovak Nov 6, 2024
470a7a3
Remove List
adamnovak Nov 6, 2024
16d229a
Remove 3.10 type that shouldn't be needed
adamnovak Nov 6, 2024
c5455a3
Fix error string placeholder
adamnovak Nov 7, 2024
7b756d8
Take over manual management of CWL job order options and their metava…
adamnovak Nov 7, 2024
141d951
Remove now-false note about needing = syntax
adamnovak Nov 7, 2024
5b875b9
Update the Mesos repo snapshot
adamnovak Nov 8, 2024
f9df47c
Actually update the Mesos repo snapshot
adamnovak Nov 8, 2024
5516a81
Try and fix flaky parallel recursive service test by bounding failure…
adamnovak Nov 8, 2024
493d29b
Eliminate randInt references
adamnovak Nov 8, 2024
d8d2423
Fix perfect version of service tests
adamnovak Nov 8, 2024
ad78aa4
Fix and test PerfectServiceTest
adamnovak Nov 8, 2024
1c8faf0
Stop printing command line options to toil-cwl-runner standard output
adamnovak Nov 12, 2024
fb71178
Fix WDL argument parsing for 3.12 behavior
adamnovak Nov 12, 2024
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
7 changes: 3 additions & 4 deletions contrib/slurm-test/slurm_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,13 @@ docker cp -L sort.py ${LEADER}:/home/admin
docker cp fileToSort.txt ${LEADER}:/home/admin
docker cp toil_workflow.py ${LEADER}:/home/admin
GIT_COMMIT=$(git rev-parse HEAD)
docker exec ${LEADER} sudo apt install python3-pip -y
docker exec ${LEADER} pip3 install "git+https://github.com/DataBiosphere/toil.git@${GIT_COMMIT}"
docker exec ${LEADER} python3.9 -m pip install "git+https://github.com/DataBiosphere/toil.git@${GIT_COMMIT}"
docker exec ${LEADER} sinfo -N -l
# Test 1: A really basic workflow to check Slurm is working correctly
docker exec ${LEADER} python3 /home/admin/toil_workflow.py file:my-job-store --batchSystem slurm --disableCaching --retryCount 0 --batchLogsDir ./nonexistent/paths
docker exec ${LEADER} python3.9 /home/admin/toil_workflow.py file:my-job-store --batchSystem slurm --disableCaching --retryCount 0 --batchLogsDir ./nonexistent/paths
docker cp ${LEADER}:/home/admin/output.txt output_Docker.txt
# Test 2: Make sure that "sort" workflow runs under slurm
docker exec ${LEADER} python3 /home/admin/sort.py file:my-job-store --batchSystem slurm --disableCaching --retryCount 0
docker exec ${LEADER} python3.9 /home/admin/sort.py file:my-job-store --batchSystem slurm --disableCaching --retryCount 0
docker cp ${LEADER}:/home/admin/sortedFile.txt sortedFile.txt
docker compose stop
./check_out.sh
Expand Down
7 changes: 4 additions & 3 deletions docker/Dockerfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,12 @@ def heredoc(s):
# Find a repo with a Mesos build.
# This one was archived like:
# mkdir mesos-repo && cd mesos-repo
# wget --recursive --restrict-file-names=windows -k --convert-links --no-parent --page-requisites https://rpm.aventer.biz/Ubuntu/ https://www.aventer.biz/assets/support_aventer.asc https://rpm.aventer.biz/README.txt
# wget --recursive --restrict-file-names=windows -k --convert-links --no-parent --page-requisites -m https://rpm.aventer.biz/Ubuntu/ https://www.aventer.biz/assets/support_aventer.asc https://rpm.aventer.biz/README.txt
# ipfs add -r .
RUN echo "deb https://public.gi.ucsc.edu/~anovak/outbox/toil/ipfs/QmeaErHzK4Dajz2mCMd36eUDQp7GX2bSECVRpGfrqdragR/rpm.aventer.biz/Ubuntu/focal focal main" \
# It contains a GPG key that will expire 2026-09-28
RUN echo "deb https://public.gi.ucsc.edu/~anovak/outbox/toil/ipfs/QmRXnGNiWk523zgNkuamENVkghMJ2zJtinVfgjHbc4Dcpr/rpm.aventer.biz/Ubuntu/focal focal main" \
> /etc/apt/sources.list.d/mesos.list \
&& curl https://public.gi.ucsc.edu/~anovak/outbox/toil/ipfs/QmeaErHzK4Dajz2mCMd36eUDQp7GX2bSECVRpGfrqdragR/www.aventer.biz/assets/support_aventer.asc | apt-key add -
&& curl https://public.gi.ucsc.edu/~anovak/outbox/toil/ipfs/QmRXnGNiWk523zgNkuamENVkghMJ2zJtinVfgjHbc4Dcpr/www.aventer.biz/assets/support_aventer.asc | apt-key add -

RUN apt-get -y update --fix-missing && \
DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requests<=2.31.0
docker>=6.1.0, <8
urllib3>=1.26.0,<3
python-dateutil
psutil >= 3.0.1, < 7
psutil >= 6.1.0, < 7
PyPubSub >=4.0.3, <5
addict>=2.2.1, <2.5
backports.zoneinfo[tzdata];python_version<"3.9"
Expand Down
38 changes: 28 additions & 10 deletions src/toil/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -777,29 +777,47 @@ def check_arguments(typ: str) -> None:

# if cwl is set, format the namespace for cwl and check that wdl options are not set on the command line
if cwl:
parser.add_argument("cwltool", type=str, help="CWL file to run.")
parser.add_argument(
"cwljob",
nargs="*",
help="Input file or CWL options. If CWL workflow takes an input, "
"the name of the input can be used as an option. "
'For example: "%(prog)s workflow.cwl --file1 file". '
"If an input has the same name as a Toil option, pass '--' before it.",
)
# So we can manually write out the help for this and the inputs
# file/workflow options in the argument parser description, we suppress
# help for this option.
parser.add_argument("cwltool", metavar="WORKFLOW", type=str, help=SUPPRESS)
# We also need a "cwljob" command line argument, holding possibly a
# positional input file and possibly a whole string of option flags
# only known to the workflow.
#
# We don't want to try and parse out the positional argument here
# since, on Python 3.12, we can grab what's really supposed to be an
# argument to a workflow-defined option.
#
# We don't want to use the undocumented argparse.REMAINDER, since that
# will eat any Toil-defined option flags after the first positional
# argument.
#
# So we just use parse_known_args and dump all unknown args into it,
# and manually write help text in the argparse description. So don't
# define it here.
check_arguments(typ="cwl")

# if wdl is set, format the namespace for wdl and check that cwl options are not set on the command line
if wdl:
parser.add_argument("wdl_uri", type=str, help="WDL document URI")
# We want to have an inputs_url that can be either a positional or a flag.
# We can't just have them share a single-item dest in Python 3.12;
# argparse does not guarantee that will work, and we can get the
# positional default value clobbering the flag. See
# <https://stackoverflow.com/a/60531838>.
# So we make them accumulate to the same list.
# Note that we will get a None in the list when there's no positional inputs.
parser.add_argument(
"inputs_uri", type=str, nargs="?", help="WDL input JSON URI"
"inputs_uri", type=str, nargs='?', action="append", help="WDL input JSON URI"
)
parser.add_argument(
"--input",
"--inputs",
"-i",
dest="inputs_uri",
type=str,
action="append",
help="WDL input JSON URI",
)
check_arguments(typ="wdl")
Expand Down
Loading
Loading