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

Added pytest coverage including documentation #196

Merged
merged 1 commit into from
Apr 28, 2023
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
2 changes: 2 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[run]
omit = test/*, setup.py
29 changes: 23 additions & 6 deletions docs/source/development.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The following programs need to be available locally:

- Java runtime (in order to run `etomo` in BRT)
- ffmpeg (in order to create movies)
- IMOD package: https://bio3d.colorado.edu/imod/

Similar to the HPC Set up below, you can locally set up `dev` and `qa` virtual envs.

Expand Down Expand Up @@ -205,19 +206,35 @@ To contribute to the project first ensure your fork is in good shape, and then t
Testing
*******

There are currently four Pytest files in the `test` directory:
There are currently five Pytest files in the `test` directory:

- test_dm: 2D
- test_brt: batchruntomo
- test_sem:
- test_callback: I believe this test is out-of-date and needs some fixing
- test_brt: end-to-end test of batchruntomo pipeline
- test_callback: This test is out-of-date and will likely go away
- test_dm: 2D end-to-end pipeline test
- test_sem: end-to-end test of FIBSEM pipeline
- test_utils: unit tests of utils/utils.py module

There is test data for `test_dm` in the Git repo, but not for the other two. These files need to be
downloaded from the HPC machines. The following script will copy them:

`test/copy_test_data.sh`

These files are quite large, so you may want to run each line separately at the command line.
These files are quite large, so you may want to run each line separately at the command line. Some unit tests also require
the results of previous ``test_brt`` runs, specifically in the Assets directory. So you must run test_brt before the complete
test suite will work.

To run the entire test suite, in the portal_image_workflows directory, run:

.. code-block::

$ pytest test

To determine the test coverage, in the portal_image_workflows directory, run:

.. code-block::

$ pytest --cov="." --cov-config=.coveragerc test



********************
Expand Down
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
pytest
coverage
pytest-cov
prefect==1.*
dask
distributed
Expand Down