зеркало из https://github.com/openwpm/OpenWPM.git
Unify tool configuration in pyproject.toml (#1028)
* refactor(pytest): use pyproject.toml instead of pytest.ini * refactor(isort): use pyproject.toml instead of setup.cfg * refactor(mypy): use pyproject.toml instead of setup.cfg * fix(coverage): make coverage consider multiprocess this should increase the code coverage from our tests * fix(coverage): specify concurrency as an array
This commit is contained in:
Родитель
3265f84949
Коммит
5e0c44b65e
|
@ -0,0 +1,55 @@
|
|||
[tool.pytest.ini_options]
|
||||
python_files = "test_*.py"
|
||||
testpaths = "test"
|
||||
addopts = "--strict-markers"
|
||||
|
||||
markers = [
|
||||
"pyonly: marks a test as being python only and so server and xpi not needed",
|
||||
"slow: marks a test as slow (omit slow tests with '-m \"not slow\"')",
|
||||
]
|
||||
|
||||
[tool.isort]
|
||||
profile = "black"
|
||||
known_future_library = "future"
|
||||
known_first_party = ["openwpm", "openwpmtest", "test"]
|
||||
default_section = "THIRDPARTY"
|
||||
skip = ["venv", "Extension", "firefox-bin"]
|
||||
|
||||
[tool.mypy]
|
||||
follow_imports = "silent"
|
||||
python_version = 3.10
|
||||
warn_unused_configs = true
|
||||
ignore_missing_imports = true
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_defs = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "openwpm.storage.*"
|
||||
disallow_incomplete_defs = true
|
||||
disallow_untyped_defs = true
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "openwpm.*"
|
||||
disallow_untyped_defs = false
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = [
|
||||
"openwpm.utilities.*",
|
||||
"openwpm.mp_logger",
|
||||
"openwpm.commands.browser_commands",
|
||||
]
|
||||
disallow_incomplete_defs = false
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "openwpm.browser_manager"
|
||||
allow_redefinition = true
|
||||
disallow_incomplete_defs = false
|
||||
|
||||
[[tool.mypy.overrides]]
|
||||
module = "test.*"
|
||||
allow_untyped_defs = true
|
||||
|
||||
[tool.coverage.run]
|
||||
concurrency = ["multiprocessing"]
|
||||
parallel = true
|
||||
sigterm = true
|
|
@ -1,7 +0,0 @@
|
|||
[pytest]
|
||||
python_files=test_*.py
|
||||
testpaths=test
|
||||
|
||||
markers =
|
||||
pyonly: marks a test as being python only and so server and xpi not needed
|
||||
slow: marks a test as slow (omit slow tests with '-m "not slow"')
|
31
setup.cfg
31
setup.cfg
|
@ -1,31 +0,0 @@
|
|||
[tool:isort]
|
||||
profile = black
|
||||
known_future_library = future
|
||||
known_first_party = openwpm,openwpmtest,test
|
||||
default_section = THIRDPARTY
|
||||
skip = venv,Extension,firefox-bin
|
||||
|
||||
[mypy]
|
||||
follow_imports = silent
|
||||
python_version = 3.10
|
||||
warn_unused_configs = True
|
||||
ignore_missing_imports = True
|
||||
disallow_incomplete_defs = True
|
||||
disallow_untyped_defs = True
|
||||
|
||||
[mypy-openwpm.storage.*]
|
||||
disallow_incomplete_defs = True
|
||||
disallow_untyped_defs = True
|
||||
|
||||
[mypy-openwpm.*]
|
||||
disallow_untyped_defs = False
|
||||
|
||||
[mypy-openwpm.utilities.*,openwpm.mp_logger,openwpm.commands.browser_commands]
|
||||
disallow_incomplete_defs = False
|
||||
|
||||
[mypy-openwpm.browser_manager]
|
||||
allow_redefinition = True
|
||||
disallow_incomplete_defs = False
|
||||
|
||||
[mypy-test.*]
|
||||
allow_untyped_defs = True
|
Загрузка…
Ссылка в новой задаче