@@ -7,7 +7,7 @@ be tested via [`pytest`][pytest] up to a certain level, some (most?) of them
7
7
should even work in a Python 3 environment.
8
8
9
9
To perform those tests, the packges otherwise provided by ImageJ need to be
10
- mocked using the ` imcf-fiji-mocks ` package. For seting up a _ venv _ use the steps
10
+ mocked using the ` imcf-fiji-mocks ` package. For seting up a * venv * use the steps
11
11
described here:
12
12
13
13
``` bash
@@ -37,7 +37,7 @@ pip install --upgrade \
37
37
pip install -e .
38
38
```
39
39
40
- Using this _ venv _ , tests can be triggered just the usual way. To run only
40
+ Using this * venv * , tests can be triggered just the usual way. To run only
41
41
specific tests, use e.g.
42
42
43
43
``` bash
@@ -48,12 +48,12 @@ pytest tests/bdv/test_processingoptions.py
48
48
49
49
For running [ ` pytest ` ] [ pytest ] in a C-Python 2 environment, things are slightly
50
50
more complicated than the approach described for Python 3 above as ` pip ` for
51
- Python 2 cannot install a project in _ editable _ mode unless it has a ` setup.py `
51
+ Python 2 cannot install a project in * editable * mode unless it has a ` setup.py `
52
52
file (which we don't have and don't want).
53
53
54
54
Therefore, a wheel needs to be built (e.g. using [ ` poetry ` ] [ poetry ] ) and
55
55
installed (every time) into the corresponding virtualenv when performing the
56
- tests. Assuming you're having a working _ poetry _ setup on your machine, you can
56
+ tests. Assuming you're having a working * poetry * setup on your machine, you can
57
57
simply use the provided ` scripts/py2-pytest.sh ` wrapper that will create the
58
58
virtualenv, build and install the ` imcflibs ` wheel and launch ` pytest ` with the
59
59
parameters specified, e.g.
@@ -68,35 +68,35 @@ Unfortunately there is nothing like `pytest` available for the parts that are
68
68
running exclusively in a ImageJ2 / Fiji context. So in order to provide at least
69
69
some basic, semi-interactive tests the following conventions are being used:
70
70
71
- * Each _ ** function** _ in any of the ` imcflibs.imagej ` submodules should have its
71
+ * Each *** function*** in any of the ` imcflibs.imagej ` submodules should have its
72
72
own directory underneath ` /tests/interactive-imagej/ ` , using their fully
73
73
qualified name as the path (only skipping the ` imcflibs. ` prefix). For example
74
74
test scripts for ` imcflibs.imagej.bioformats.import_image() ` will be placed in
75
75
the directory ` /tests/interactive-imagej/bioformats/import_image/ ` .
76
76
* The scripts inside those directories are intended to be run interactively /
77
77
manually in a (freshly started) Fiji instance. Yes, really. Any other
78
78
suggestions are highly welcome!
79
- * To facilitate this, a collection of _ test images _ (and possibly other input
79
+ * To facilitate this, a collection of * test images * (and possibly other input
80
80
data) should be cloned to the local file system. Currently this ` sample-data `
81
- repository is _ NOT _ publicly available due to legal ⚖ uncertainties. A repo
81
+ repository is * NOT * publicly available due to legal ⚖ uncertainties. A repo
82
82
containing test data 🗞 that can be published should be assembled over time
83
83
though!
84
- * Any _ interactive _ test script should start with a header similar to the one
85
- described below. Paths to input data _ inside _ the test scripts ** has** to be
84
+ * Any * interactive * test script should start with a header similar to the one
85
+ described below. Paths to input data * inside * the test scripts ** has** to be
86
86
relative to the location of the ` sample-data ` repository mentioned above. This
87
87
will allow for a fairly okayish testing workflow like this:
88
88
* Make your changes in VS Code, then trigger a build by pressing ` Shift ` +
89
- ` Ctrl ` + ` B ` . If things are configured as described in the _ DEVELOPMENT _
89
+ ` Ctrl ` + ` B ` . If things are configured as described in the * DEVELOPMENT *
90
90
document, the resulting ` .jar ` file will be automatically placed in Fiji's
91
91
` jars/ ` folder.
92
92
* Next, start a fresh instance of the Fiji that received the newly built JAR.
93
93
* After Fiji has started, simply drag and drop the desired test script onto
94
- the main window. This will open the _ Script Editor _ , then press ` Ctrl ` + ` R `
94
+ the main window. This will open the * Script Editor * , then press ` Ctrl ` + ` R `
95
95
to launch the script.
96
96
* Only on the first run on the machine being used you will have to select the
97
97
base location of the ` sample-data ` repository.
98
- * All subsequent runs of _ ** any** _ test script using the defined _ Script
99
- Parameter _ ` IMCF_TESTDATA ` will remember this selection, so it will be
98
+ * All subsequent runs of *** any*** test script using the defined * Script
99
+ Parameter * ` IMCF_TESTDATA ` will remember this selection, so it will be
100
100
sufficient to just confirm the dialog by pressing ` Enter ` .
101
101
102
102
### Quick Workflow Summary
0 commit comments