aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlandos <bugs-github@antipoul.fr>2021-06-03 22:29:55 +0200
committerGlandos <bugs-github@antipoul.fr>2021-06-03 22:35:49 +0200
commit45f4d8f8b0b02038cde53f52122b61fe4bdc1da8 (patch)
tree67a33ff3ee5b93a544dae12b651a373cd8f6729b
parent43ee61afe858bdbf948e3ddb025258f3522687e7 (diff)
downloadihatemoney-mirror-45f4d8f8b0b02038cde53f52122b61fe4bdc1da8.zip
ihatemoney-mirror-45f4d8f8b0b02038cde53f52122b61fe4bdc1da8.tar.gz
ihatemoney-mirror-45f4d8f8b0b02038cde53f52122b61fe4bdc1da8.tar.bz2
Using one job for all linting and doc generation
Requirements for doc are now an extra require in setup.cfg
-rw-r--r--docs/contributing.rst2
-rw-r--r--docs/requirements.txt2
-rw-r--r--setup.cfg4
-rw-r--r--tox.ini20
4 files changed, 12 insertions, 16 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst
index 7b4f8a5..80174b7 100644
--- a/docs/contributing.rst
+++ b/docs/contributing.rst
@@ -195,7 +195,7 @@ its source is located inside the `docs folder
Install doc dependencies (within the virtual environment, if any)::
- pip install -r docs/requirements.txt
+ pip install -e .[doc]
And to produce a HTML doc in the `docs/_output` folder::
diff --git a/docs/requirements.txt b/docs/requirements.txt
deleted file mode 100644
index 1d54d28..0000000
--- a/docs/requirements.txt
+++ /dev/null
@@ -1,2 +0,0 @@
-Sphinx==3.5.3
-docutils==0.17.1
diff --git a/setup.cfg b/setup.cfg
index 9177986..143be48 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -53,6 +53,10 @@ dev =
tox>=3.14.6
zest.releaser>=6.20.1
+doc =
+ Sphinx==3.5.3
+ docutils==0.17.1
+
[options.entry_points]
console_scripts =
ihatemoney = ihatemoney.manage:main
diff --git a/tox.ini b/tox.ini
index cbdaf80..c358574 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[tox]
-envlist = py39,py38,py37,py36,docs,flake8,black
+envlist = py39,py38,py37,py36,lint_docs
skip_missing_interpreters = True
[testenv]
@@ -14,20 +14,14 @@ deps =
# To be sure we are importing ihatemoney pkg from pip-installed version
changedir = /tmp
-[testenv:docs]
-commands = sphinx-build -a -n -b html -d docs/_build/doctrees docs docs/_build/html
-deps =
- -rdocs/requirements.txt
-changedir = {toxinidir}
-
-[testenv:black]
+[testenv:lint_docs]
commands =
black --check --target-version=py36 .
isort -c .
-changedir = {toxinidir}
-
-[testenv:flake8]
-commands = flake8 ihatemoney
+ flake8 ihatemoney
+ sphinx-build -a -n -b html -d docs/_build/doctrees docs docs/_build/html
+deps =
+ -e.[dev,doc]
changedir = {toxinidir}
[flake8]
@@ -41,5 +35,5 @@ extend-ignore =
python =
3.6: py36
3.7: py37
- 3.8: py38, docs, black, flake8
+ 3.8: py38, lint_docs
3.9: py39