Skip to content

Commit

Permalink
Update test section (#34)
Browse files Browse the repository at this point in the history
* Update README.md
  • Loading branch information
itepifanio authored Jul 25, 2022
1 parent add6d35 commit cdcfba2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,12 @@ Ipyannotator provides a [simple API](https://palaimon.github.io/ipyannotator/nbs

### Run ipyannotator tests

Ipyannotator's tests are directly integrated in the Jupyter Notebooks that make up the libraries source code, this is a consequence of following the literate programming style made possible by the library `nbdev`. Tests can be executed by running `nbdev_test_nbs` on the terminal.
To run Ipyannotator's tests:

When installing the repository using poetry, all dev dependencies are installed by default.

When using pip for installation make sure to install the two dev dependencies `pytest` and `ipytest`, with the versions listed in `pyproject.toml`, manually:

```shell
pip install pytest
pip install ipytest
```

[Nbdev](https://nbdev.fast.ai/#A-Motivating-Example) uses comments on the Jupyter notebook cells, such as `#exports`, to output the library code, and cells without comments to be executed as tests. Nbdev by itself doesn't guarantee that the tests are self-contained, that's why Ipyannotator uses [pytest](https://docs.pytest.org/en/7.1.x/) and [ipytest](https://github.com/chmp/ipytest) as dev dependencies.
1. Install [poetry](https://python-poetry.org/docs/#installation)
2. Create the test environment with `poetry install`
3. Activate the poetry environment using `poetry shell`
4. Run tests by executing `nbdev_test_nbs`

### Run ipyannotator as stand-alone web app using voila

Expand Down

0 comments on commit cdcfba2

Please sign in to comment.