diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c97be9e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: tests and quality targets + +on: push + +jobs: + build: + name: tests + runs-on: ubuntu-latest + + strategy: + matrix: + version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.version }} + - name: Install dependencies + run: | + pip install --upgrade pip setuptools wheel + pip install tox + - name: Run tox + run: tox diff --git a/.gitignore b/.gitignore index ba74660..4a7fbbf 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ htmlcov/ nosetests.xml coverage.xml *,cover +.pytest_cache/ # Translations *.mo diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 8b299cb..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: python -cache: pip - -matrix: - fast_finish: true - include: - - {python: '3.8'} - - {python: '3.9'} - - {python: '3.10'} - - {python: '3.11'} - - {python: '3.12'} - - - {env: TOXENV=docs, python: '3.12'} - - {env: TOXENV=quality, python: '3.12'} - -install: - - travis_retry pip install tox tox-travis - -script: - - tox diff --git a/Makefile b/Makefile index e23c709..675d918 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ docs: sphinx-build -v -a -b html -d docs/_build/doctrees/ docs/ docs/_build/xlsx_streamingdoc/ test: - python setup.py test + pytest -v -Wdefault::DeprecationWarning quality: python setup.py check --strict --metadata --restructuredtext diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..fed528d --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,3 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" diff --git a/requirements_dev.txt b/requirements_dev.txt index 13e9e8e..4dc6949 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -1,7 +1,9 @@ docutils openpyxl pylint +pytest pytz readme_renderer +setuptools # needed for docs build (conf.py) sphinx sphinx-rtd-theme diff --git a/setup.cfg b/setup.cfg index acda045..3ad7b2f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -24,21 +24,18 @@ classifiers = Programming Language :: Python :: 3.12, keywords = xlsx, excel, streaming platform = any -packages = - docs, - tests, [options] +packages = find: python_requires = >= 3.8 install_requires = zipstream>=1.1.3 -[build-system] -requires = ["setuptools"] - -[bdist_wheel] -universal = 1 +[options.packages.find] +exclude = + tests* + docs* [zest.releaser] create-wheel = yes diff --git a/tox.ini b/tox.ini index 95299e6..c4671d5 100644 --- a/tox.ini +++ b/tox.ini @@ -1,22 +1,21 @@ [tox] envlist = - py{38,39,310,311,312}, + py, docs, quality [testenv] -commands = /usr/bin/make test +commands = make test deps = -rrequirements_dev.txt +allowlist_externals = make [testenv:docs] -basepython = python3.12 -commands = /usr/bin/make docs +commands = make docs deps = -rrequirements_dev.txt [testenv:quality] -basepython = python3.12 -commands = /usr/bin/make quality +commands = make quality deps = -rrequirements_dev.txt