-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathpyproject.toml
More file actions
213 lines (187 loc) · 5.6 KB
/
pyproject.toml
File metadata and controls
213 lines (187 loc) · 5.6 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
209
210
211
212
213
[build-system]
requires = ["setuptools>=61", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "gitflow-analytics"
dynamic = ["version"]
description = "Analyze Git repositories for developer productivity insights"
readme = "README.md"
requires-python = ">=3.9"
license = {text = "MIT"}
authors = [
{name = "Bob Matyas", email = "[email protected]"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: Software Development :: Quality Assurance",
]
keywords = ["git", "analytics", "productivity", "metrics", "development"]
dependencies = [
"click>=8.1",
"gitpython>=3.1",
"pygithub>=2.0",
"requests>=2.28.0",
"tqdm>=4.65",
"sqlalchemy>=2.0",
"pandas>=2.0",
"pyyaml>=6.0",
"python-dateutil>=2.8",
"python-dotenv>=1.0",
"rich>=13.0.0",
"tabulate>=0.9.0",
"numpy>=1.24.0",
"pytz>=2024.1",
"joblib>=1.5.3",
]
[project.optional-dependencies]
dev = [
"pytest>=7.0",
"pytest-cov>=4.0",
"pytest-mock>=3.0",
"ruff>=0.1.0",
"mypy>=1.0",
"black>=23.0",
"isort>=5.0",
"bandit[toml]>=1.7",
"safety>=2.0",
"python-semantic-release>=8.0.0",
"types-PyYAML>=6.0",
"types-requests>=2.28",
]
github = [
"pygithub>=1.58",
]
# ML/NLP feature extraction (spaCy-based commit analysis)
ml = [
"spacy>=3.7.0",
"scikit-learn>=1.3.0",
"joblib>=1.3.0",
]
# LLM-powered qualitative analysis (OpenAI / OpenRouter)
llm = [
"openai>=1.30.0",
"tiktoken>=0.7.0",
]
# AWS Bedrock LLM provider
bedrock = [
"boto3>=1.34.0",
]
all = [
"gitflow-analytics[github,ml,llm,bedrock]",
]
[project.scripts]
gitflow-analytics = "gitflow_analytics.cli:main"
gfa = "gitflow_analytics.cli:main"
[project.urls]
Homepage = "https://github.com/bobmatnyc/gitflow-analytics"
Documentation = "https://github.com/bobmatnyc/gitflow-analytics/blob/main/README.md"
Repository = "https://github.com/bobmatnyc/gitflow-analytics"
Issues = "https://github.com/bobmatnyc/gitflow-analytics/issues"
[tool.setuptools]
package-dir = {"" = "src"}
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools.dynamic]
version = {attr = "gitflow_analytics._version.__version__"}
[tool.ruff]
line-length = 100
target-version = "py39"
[tool.ruff.lint]
select = ["E", "F", "UP", "B", "SIM", "I"]
ignore = ["E501"] # Line too long - handled by formatter
[tool.ruff.lint.per-file-ignores]
"tests/**/*.py" = ["E402", "E722", "F401", "SIM102"] # Allow test-specific patterns
"scripts/**/*.py" = ["E402", "E722", "F401", "F841", "SIM102", "SIM103", "SIM105", "UP035", "UP006"] # Allow debug script patterns
[tool.black]
line-length = 100
target-version = ['py39']
[tool.isort]
profile = "black"
line_length = 100
multi_line_output = 3
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
ensure_newline_before_comments = true
[tool.mypy]
python_version = "3.9"
warn_return_any = false
warn_unused_configs = true
disallow_untyped_defs = false
disallow_incomplete_defs = false
check_untyped_defs = false
no_implicit_optional = false
warn_redundant_casts = false
warn_unused_ignores = false
warn_no_return = false
ignore_missing_imports = true
allow_untyped_calls = true
allow_untyped_decorators = true
warn_unreachable = false
strict_equality = false
# Exclude modules with pre-existing type errors pending incremental fixes
exclude = [
"src/gitflow_analytics/qualitative/",
"src/gitflow_analytics/reports/",
"src/gitflow_analytics/security/",
"src/gitflow_analytics/metrics/",
"src/gitflow_analytics/models/database.py",
"src/gitflow_analytics/core/schema_version.py",
"src/gitflow_analytics/core/analyzer.py",
"src/gitflow_analytics/classification/linguist_analyzer.py",
"src/gitflow_analytics/config/loader.py",
"tests/",
"scripts/",
]
[tool.coverage.run]
source = ["src"]
omit = ["*/tests/*", "*/test_*.py"]
[tool.coverage.report]
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
]
[tool.semantic_release]
version_variables = [
"src/gitflow_analytics/_version.py:__version__",
]
build_command = "pip install build && python -m build"
major_on_zero = false
tag_format = "v{version}"
upload_to_vcs_release = true
upload_to_pypi = false # Handled separately in release workflow
[tool.semantic_release.branches.main]
match = "main"
prerelease = false
[tool.semantic_release.commit_parser_options]
allowed_tags = ["feat", "fix", "docs", "style", "refactor", "perf", "test", "chore", "ci", "build"]
minor_tags = ["feat"]
patch_tags = ["fix", "perf", "docs", "style", "refactor", "chore", "ci", "build", "test"]
[tool.semantic_release.changelog]
changelog_file = "CHANGELOG.md"
exclude_commit_patterns = [
"^Merge pull request .*",
"^Merge branch .*",
"^chore\\(release\\): .*",
]
[tool.bandit]
exclude_dirs = ["tests", "scripts"]
skips = [
"B101", # assert_used
"B112", # try_except_continue - used deliberately in git iteration
"B324", # hashlib_md5_md5 - MD5 used for cache fingerprint (not security)
"B404", # import_subprocess - subprocess is required for git operations
"B603", # subprocess_without_shell_equals_true - shell=False is safer
"B607", # start_process_with_partial_path - git binary is well-known
]