-
Notifications
You must be signed in to change notification settings - Fork 6
/
pyproject.toml
112 lines (101 loc) · 2.79 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
112
[tool.poetry]
name = "tracarbon"
authors = ["Florian Valeye <[email protected]>"]
version = "0.7.2"
description = "Tracarbon is a Python library that tracks your device's energy consumption and calculates your carbon emissions."
readme = "README.md"
license = "Apache-2.0"
keywords = ["energy", "sustainability", "energy-consumption", "electricity-consumption", "energy-efficiency", "carbon-footprint", "carbon-emissions"]
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3 :: Only"
]
include = ["tracarbon/py.typed"]
[tool.poetry.dependencies]
python = "^3.8"
loguru = ">=0.6,<0.8"
aiohttp = "^3.9.3"
aiocache = "^0.12.1"
aiofiles = ">=23.2,<25.0"
psutil = ">=5.9.8,<7.0.0"
ujson = "^5.9.0"
msgpack = "^1.0.4"
pydantic = ">=1.10.7,<3.0.0"
typer = ">=0.7,<0.13"
ec2-metadata = "^2.13.0"
python-dotenv = ">=0.21,<1.1"
asyncer = ">=0.0.5,<0.0.8"
datadog = {version = ">=0.44,<0.51", optional = true}
prometheus-client = {version = ">=0.16,<0.21", optional = true}
kubernetes = {version = ">=26.1,<32.0", optional = true}
[tool.poetry.dev-dependencies]
mypy = "^1.10"
ruff = "^0.6.8"
pytest = "^8.2.1"
pytest-mock = "^3.14.0"
pytest-asyncio = "^0.23.7"
pytest-cov = "^5.0.0"
pytest-xdist = "^3.6.1"
pytest-clarity = "^1.0.1"
sphinx = "^7.1.2"
pydata-sphinx-theme = "^0.14.4"
toml = "^0.10.2"
types-ujson = "^5.10.0"
datadog = ">=0.44,<0.51"
prometheus-client = ">=0.16,<0.21"
types-requests = "^2.31.0"
bandit = "^1.7.9"
radon = "^6.0.1"
types-aiofiles = "^24.1.0"
kubernetes = ">=26.1,<32.0"
autodoc_pydantic = "1.9.1"
[tool.poetry.extras]
datadog = ["datadog"]
prometheus = ["prometheus-client"]
kubernetes = ["kubernetes"]
[tool.poetry.scripts]
tracarbon = "tracarbon.cli:main"
[project.urls]
documentation = "https://fvaleye.github.io"
repository = "https://github.com/fvaleye/tracarbon"
[tool.mypy]
files = "tracarbon/"
exclude = "venv,^tests"
mypy_path = "./stubs"
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_untyped_defs = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_return_any = false
implicit_reexport = true
strict_equality = true
strict_optional = false
[tool.bandit]
skips = ["B404", "B607", "B602", "B603"]
exclude_dirs = ["tests", "scripts"]
[tool.ruff]
fix = true
select = ["I", "S", "B"]
line-length = 120
ignore = ["B023", "S603"]
[tool.ruff.per-file-ignores] # Don’t apply ruff rules to our tests
"**/tests/*" = ["S"]
[tool.ruff.isort]
force-single-line = true
[tool.pytest.ini_options]
addopts = "--cov=tracarbon -v --asyncio-mode=auto"
markers = [
"darwin",
"windows",
"linux"
]
testpaths = [
"tests",
]