Skip to content

Update testing instructions #96

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.9
2 changes: 1 addition & 1 deletion JobRunner/SpecialRunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ def _readio(self, p, job_id, queues):

def _wdl_run(self, stype, config, data, job_id, queues):
"""
This subbmits the job to the batch system and starts
This submits the job to the batch system and starts
a thread to monitor the progress.

"""
Expand Down
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,22 @@ export SDK_CALLBACK_URL=http://localhost:9999
Here is a quick start guide for running test for the Job Runner code.
See the SDK guide for information about running test of SDK apps.

Note that the
[cromwell-44.jar](https://github.com/broadinstitute/cromwell/releases/download/44/cromwell-44.jar)
file must exist in your `$HOME` directory, as well as a `cromwell.conf` file, which can be
empty. Java 8 is required to run Cromwell.

Also note that there are `uv` `pyproject.toml` and `uv.lock` files provided for your
comfort and convenience. They currently are not integrated into builds and must manually be kept
in sync with the `requirements*.txt` files, but they can simplify running tests.

```
pip install -r requirements.txt -r requirements-dev.txt

# Set the DOCKER_HOST if this doesn't work out of the box
export DOCKER_HOST=unix://$HOME/.docker/run/docker.sock

# Be sure to set both tokens and the KB_BASE_URL
# Be sure to set both tokens and the KB_BASE_URL. Other variables are optional.
export KB_AUTH_TOKEN="xxxxxxxxx"
export KB_ADMIN_AUTH_TOKEN="xxxxxxxxxxxx"
export KB_BASE_URL=https://ci.kbase.us/services
Expand Down
22 changes: 22 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[project]
name = "jobrunner"
version = "0.0.2"
description = "The EE2 JobRunner for kB_SDK apps."
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"docker==7.0.0",
"requests==2.31.0",
"sanic==21.12.2",
"uvloop==0.19.0",
"websocket-client==1.7.0",
"websockets==10.0",
]

[dependency-groups]
dev = [
"aiohttp==3.9.1",
"nose==1.3.7",
"nose-cov>=1.6",
"sanic-testing==0.8.3",
]
5 changes: 5 additions & 0 deletions test/test_specialrunner.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,10 @@ def test_run_wdl(self):
for line in output:
if line["line"].find("workflow finished with status 'Succeeded'") > 0:
count += 1
if not count:
print("\n\ntest_run_wdl logs:")
for line in output:
print(line["line"])
print()
self.assertTrue(count)
self.assertLess(self.logger.ct, 10)
Loading
Loading