Skip to content

Commit

Permalink
Update documentation around testing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfioravanti committed Jan 15, 2024
1 parent f9260c6 commit 9237d7a
Showing 1 changed file with 21 additions and 12 deletions.
33 changes: 21 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,26 +64,32 @@ make sure your local development environment also uses Python 3.9.x.

### Testing

Tests in this plugin were created with [Pytest][]. Run them with the following
command:

```sh
pytest
```
- [Pytest][] is used for testing in this plugin.
- [Coverage.py][] and [pytest-cov][] are used for test coverage, and to run
coverage within Pytest
- [Pylint][] is used for code quality
- [Mypy][] is used for static type checking

Currently, the only parts able to be tested are ones that do not rely directly
on Plover.

### Linting

Attempts have been made to have at least some kind of code quality baseline with
[Pylint][]. Run the linter over the codebase with the following command:
Run tests, coverage, and linting with the following commands:

```sh
```console
pytest --cov --cov-report=term-missing
pylint plover_q_and_a
mypy plover_q_and_a
```

To get a HTML test coverage report:

```console
coverage run --module pytest
coverage html
open htmlcov/index.html
```

### Testing Changes
### Deploying Changes

After making any code changes, install the plugin into Plover with the following
command:
Expand All @@ -98,6 +104,7 @@ plover -s plover_plugins install .
[Build Status image]: https://github.com/paulfioravanti/plover-q-and-a/actions/workflows/ci.yml/badge.svg
[Build Status url]: https://github.com/paulfioravanti/plover-q-and-a/actions/workflows/ci.yml
[Coverage.py]: https://github.com/nedbat/coveragepy
[`examples`]: ./examples
[extension]: https://plover.readthedocs.io/en/latest/plugin-dev/extensions.html
[git]: https://git-scm.com/
Expand All @@ -106,13 +113,15 @@ plover -s plover_plugins install .
[linting image]: https://img.shields.io/badge/linting-pylint-yellowgreen
[linting url]: https://github.com/pylint-dev/pylint
[metas]: https://plover.readthedocs.io/en/latest/plugin-dev/metas.html
[Mypy]: https://github.com/python/mypy
[Platinum Steno]: https://www.youtube.com/@PlatinumSteno
[Platinum Steno Lesson 27 QA video]: https://www.youtube.com/watch?v=tEgaJ7hWIvg
[Plover]: https://www.openstenoproject.org/
[Plover For the Record]: https://www.paulfioravanti.com/blog/plover-for-the-record/
[plugin]: https://plover.readthedocs.io/en/latest/plugins.html#types-of-plugins
[Pylint]: https://github.com/pylint-dev/pylint
[Pytest]: https://pytest.org/
[pytest-cov]: https://github.com/pytest-dev/pytest-cov/
[Q&A]: http://ilovesteno.com/2014/02/03/the-different-types-of-q-a/
[Steno Legal Q&A Test with Plover and Vim]: https://www.youtube.com/watch?v=wZFj0q0d9uo
[Vim]: https://www.vim.org/
Expand Down

0 comments on commit 9237d7a

Please sign in to comment.