File tree Expand file tree Collapse file tree 6 files changed +20
-28
lines changed Expand file tree Collapse file tree 6 files changed +20
-28
lines changed Original file line number Diff line number Diff line change @@ -9,9 +9,9 @@ Changelog
99
1010 version 1.3.0-dev
1111---------------------------
12-
12+ + Added missing `` help `` section for `` --tag ``.
1313+ Documentation: added usage chapter for pytest-workflow specific options.
14- + Added missing ` help ` for ` --tag ` .
14+ + Documentation: updated Cromwell example .
1515+ Removed redundant references to pylint in code comments and CI.
1616+ Remove Codacy from the CI.
1717
Original file line number Diff line number Diff line change @@ -40,20 +40,13 @@ repository with the following contents:
4040
4141 {
4242 "final_workflow_outputs_dir" : " test-output" ,
43- "use_relative_output_paths" : true ,
44- "default_runtime_attributes" : {
45- "docker_user" : " $EUID"
46- }
43+ "use_relative_output_paths" : true
4744 }
4845
4946 ``final_workflow_outputs_dir `` will make sure all the files produced in the
5047workflow will be copied to the ``final_workflow_outputs_dir ``.
5148``use_relative_output_paths `` will get rid of all the Cromwell specific folders
52- such as ``call-myTask `` etc. The ``default_runtime_attributes `` are only
53- necessary when using docker containers. It will make sure all the files are
54- created by the same user that runs the test (docker containers run as root by
55- default). This will ensure that files can be deleted by pytest-workflow
56- afterwards.
49+ such as ``call-myTask `` etc.
5750
5851The following yaml file tests a Cromwell pipeline. In this case Cromwell is
5952installed via conda. The conda installation adds a wrapper to Cromwell so it
Original file line number Diff line number Diff line change @@ -10,15 +10,15 @@ In a virtual environment
1010
1111- Create a new python3 virtual environment.
1212- Make sure your virtual environment is activated.
13- - Install using pip ``pip install pytest-workflow ``
13+ - Install using pip ``pip install pytest-workflow ``.
1414
1515On Ubuntu or Debian
1616-------------------
1717
1818- This requires the ``python3 `` and ``python3-pip `` packages to be installed.
1919- Installing
2020
21- - system-wide: ``sudo python3 -m pip install pytest-workflow ``
21+ - system-wide: ``sudo python3 -m pip install pytest-workflow ``.
2222 - for your user only (no sudo needed):
2323 ``python3 -m pip install --user pytest-workflow ``
2424- ``pytest `` can now be run with ``python3 -m pytest ``.
@@ -43,4 +43,4 @@ To install with conda:
4343 - If you want to use pytest-workflow together with bioconda you can follow
4444 `the instructions here
4545 <https://bioconda.github.io/index.html#set-up-channels> `_.
46- - ``conda install pytest-workflow ``
46+ - ``conda install pytest-workflow ``.
Original file line number Diff line number Diff line change @@ -14,6 +14,12 @@ The workflows are run automatically. Each workflow gets its own temporary
1414directory to run. The ``stdout `` and ``stderr `` of the workflow command are
1515also saved to this directory to ``log.out `` and ``log.err `` respectively.
1616
17+ To check the progress of a workflow while it is running you can use ``tail -f ``
18+ on the ``stdout `` or ``stderr `` file of the workflow. The locations of these
19+ files are reported in the log as soon as a workflow is started.
20+
21+ Specific pytest options for pytest workflow
22+ ------------------------------------------------
1723
1824.. argparse ::
1925 :module: pytest_workflow.plugin
@@ -53,10 +59,6 @@ To run multiple workflows simultaneously you can use
5359of workflows that can be run simultaneously. This will speed up things if
5460you have enough resources to process these workflows simultaneously.
5561
56- To check the progress of a workflow while it is running you can use ``tail -f ``
57- on the ``stdout `` or ``stderr `` file of the workflow. The locations of these
58- files are reported in the log as soon as a workflow is started.
59-
6062Running specific workflows
6163----------------------------
6264To run a specific workflow use the ``--tag `` flag. Each workflow is tagged with
Original file line number Diff line number Diff line change @@ -88,18 +88,15 @@ workflow.
8888
8989 @pytest.mark.workflow (name = ' files containing numbers' )
9090 def test_div_by_three (workflow_dir ):
91- number_file = workflow_dir / pathlib.Path(" 123.txt" )
92-
93- with number_file.open(' rt' ) as file_h:
94- number_file_content = file_h.read()
95-
91+ number_file = pathlib.Path(workflow_dir, " 123.txt" )
92+ number_file_content = number_file.read_text()
9693 assert int (number_file_content) % 3 == 0
9794
9895 The ``@pytest.mark.workflow(name='files containing numbers') `` marks the test
99- as belonging to a workflow named ' files containing numbers' . The mark can also
100- be written without the explicit ``name `` key as `` @pytest.mark.workflow('files
101- containing nummbers') ``. This test will only run if the workflow 'files
102- containing numbers' has run.
96+ as belonging to a workflow named `` files containing numbers `` . The mark can
97+ also be written without the explicit ``name `` key as
98+ `` @pytest.mark.workflow('files containing nummbers') ``. This test will only run
99+ if the workflow 'files containing numbers' has run.
103100
104101``workflow_dir `` is a fixture. It does not work without a
105102``pytest.mark.workflow('workflow_name') `` mark. This is a
Original file line number Diff line number Diff line change @@ -44,7 +44,7 @@ def pytest_addoption(parser: PytestParser):
4444 action = "store_true" ,
4545 help = "Keep temporary directories where workflows are run for "
4646 "debugging purposes. This also triggers saving of stdout and "
47- "stderr in the workflow directory" ,
47+ "stderr in the workflow directory. " ,
4848 dest = "keep_workflow_wd" )
4949 parser .addoption (
5050 "--kwdof" , "--keep-workflow-wd-on-fail" ,
You can’t perform that action at this time.
0 commit comments