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
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- uses: ammaraskar/sphinx-action@0.4
|
||||
with:
|
||||
docs-folder: "doc/"
|
||||
pre-build-command: "apt-get update -y && apt-get install -y git python3-sphinx graphviz libenchant1c2a"
|
||||
- name: Install packages
|
||||
run:
|
||||
sudo apt-get update -y &&
|
||||
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
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: [3.6, 3.7, 3.8, 3.9]
|
||||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2.3.5
|
||||
|
|
|
@ -7,5 +7,8 @@
|
|||
"**/.eggs/**": true,
|
||||
"**/.hypothesis/**": 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 os
|
||||
|
||||
from importlib.metadata import version as imp_version
|
||||
|
||||
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,
|
||||
# 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
|
||||
# built documents.
|
||||
#
|
||||
if on_rtd:
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = escpos.__version__
|
||||
else:
|
||||
# locally setuptools_scm should work
|
||||
release = get_version(root=root)
|
||||
release = imp_version("python-escpos")
|
||||
# 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
|
||||
# for a list of supported languages.
|
||||
|
|
|
@ -6,5 +6,5 @@ sphinx-rtd-theme
|
|||
setuptools
|
||||
setuptools-scm
|
||||
docutils>=0.12
|
||||
sphinxcontrib-spelling>=5
|
||||
sphinxcontrib-spelling>=7.2.0
|
||||
python-barcode>=0.11.0,<1
|
||||
|
|
|
@ -22,6 +22,7 @@ classifiers =
|
|||
Programming Language :: Python :: 3.7
|
||||
Programming Language :: Python :: 3.8
|
||||
Programming Language :: Python :: 3.9
|
||||
Programming Language :: Python :: 3.10
|
||||
Programming Language :: Python :: Implementation :: CPython
|
||||
Topic :: Software Development :: Libraries :: Python Modules
|
||||
Topic :: Office/Business :: Financial :: Point-Of-Sale
|
||||
|
@ -59,7 +60,7 @@ tests_require =
|
|||
mock
|
||||
hypothesis>4
|
||||
flake8
|
||||
sphinxcontrib-spelling>=5
|
||||
sphinxcontrib-spelling>=7.2.0
|
||||
|
||||
[nosetests]
|
||||
verbosity=3
|
||||
|
|
9
tox.ini
9
tox.ini
|
@ -1,5 +1,5 @@
|
|||
[tox]
|
||||
envlist = py35, py36, py37, py38, docs, flake8
|
||||
envlist = py35, py36, py37, py38, py39, py310, docs, flake8
|
||||
|
||||
[gh-actions]
|
||||
python =
|
||||
|
@ -7,6 +7,8 @@ python =
|
|||
3.6: py36
|
||||
3.7: py37
|
||||
3.8: py38
|
||||
3.9: py39
|
||||
3.10: py310
|
||||
|
||||
[testenv]
|
||||
deps = nose
|
||||
|
@ -25,10 +27,11 @@ passenv = ESCPOS_CAPABILITIES_PICKLE_DIR ESCPOS_CAPABILITIES_FILE CI TRAVIS TRAV
|
|||
[testenv:docs]
|
||||
basepython = python
|
||||
changedir = doc
|
||||
deps = sphinx>=1.5.1
|
||||
deps = sphinx>=3.0.0
|
||||
setuptools_scm
|
||||
python-barcode
|
||||
sphinxcontrib-spelling>=5
|
||||
sphinxcontrib-spelling>=7.2.0
|
||||
sphinx_rtd_theme
|
||||
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
|
||||
|
||||
[testenv:flake8]
|
||||
|
|
Loading…
Reference in New Issue