diff --git a/Makefile b/Makefile deleted file mode 100644 index 0604a25..0000000 --- a/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -all: test - -test: - tox - -clean: - @find . -name '*.pyc' -delete - @rm -rf tmp \ - src/ua_parser.egg-info \ - dist \ - build \ - src/ua_parser/_regexes.py -format: - @black . - -release: clean - pyproject-build - twine upload -s dist/* - -.PHONY: all test clean format release diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index d4bb2cb..0000000 --- a/doc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/tox.ini b/tox.ini index 9b3f154..da50c20 100644 --- a/tox.ini +++ b/tox.ini @@ -3,14 +3,10 @@ min_version = 4.0 env_list = py3{9,10,11,12,13} pypy{310,311} graalpy - flake8, black, typecheck -labels = - test = py3{9,10,11,12,13},pypy{310,311},graalpy - cpy = py3{9,10,11,12,13} - pypy = pypy{310,311} - check = flake8, black, typecheck + check, format, typecheck [testenv] +labels = test # wheel install package = wheel # wheel is universal so can use the same wheel for all envs @@ -25,7 +21,8 @@ deps = commands = pytest -Werror --doctest-glob="*.rst" {posargs} -[testenv:py3{9,10,11,12}] +[testenv:py3{9,10,11,12,13}] +labels = test, cpy deps = pytest pyyaml @@ -33,20 +30,34 @@ deps = ua-parser-rs ./ua-parser-builtins -[testenv:flake8] +[testenv:pypy{310,311}] +labels = test, pypy + +[testenv:check] +labels = check package = skip deps = ruff commands = ruff check {posargs} -[testenv:black] +[testenv:format] +description = Runs the formatter (just showing errors by default) +labels = check package = skip deps = ruff commands = ruff format {posargs:--diff} [testenv:typecheck] +labels = check package = skip deps = mypy types-PyYaml ./ua-parser-builtins -commands = mypy {posargs:} +commands = mypy {posargs} + +[testenv:docs] +description = Builds the documentation +labels = +package = skip +deps = sphinx +commands = sphinx-build -M {posargs:html} doc docs/_build