Development

Stand-Alone Mode

Using vngshare can make developing easy because developers do not need to worry about authentications etc. See vngshare.

Unit Testing

We use pytest for unit tests. The pytest-tornado plugin allows us to test a Tornado server.

pip3 install pytest pytest-cov pytest-tornado
pytest

Coverage

We use pytest-cov to gather code coverage. To collect coverage, use:

pytest --cov=./ngshare/

To show uncovered lines, use:

pytest --cov-report term-missing --cov=./ngshare/ ./ngshare/

Code Formatting

We use black to format our code.

pip3 install black
black -S -l 80 .

Contributing

If you want to contribute to ngshare, submit a pull request to https://github.com/LibreTexts/ngshare/pulls.