File: tox.ini

package info (click to toggle)
python-sphinx-codeautolink 0.17.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 936 kB
  • sloc: python: 2,818; makefile: 4
file content (84 lines) | stat: -rw-r--r-- 1,772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
[tox]
min_version = 4
no_package = true
envlist =
    check
    doc8
    docs
    build-{lin,mac,win}
    coverage
labels =
    check = check,doc8
    format = format
    docs = docs
    build = build-{lin,mac,win}
    test = coverage
    publish = publish-{lin,mac,win}

[doc8]
ignore = D004
max-line-length = 80

[testenv]
description = Run test suite with code coverage
platform =
    lin: linux
    mac: darwin
    win: win32
allowlist_externals = coverage
commands = coverage run
           coverage report

[testenv:coverage]
; Inherit everything from testenv

[testenv:doc8]
description = Check documentation .rst files
allowlist_externals = doc8
commands = doc8 docs/src --quiet

[testenv:docs]
description = Build Sphinx documentation
allowlist_externals = sphinx-build
change_dir = docs
commands = sphinx-build -M html src build -W

[testenv:check]
description = Check code style
allowlist_externals = ruff
commands =
    ruff format --check
	ruff check

[testenv:format]
description = Format code
allowlist_externals = ruff
commands =
    ruff format
	ruff check --fix

[testenv:build-{lin,mac,win}]
description = Build and check package
deps = -r requirements/build
allowlist_externals = rm, cmd
commands =
    python -m build -C--quiet
    twine check --strict dist/*
commands_post =
    lin,mac: rm -r dist
    win: cmd /c rmdir /s /q dist

[testenv:publish-{lin,mac,win}]
description = Build, check and publish package
deps = -r requirements/build
allowlist_externals = rm, cmd
commands_pre =
    lin,mac: rm -rf dist
    win: cmd /c if exist dist rmdir /s /q dist
commands =
    python -m build -C--quiet
    twine check --strict dist/*
    twine upload dist/* --config-file .pypirc
commands_post =
    lin,mac: rm -r dist
    win: cmd /c rmdir /s /q dist