diff --git a/README.md b/README.md index ad605d7..6c16f8d 100644 --- a/README.md +++ b/README.md @@ -38,7 +38,7 @@ you provide us your `moderngl.Context`. ## Install ```bash -pip install moderngl-window +$ pip install moderngl-window ``` ## Supported Platforms @@ -67,13 +67,13 @@ Test.run() Run the example with different window backends: ```bash -python test.py --window pyglet -python test.py --window pygame2 -python test.py --window glfw -python test.py --window sdl2 -python test.py --window pyside2 -python test.py --window pyqt5 -python test.py --window tk +$ python test.py --window pyglet +$ python test.py --window pygame2 +$ python test.py --window glfw +$ python test.py --window sdl2 +$ python test.py --window pyside2 +$ python test.py --window pyqt5 +$ python test.py --window tk ``` `WindowConfig` classes are the simplest way to get started without knowing @@ -82,15 +82,14 @@ or examples. ## Setup from source -We assume the user knows how to handle vitrualenvs. +We assume the user knows how to handle virtualenvs. ```bash # Install the package in editable mode $ pip install -e . -# Set up and dev requirements -pip install -r requirements.txt -pip install -r tests/requirements.txt +# Install test and development requirements +$ pip install -e .[tests] ``` ## Running Tests @@ -98,19 +97,19 @@ pip install -r tests/requirements.txt Tests are set up with `tox` running pytest with coverage and flake8. ```bash -pip install -r tests/requirements.txt -tox -e py36 -tox -e py37 -tox -e py38 -tox -e py39 -tox -e pep8 +$ pip install -e .[tests] +$ tox -e py36 +$ tox -e py37 +$ tox -e py38 +$ tox -e py39 +$ tox -e pep8 ``` ## Building Docs ```bash -pip install -r docs/requirements.txt -python setup.py build_sphinx +$ pip install -e .[docs] +$ sphinx-build -b html docs docs/_build ``` ## Contributing diff --git a/setup.cfg b/setup.cfg index daf4b53..1900b2f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -63,3 +63,6 @@ docs = sphinx-rtd-theme sphinxcontrib-napoleon doc8 + +[coverage:run] +source = moderngl_window diff --git a/tox.ini b/tox.ini index 7034793..56e3f59 100644 --- a/tox.ini +++ b/tox.ini @@ -4,30 +4,29 @@ [tox] skipsdist = True envlist = - py35 py36 py37 py38 + py39 pep8 [gh-actions] python = - 3.5: py35 3.6: py36 3.7: py37 3.8: py38 - pep8: py38 + 3.9: py39 [testenv] usedevelop = True basepython = - py35: python3.5 py36: python3.6 py37: python3.7 py38: python3.8 + py39: python3.9 extras = tests commands = - coverage run --source=moderngl_window -m pytest tests/ + coverage run -m pytest tests/ coverage report [testenv:pep8]