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

Add better description to the tests #31

Merged
merged 2 commits into from
Jul 15, 2022
Merged
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
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,18 @@ Ipyannotator provides a [simple API](https://palaimon.github.io/ipyannotator/nbs

### Run ipyannotator tests

The tests can be executed using `nbdev_test_nbs` on the terminal.
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.

Ipyannotator notebooks contains the development dependencies: [pytest](https://docs.pytest.org/en/7.1.x/) and [ipytest](https://github.com/chmp/ipytest). Make sure this dependencies are installed to run the 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.

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

Expand Down