Browse Source

Remove Makefile and use tox instead

pull/359/head
Simon Conseil 7 years ago
parent
commit
b1aeca81cf
  1. 23
      Makefile
  2. 18
      docs/contribute.rst
  3. 10
      tox.ini

23
Makefile

@ -1,23 +0,0 @@
init:
pip install -e .
pip install -r requirements.txt
docs:
make -C docs html
test:
pytest
coverage:
pytest --cov sigal --cov-report term --cov-report=html
demo:
sigal build -c tests/sample/sigal.conf.py && sigal serve tests/sample/_build
publish:
python setup.py register
python setup.py sdist bdist_wheel
twine upload dist/*
.PHONY: docs

18
docs/contribute.rst

@ -7,7 +7,7 @@
Setting up the development environment
--------------------------------------
Using a virtualenv_::
Using a virtualenv_::
git clone https://github.com/saimn/sigal.git
cd sigal
@ -18,21 +18,27 @@ Install sigal in development mode::
pip install -e .
Install additional dependencies for development (Sphinx, ...)::
Install additional dependencies for development (Sphinx, pytest), and optional
dependencies::
pip install -r requirements.txt
Building the docs
-----------------
- Run ``make docs`` (or ``make html`` in the ``docs/`` directory).
- Using tox_, run ``tox -e doc``
- Or ``make html`` in the ``docs/`` directory.
Running the test suite
----------------------
- Run ``make test`` (or ``pytest``).
- Run ``make coverage`` to get the coverage report.
- Using tox_ you can also run the tests on multiple versions of python.
- Using tox_, run ``tox -e py37`` (replacing ``py37`` with your Python version
if needed).
.. _tox: https://tox.readthedocs.io/
.. _virtualenv: https://virtualenv.pypa.io/
Building the test gallery
-------------------------
- Using tox_, run ``tox -e demo``

10
tox.ini

@ -11,8 +11,6 @@ python =
[testenv]
deps =
-r {toxinidir}/requirements.txt
pytest
pytest-cov
commands = pytest --cov sigal --cov-report term-missing tests/
[testenv:check]
@ -35,3 +33,11 @@ deps =
usedevelop = true
commands =
make -C docs html
[testenv:demo]
usedevelop = true
deps =
feedgenerator
commands =
sigal build -c tests/sample/sigal.conf.py
sigal serve tests/sample/_build

Loading…
Cancel
Save