forked from Maciek-roboblog/Claude-Code-Usage-Monitor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
208 lines (187 loc) · 5.55 KB
/
pyproject.toml
File metadata and controls
208 lines (187 loc) · 5.55 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
# Automatically refactored pyproject.toml with best practices
[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "claude-monitor"
version = "3.1.0"
description = "A real-time terminal monitoring tool for Claude Code token usage with advanced analytics and Rich UI"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.9"
authors = [{ name = "Maciek", email = "maciek@roboblog.eu" }]
maintainers = [{ name = "Maciek", email = "maciek@roboblog.eu" }]
keywords = [
"ai", "analytics", "claude", "dashboard",
"developer-tools", "monitoring", "rich",
"terminal", "token", "usage"
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Environment :: Console :: Curses",
"Intended Audience :: Developers",
"Topic :: Software Development :: Debuggers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Monitoring",
"Topic :: Terminals",
"Topic :: Utilities",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
# "Operating System :: Microsoft :: Windows",
"Typing :: Typed"
]
dependencies = [
"numpy>=1.21.0",
"pydantic>=2.0.0",
"pydantic-settings>=2.0.0",
"pyyaml>=6.0",
"pytz>=2023.3",
"rich>=13.7.0",
"tomli>=1.2.0; python_version < '3.11'",
"tzdata; sys_platform == 'win32'"
]
[project.optional-dependencies]
dev = [
"black>=24.0.0",
"isort>=5.13.0",
"mypy>=1.13.0",
"pre-commit>=4.0.0",
"pytest>=8.0.0",
"pytest-asyncio>=0.24.0",
"pytest-benchmark>=4.0.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-xdist>=3.6.0",
"ruff>=0.12.0",
"build>=0.10.0",
"twine>=4.0.0"
]
test = [
"pytest>=8.0.0",
"pytest-cov>=6.0.0",
"pytest-mock>=3.14.0",
"pytest-asyncio>=0.24.0",
"pytest-benchmark>=4.0.0"
]
[project.urls]
homepage = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor"
repository = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor.git"
documentation = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor#readme"
issues = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/issues"
changelog = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/blob/main/CHANGELOG.md"
"Release Notes" = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/releases"
"Discussions" = "https://github.com/Maciek-roboblog/Claude-Code-Usage-Monitor/discussions"
[project.scripts]
claude-monitor = "claude_monitor.__main__:main"
claude-code-monitor = "claude_monitor.__main__:main"
cmonitor = "claude_monitor.__main__:main"
ccmonitor = "claude_monitor.__main__:main"
ccm = "claude_monitor.__main__:main"
[tool.setuptools.packages.find]
where = ["src"]
include = ["claude_monitor*"]
exclude = ["tests*", "src/tests*"]
[tool.setuptools.package-data]
claude_monitor = ["py.typed"]
[tool.black]
line-length = 88
target-version = ["py39", "py310", "py311", "py312"]
skip-string-normalization = false
include = '\.pyi?$'
extend-exclude = '''
/(
\.eggs
| \.git
| \.hg
| \.tox
| \.venv
| build
| dist
)/
'''
[tool.isort]
profile = "black"
line_length = 88
known_first_party = ["claude_monitor"]
force_single_line = true
atomic = true
include_trailing_comma = true
lines_after_imports = 2
lines_between_types = 1
use_parentheses = true
src_paths = ["src"]
skip_glob = ["*/migrations/*", "*/venv/*", "*/build/*", "*/dist/*"]
[tool.ruff]
line-length = 88
target-version = "py39"
[tool.ruff.lint]
select = ["E", "W", "F", "I"] # pycodestyle + Pyflakes + isort
ignore = ["E501"] # Line length handled by formatter
[tool.ruff.format]
quote-style = "double"
[tool.mypy]
python_version = "3.9"
warn_return_any = true # Catch unintended Any returns
warn_no_return = true # Ensure functions return as expected
strict_optional = true # Disallow None where not annotated
disable_error_code = [
"attr-defined", # Attribute existence
"name-defined", # Name resolution
"import", # Import errors
"misc", # Misc issues
]
[tool.pytest.ini_options]
minversion = "7.0"
testpaths = ["src/tests"]
python_files = ["test_*.py","*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--strict-markers","--strict-config","--color=yes","--tb=short",
"--cov=claude_monitor","--cov-report=term-missing","--cov-report=html",
"--cov-report=xml","--cov-fail-under=70","--no-cov-on-fail","-ra","-q",
"-m","not integration"
]
markers = [
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
"unit: marks tests as unit tests",
"integration: marks tests as integration tests",
"benchmark: marks tests as benchmarks",
"network: marks tests as requiring network access",
"subprocess: marks tests as requiring subprocess"
]
filterwarnings = [
"error",
"ignore::UserWarning",
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning"
]
[tool.coverage.run]
branch = true
source = ["src/claude_monitor"]
omit = ["*/tests/*","*/test_*","*/__main__.py","*/conftest.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod"
]
show_missing = true
skip_empty = false
precision = 2
[tool.coverage.html]
directory = "htmlcov"
[tool.coverage.xml]
output = "coverage.xml"