-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpyproject.toml
111 lines (96 loc) · 2.43 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
101
102
103
104
105
106
107
108
109
110
111
[tool.poetry]
name = "vmsifter"
version = "0.1.0"
description = "Enhanced sandsifter with performance counter monitoring and ring0 execution"
authors = [
"Tamas K Lengyel <tamas.lengyel@intel.com>",
"Mathieu Tarral <mathieu.tarral@intel.com>",
"Rowan Hart <rowan.hart@intel.com>",
]
license = "MIT"
[tool.poetry.dependencies]
python = "^3.10"
coloredlogs = "^15.0.1"
PyYAML = "^6.0"
docopt = "^0.6.2"
dynaconf = "3.2.5"
types-PyYAML = "^6.0.8"
attrs = "^23.1.0"
keystone-engine = "^0.9.2"
[tool.poetry.group.dev.dependencies]
black = "24.4.2"
poethepoet = "^0.18.1"
flake8 = "^6.0.0"
isort = "^5.10.1"
pytest = "^7.2.1"
more-itertools = "^8.12.0"
mypy = "^1.0.1"
flake8-pyproject = "^1.2.2"
pdbpp = "^0.10.3"
ipdb = "^0.13.11"
[tool.poetry.group.deploy.dependencies]
ansible = "^10.3.0"
[tool.poetry.scripts]
vmsifter = 'vmsifter.__main__:main'
[tool.poe.tasks]
format = { shell = "black . && isort ." }
lint = "flake8 --show-source --statistics"
typing = "mypy -p vmsifter"
ccode = { shell = "poe format && poe lint" }
pytest = "pytest --pdb --pdbcls=IPython.terminal.debugger:Pdb --verbose"
bench_test = """
# durations=0 shows execution time for each test
pytest
--verbose
--durations=0
tests/bench
"""
unit_test = "pytest --pdb --pdbcls=IPython.terminal.debugger:Pdb --verbose -x tests/unit"
# CI
format_check = { shell = "black . --check && isort . --check" }
[tool.poe.tasks.deploy]
cmd = "ansible-playbook -i inventory.yml site.yml"
cwd = "deploy"
# tools configuration
[tool.black]
line-length = 120
exclude = '''
/(
| \.mypy_cache
| xen
| xtf
| libvmi
)/
'''
[tool.isort]
profile = "black"
line_length = 120
skip = ["xen/", "xtf/", "libvmi/"]
[tool.flake8]
max-line-length = 120
exclude = ["xen/", "xtf/", "libvmi/", "tests/", "scripts/", "docs/"]
# https://black.readthedocs.io/en/stable/faq.html#why-are-flake8-s-e203-and-w503-violated
ignore = ["E203", "W503"]
[tool.mypy]
warn_unreachable = true
# TODO: warn_return_any = true
warn_unused_ignores = true
warn_redundant_casts = true
show_error_context = true
show_column_numbers = true
show_error_codes = true
pretty = true
check_untyped_defs = true
# exclude Drizzler
exclude = [
'drizzler.py',
'csv.py',
]
[tool.pytest.ini_options]
norecursedirs = ["xen/*"]
[[tool.mypy.overrides]]
module = ["dynaconf.*", "coloredlogs.*", "docopt.*"]
ignore_missing_imports = true
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"