-
Notifications
You must be signed in to change notification settings - Fork 9
/
pyproject.toml
100 lines (94 loc) · 3.44 KB
/
pyproject.toml
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
[tool.isort]
profile = "black"
skip_gitignore = "True"
line_length = "88"
[tool.mypy]
warn_return_any = "True"
warn_unused_configs = "True"
ignore_missing_imports = "True"
follow_imports = "silent"
disable_error_code = ["method-assign"]
strict = "True"
[tool.pylint]
[tool.pylint."MESSAGES CONTROL"]
disable = """
missing-module-docstring,
missing-function-docstring,
missing-class-docstring,
protected-access,
redefined-outer-name,
line-too-long,
too-few-public-methods,
fixme,
global-statement,
relative-beyond-top-level,
too-many-positional-arguments,
"""
[tool.pylint.similarities]
ignore-comments = true
ignore-docstrings = true
ignore-imports = true
ignore-signatures = true
min-similarity-lines = 7
# Docs: https://docs.pytest.org/en/7.1.x/reference/reference.html#ini-options-ref
[tool.pytest.ini_options]
# testpaths: directories that should be searched when no specific directories, files or test ids are given
testpaths = "test/tests"
# python_files: determining which python files are considered as test modules.
python_files = "*_test.py"
# python_functions: which test functions and methods are considered tests
python_functions = "test_*"
# spaCy uses some libs that give deprocated warnings, disable these to prevent tests from failing
filterwarnings = [
"ignore::DeprecationWarning:pymorphy3"
]
# required_plugins: plugins that must be present for pytest to run
# pytest-qt: allows for writing tests for PyQt5, PyQt6, PySide2 and PySide6 applications.
# pytest-xvfb: allows tests to be run without windows popping up during GUI tests or on systems without a display (like a CI).
# pytest-expect: stores test expectations by saving the set of failing tests, allowing them to be marked as xfail when running them in future.
# pytest-sugar: showing failures and errors instantly, adding a progress bar, improving the test results, and making the output look better.
# pytest-randomly: randomly order tests and control random.seed.
# pytest-cov: test coverage
# - use "pytest --randomly-seed=xxxxxxx" to repeate failing seeds
required_plugins = "pytest-qt pytest-xvfb pytest-expect pytest-sugar pytest-randomly pytest-cov"
# xfail_strict = True: tests marked with @pytest.mark.xfail that actually succeed will by default fail the test suite
xfail_strict = "True"
# addopts: set of command line arguments as if they had been specified by the user
# --strict-markers: markers not registered in the `markers` section of the configuration file raise errors.
# --durations=5: show the N slowest setup/test durations (N=0 for all)
# --maxfail=1: exit after first num failures or errors.
# --cov=ankimorphs: filesystem path of the project to cover
# --cov-report html: type of report to generate. Open html reeports by clicking `index.html` in `htmlcov/`
addopts = "--strict-markers --durations=5 --maxfail=1000000"
# markers: whitelist custom markers
# example with: pytest -m slow
markers = [
"slow",
"recalc",
"external_morphemizers",
"should_cause_exception",
"debug"
]
[tool.vulture]
paths = ["ankimorphs"]
exclude = [
"ankimorphs/ui/",
"ankimorphs/debugging_utils.py",
"ankimorphs/table_utils.py",
"ankimorphs/morphemizers/spacy_wrapper.py",
"ankimorphs/morphemizers/mecab_wrapper.py"
]
ignore_names = [
"print_*",
"_refresh_needed",
"_v3",
"reopen",
"closeWithCallback",
"closeEvent",
"toolbar_stats_use_seen",
"extra_fields_display_lemmas",
"min_occurrence"
]
min_confidence = 60
sort_by_size = true
verbose = false