Skip to content

Commit 1c1795b

Browse files
author
Alan Christie
committed
docs: Improve doc
1 parent dd22799 commit 1c1795b

File tree

4 files changed

+20
-16
lines changed

4 files changed

+20
-16
lines changed

tests/job-definitions/job-definitions.yaml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
---
2+
23
# Job definitions used exclusively for unit testing.
34
# They provide sufficient information to 'masquerade' as real jobs
4-
# and are served up by the UnitTestDatabaseAdapter (found in the tests directory).
5+
# and are served up by the UnitTestAPIAdapter (in 'tests/api_adapter.py').
56
#
6-
# This offers bare-essential job definitions that are used to test
7+
# This offers bare-essential definitions that are used simply to test
78
# the workflow engine. It does not fully comply with the Job definition schema -
8-
# only those that we need for testing the Workflow Engine.
9+
# only those parts that we need for testing the Workflow Engine.
910
#
10-
# All jobs used for unit testing must be defined in this file.
11+
# All jobs used for unit testing are defined in this file.
1112
#
12-
# For each job you must provide: -
13-
# - Job command
13+
# The 'command' module is expected to be found implemented as a Python 3 module in the
14+
# 'tests/jobs' directory. So the smiles-to-file 'command' module ('smiles-to-file.py')
15+
# must be placed in the 'jobs' directory, and it must comply with the variables
16+
# defined here.
1417
#
15-
# The command is meaningless as the job that is run is expected to be
16-
# a Python 3 module called <job>.py in the tests/jobs directory.
17-
# So a nop job would have a corresponding Python module called nop.py.
18-
# The test instance_launcher module will run the job.
18+
# Jobs are executed in the 'project-root/project-00000000-0000-0000-0000-000000000001'
19+
# directory that is created (and wiped) by the UnitTestInstanceLauncher
20+
# (in 'tests/instance_launcher.py').
1921

2022
collection: workflow-engine-unit-test-jobs
2123

tests/jobs/smiles-to-file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
parser = argparse.ArgumentParser(
44
prog="smiles-to-file",
5-
description="Takes an input SMILES string and writes it to a file",
5+
description="Takes a SMILES string and writes it to a file",
66
)
77
parser.add_argument("-s", "--smiles", required=True)
88
parser.add_argument("-o", "--outputFile", required=True)

tests/project-root/README.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
This is the directory used as the working directory for any workflow Job executions.
2-
Any and all files generated by Jobs will be placed in a project directory here.
3-
So expect to find a temporary project directory called
4-
`project-00000000-0000-0000-0000-000000000001` with files in it here.
1+
The 'project-root' directory where the UnitTestInstanceLauncher creates the test
2+
project directory, simulating the file-system environment of the DataManager.
3+
Any and all files generated by step Jobs will be written to the test project directory
4+
(`project-00000000-0000-0000-0000-000000000001`).
5+
6+
The directory is created (and wiped) every time a UnitTestInstanceLauncher is created.

tests/workflow-definitions/example-nop-fail.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
kind: DataManagerWorkflow
33
kind-version: "2024.1"
4-
name: two-step-nop
4+
name: nop-fail
55
description: >-
66
A workflow with one step that fails
77
steps:

0 commit comments

Comments
 (0)