-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathtox.ini
More file actions
113 lines (103 loc) · 3.17 KB
/
Copy pathtox.ini
File metadata and controls
113 lines (103 loc) · 3.17 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
[tox]
envlist = lint,py3{10,11,12,13,14}-nonetwork,py314-full
isolated_build = True
minversion = 3.3.0
[gh-actions]
# Consumed by tox-gh-actions: maps the current CI Python version to the
# matching tox env(s) so `tox` picks them up automatically.
# Base CI rows use the nonetwork factor (no external network access).
python =
3.10: py310-nonetwork
3.11: py311-nonetwork
3.12: py312-nonetwork
3.13: py313-nonetwork
3.14: py314-nonetwork
[testenv]
# Pass HOME so that user & email settings in ~/.gitconfig will be honored.
passenv =
HOME
DATALAD_*
extras = test
# Factors:
# nonetwork — disable network tests (sets bogus proxies to catch leaks)
# full — also enable --libfuse tests
# By default network and forgejo tests are enabled.
setenv =
nonetwork: PYTEST_ADDOPTS = --no-network --no-forgejo
full: PYTEST_ADDOPTS = --libfuse
libfuse: PYTEST_ADDOPTS = --libfuse
commands =
# pytest-cov causes `datalad fusefs` processes to not terminate properly
# during testing, so we have to use `coverage` directly
coverage erase
coverage run -m pytest {posargs} datalad_fuse
coverage report
[testenv:lint]
skip_install = True
deps =
flake8
flake8-bugbear
flake8-builtins
flake8-unused-arguments
commands =
flake8 --config=tox.ini datalad_fuse
[testenv:benchmark]
skip_install = True
deps =
asv[virtualenv] != 0.6.2
commands =
asv run {posargs} HEAD^1..HEAD
[testenv:typing]
deps =
mypy
extras = test
commands =
mypy --follow-imports skip \
datalad_fuse/fsspec.py \
datalad_fuse/fuse_.py \
datalad_fuse/utils.py
[pytest]
filterwarnings =
# Normally, I would set the default warning handler to "error", but using
# that in conjunction with datalad 0.15.0 and coverage leads to pytest
# erroring out due to some unclosed file. Restricting datalad to an
# earlier version eliminates the error. Not using/installing coverage
# gives inconsistent results.
#error
ignore:datalad.version module will be removed:DeprecationWarning
ignore:distutils Version classes are deprecated:DeprecationWarning
ignore:the imp module is deprecated:DeprecationWarning
norecursedirs = datalad_fuse/tests/data
markers =
libfuse: FUSE tests; only run when --libfuse is given
forgejo: Forgejo-aneksajo integration tests; require container runtime
network: tests that hit the public network; only run when --network is given
ai_generated: tests generated by AI assistants
[coverage:run]
branch = True
source = datalad_fuse
[coverage:report]
precision = 2
show_missing = True
exclude_lines =
pragma: no cover
if TYPE_CHECKING:
\.\.\.
[flake8]
doctests = True
exclude = .*/,build/,dist/,venv/,_datalad_buildsupport/,versioneer.py,_version.py
hang-closing = False
max-doc-length = 100
max-line-length = 80
unused-arguments-ignore-stub-functions = True
select = C,B,B902,B950,E,E242,F,I,U100,W
ignore = B005,E203,E262,E266,E501,I201,W503
[isort]
atomic = True
force_sort_within_sections = True
honor_noqa = True
lines_between_sections = 1
profile = black
reverse_relative = True
sort_relative_in_force_sorted_sections = True
known_first_party = datalad_fuse