housekeeping tasks (#464)
* update settings to use black * update python versions * enquote version numbers * update dependency * set explicit build command * add newline * add command to checkout * add run step * chain * sudo * test * newer sphinx version * update sphinx * clean up setuptools usage * use tox * install tox * tox
This commit is contained in:
parent
8e5c600e20
commit
5bb0642b5d
|
@ -22,7 +22,10 @@ jobs:
|
||||||
- uses: actions/checkout@v2.3.5
|
- uses: actions/checkout@v2.3.5
|
||||||
with:
|
with:
|
||||||
submodules: 'recursive'
|
submodules: 'recursive'
|
||||||
- uses: ammaraskar/sphinx-action@0.4
|
- name: Install packages
|
||||||
with:
|
run:
|
||||||
docs-folder: "doc/"
|
sudo apt-get update -y &&
|
||||||
pre-build-command: "apt-get update -y && apt-get install -y git python3-sphinx graphviz libenchant1c2a"
|
sudo apt-get install -y git python3-sphinx graphviz libenchant1c2a &&
|
||||||
|
sudo pip install tox
|
||||||
|
- name: Test doc build
|
||||||
|
run: tox -e docs
|
||||||
|
|
|
@ -15,7 +15,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2.3.5
|
- uses: actions/checkout@v2.3.5
|
||||||
|
|
|
@ -7,5 +7,8 @@
|
||||||
"**/.eggs/**": true,
|
"**/.eggs/**": true,
|
||||||
"**/.hypothesis/**": true,
|
"**/.hypothesis/**": true,
|
||||||
"**/.tox/**": true,
|
"**/.tox/**": true,
|
||||||
}
|
},
|
||||||
|
"editor.formatOnSave": true,
|
||||||
|
"editor.formatOnPaste": true,
|
||||||
|
"python.formatting.provider": "black",
|
||||||
}
|
}
|
15
doc/conf.py
15
doc/conf.py
|
@ -15,11 +15,9 @@
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
from importlib.metadata import version as imp_version
|
||||||
|
|
||||||
on_rtd = os.getenv("READTHEDOCS") == "True"
|
on_rtd = os.getenv("READTHEDOCS") == "True"
|
||||||
if on_rtd:
|
|
||||||
import escpos
|
|
||||||
else:
|
|
||||||
from setuptools_scm import get_version
|
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
|
@ -75,14 +73,9 @@ copyright = u"2016, Manuel F Martinez and others"
|
||||||
# |version| and |release|, also used in various other places throughout the
|
# |version| and |release|, also used in various other places throughout the
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
if on_rtd:
|
release = imp_version("python-escpos")
|
||||||
# The full version, including alpha/beta/rc tags.
|
|
||||||
release = escpos.__version__
|
|
||||||
else:
|
|
||||||
# locally setuptools_scm should work
|
|
||||||
release = get_version(root=root)
|
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = ".".join(release.split(".")[:2]) # The short X.Y version.
|
version = ".".join(release.split(".")[:2])
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
@ -6,5 +6,5 @@ sphinx-rtd-theme
|
||||||
setuptools
|
setuptools
|
||||||
setuptools-scm
|
setuptools-scm
|
||||||
docutils>=0.12
|
docutils>=0.12
|
||||||
sphinxcontrib-spelling>=5
|
sphinxcontrib-spelling>=7.2.0
|
||||||
python-barcode>=0.11.0,<1
|
python-barcode>=0.11.0,<1
|
||||||
|
|
|
@ -22,6 +22,7 @@ classifiers =
|
||||||
Programming Language :: Python :: 3.7
|
Programming Language :: Python :: 3.7
|
||||||
Programming Language :: Python :: 3.8
|
Programming Language :: Python :: 3.8
|
||||||
Programming Language :: Python :: 3.9
|
Programming Language :: Python :: 3.9
|
||||||
|
Programming Language :: Python :: 3.10
|
||||||
Programming Language :: Python :: Implementation :: CPython
|
Programming Language :: Python :: Implementation :: CPython
|
||||||
Topic :: Software Development :: Libraries :: Python Modules
|
Topic :: Software Development :: Libraries :: Python Modules
|
||||||
Topic :: Office/Business :: Financial :: Point-Of-Sale
|
Topic :: Office/Business :: Financial :: Point-Of-Sale
|
||||||
|
@ -59,7 +60,7 @@ tests_require =
|
||||||
mock
|
mock
|
||||||
hypothesis>4
|
hypothesis>4
|
||||||
flake8
|
flake8
|
||||||
sphinxcontrib-spelling>=5
|
sphinxcontrib-spelling>=7.2.0
|
||||||
|
|
||||||
[nosetests]
|
[nosetests]
|
||||||
verbosity=3
|
verbosity=3
|
||||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = py35, py36, py37, py38, docs, flake8
|
envlist = py35, py36, py37, py38, py39, py310, docs, flake8
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
python =
|
python =
|
||||||
|
@ -7,6 +7,8 @@ python =
|
||||||
3.6: py36
|
3.6: py36
|
||||||
3.7: py37
|
3.7: py37
|
||||||
3.8: py38
|
3.8: py38
|
||||||
|
3.9: py39
|
||||||
|
3.10: py310
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps = nose
|
deps = nose
|
||||||
|
@ -25,10 +27,11 @@ passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAV
|
||||||
[testenv:docs]
|
[testenv:docs]
|
||||||
basepython = python
|
basepython = python
|
||||||
changedir = doc
|
changedir = doc
|
||||||
deps = sphinx>=1.5.1
|
deps = sphinx>=3.0.0
|
||||||
setuptools_scm
|
setuptools_scm
|
||||||
python-barcode
|
python-barcode
|
||||||
sphinxcontrib-spelling>=5
|
sphinxcontrib-spelling>=7.2.0
|
||||||
|
sphinx_rtd_theme
|
||||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||||
|
|
||||||
[testenv:flake8]
|
[testenv:flake8]
|
||||||
|
|
Loading…
Reference in New Issue