forked from pycontribs/jira
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtox.ini
More file actions
151 lines (146 loc) · 3.97 KB
/
Copy pathtox.ini
File metadata and controls
151 lines (146 loc) · 3.97 KB
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
[tox]
requires =
setuptools>=65.3
tox>=4.24.2
tox-uv>=1.25
env_list =
py312
py311
py310
lint
pkg
docs
skip_missing_interpreters = true
[testenv]
description =
Run the tests
devel: w/ constraints, some devel dependencies
package = editable
deps =
devel: requests @ git+https://github.com/psf/requests.git
extras =
cli
opt
test
pass_env =
CI
CI_JIRA_*
CURL_CA_BUNDLE
FORCE_COLOR
GITHUB_*
HOME
LANG
LC_*
NO_COLOR
PYTEST_*
PYTEST_REQPASS
PYTHON*
PYTHONBREAKPOINT
PYTHONIOENCODING
PYTHONPYCACHEPREFIX
PY_COLORS
REQUESTS_CA_BUNDLE
RTD_TOKEN
SETUPTOOLS_SCM_DEBUG
SSH_AUTH_SOCK
SSL_CERT_FILE
TWINE_*
USERNAME
UV_*
XDG_CACHE_HOME
set_env =
CI_JIRA_ADMIN = {env:CI_JIRA_ADMIN:admin}
CI_JIRA_ADMIN_PASSWORD = {env:CI_JIRA_ADMIN_PASSWORD:admin}
CI_JIRA_ISSUE = {env:CI_JIRA_ISSUE:Task}
CI_JIRA_URL = {env:CI_JIRA_URL:http://localhost:2990/jira}
CI_JIRA_USER = {env:CI_JIRA_USER:jira_user}
CI_JIRA_USER_FULL_NAME = {env:CI_JIRA_USER_FULL_NAME:Newly Created CI User}
CI_JIRA_USER_PASSWORD = {env:CI_JIRA_USER_PASSWORD:jira}
COVERAGE_FILE = {env:COVERAGE_FILE:{env_dir}/.coverage.{env_name}}
COVERAGE_PROCESS_START = {tox_root}/pyproject.toml
FORCE_COLOR = 1
PIP_DISABLE_PIP_VERSION_CHECK = 1
PRE_COMMIT_COLOR = always
UV_LOCKED = 1
devel: UV_LOCKED = 0
devel: UV_PRERELEASE = allow
commands_pre =
{env_python} -m coverage erase --data-file={env_dir}/.coverage
{env_python} -m pip check
commands =
git clean -xdf jira tests
{env_python} make_local_jira_user.py
coverage run -m pytest {posargs: \
-ra \
--showlocals \
--doctest-modules \
--durations=10 \
}
{py,py310,py311,py312,py313}: coverage combine -a -q --data-file={env_dir}/.coverage {env_dir}
{py,py310,py311,py312,py313}: coverage xml --data-file={env_dir}/.coverage -o {env_dir}/coverage.xml --fail-under=0
{py,py310,py311,py312,py313}: coverage report --data-file={env_dir}/.coverage --fail-under=0
allowlist_externals =
git
[testenv:lint]
description = Run all linters
skip_install = true
deps =
pre-commit>=4.1
pre-commit-uv>=4.1.4
pytest>=7.2.2 # to updated schemas
setuptools>=51.1.1
pass_env =
{[testenv]pass_env}
PRE_COMMIT_HOME
commands_pre =
commands =
{env_python} -m pre_commit run --all-files --show-diff-on-failure {posargs:}
[testenv:pkg]
description =
Build package, verify metadata, install package
skip_install = true
deps =
build>=0.9
twine>=4.0.1
uv>=0.6.6
commands_pre =
commands =
{env_python} -c 'import os.path, shutil, sys; \
dist_dir = os.path.join("{tox_root}", "dist"); \
os.path.isdir(dist_dir) or sys.exit(0); \
print("Removing \{!s\} contents...".format(dist_dir), file=sys.stderr); \
shutil.rmtree(dist_dir)'
{env_python} -m build --outdir {tox_root}/dist/ {tox_root}
{env_python} -m twine check --strict {tox_root}/dist/*
{env_python} -m uv pip install --reinstall --find-links {tox_root}/dist jira
jirashell --help
{env_python} -m uv pip uninstall jira
allowlist_externals =
jirashell
[testenv:docs]
description = Builds docs
package = editable
skip_install = false
extras =
cli
docs
set_env =
DYLD_FALLBACK_LIBRARY_PATH = /opt/homebrew/lib:{env:LD_LIBRARY_PATH}
NO_COLOR = 1
TERM = dump
commands_pre =
commands =
sphinx-build \
--verbose \
--write-all \
--nitpicky --fail-on-warning \
-b html --color \
-d "{toxworkdir}/docs_doctree" \
docs/ "{toxworkdir}/docs_out"
python -c \
'import pathlib; ' \
'docs_dir = pathlib.Path(r"{toxworkdir}") / "docs_out"; index_file = docs_dir / "index.html"; print(f"\nDocumentation available under `file://\{index_file\}`\n\nTo serve docs, use `python3 -m http.server --directory \{docs_dir\} 0`\n")'
skipdist = False
[testenv:maintenance]
commands =
python examples/maintenance.py