-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
19 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,6 +46,25 @@ git config --global user.email [email protected] | |
|
||
Make sure your fork stays up-to-date with the latest changes in the main repo by [syncing your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork). | ||
|
||
## Testing the code | ||
|
||
We use the [pytest](https://docs.pytest.org/) framework to test the code. During development, you can run the tests locally using | ||
|
||
```sh | ||
# in the project root directory | ||
pytest -v | ||
``` | ||
|
||
The suite of [tests](https://github.com/micro-manager/pycro-manager/tree/main/pycromanager/test) also runs automatically using [GitHub Actions](https://github.com/micro-manager/pycro-manager/actions) for every PR. All tests must pass before a PR is merged. Please contribute new tests as you fix bugs and develop new features. | ||
|
||
Execution of the `pycro-manager` tests depends on [Micro-manager](https://micro-manager.org/) and several Java libraries ([AcqEngJ](https://github.com/micro-manager/AcqEngJ), [NDTiffStorage](https://github.com/micro-manager/NDTiffStorage), [NDViewer](https://github.com/micro-manager/NDViewer)). | ||
|
||
During setup, `pytest` will download the latest [nightly build](https://micro-manager.org/Micro-Manager_Nightly_Builds) of `Micro-manager` and install it in `~/Micro-Manager-nightly`; this step will be skipped if that folder exists. Currently installation of the latest `Micro-manager` nightly build through `pytest` is only supported on Windows platforms. For other platforms, please manually install a working version of `Micro-manager` in `~/Micro-Manager-nightly`. | ||
|
||
During setup, `pytest` will also look for pre-compiled `.jar` files in the `../../{java_lib_name}/target` directory (e.g. `../../{AcqEngJ}/target`) and replace the ones that are packaged with the `Micro-manager` nightly build if they are older version. This is helpful when co-developing these libraries. The user does need to pre-compile the Java libraries first. When the tests run in GitHub Actions they always use with the `.jar` files that are packaged with `Micro-manager`. | ||
|
||
Tests of the `pycro-manager` NDViewer and `napari` viewer only execute locally and are skipped by GitHub Actions. When making changes that may affect these viewer, please make sure to always run the tests locally. | ||
|
||
## Building the docs | ||
|
||
1) Add/edit files in the `docs/source` directory | ||
|