-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpyproject.toml
More file actions
124 lines (109 loc) · 3.31 KB
/
pyproject.toml
File metadata and controls
124 lines (109 loc) · 3.31 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
# File: pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "commitai"
# Make sure to update version in commitai/__init__.py as well
version = "3.3.0"
description = "Commitai helps you generate git commit messages using AI"
readme = "README.md"
requires-python = ">=3.10"
license = { file = "LICENSE" }
authors = [
{ name = "Luis Guilherme", email = "lgpelin92@gmail.com" },
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Version Control :: Git",
"Topic :: Utilities",
]
dependencies = [
"click>=8.1",
"langchain>=1.0",
"langchain-community>=0.4.0",
"langchain-core>=1.0",
"langchain-google-genai>=1.0",
"langgraph>=1.0.0",
"pydantic>=2.0",
"rich>=13.0",
"questionary>=2.0",
]
[project.urls]
"Bug Tracker" = "https://github.com/lguibr/commitai/issues"
"Documentation" = "https://github.com/lguibr/commitai/blob/main/README.md"
"Source Code" = "https://github.com/lguibr/commitai"
[project.scripts]
commitai = "commitai.cli:commitai_alias"
commitai-create-template = "commitai.cli:commitai_create_template_alias"
[project.optional-dependencies]
test = [
"pytest>=7.0",
"pytest-cov>=3.0", # Still needed for coverage run command
"mypy>=1.9.0",
"types-setuptools",
"ruff>=0.4.4",
"langchain-google-genai>=2.0.0", # Keep google genai here for mypy in pre-commit
]
[tool.hatch.version]
path = "commitai/__init__.py"
[tool.ruff]
# Base settings applied to both linter and formatter
line-length = 88
target-version = "py310" # Set base target version
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"C", # flake8-comprehensions
"B", # flake8-bugbear
"C90",# mccabe complexity
"B904",# raise from exception
"C4", # flake8-comprehensions C4xx
]
# Let the formatter handle line length (E501)
[tool.ruff.lint.mccabe]
max-complexity = 15
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.mypy]
python_version = "3.10" # Consistent with requires-python
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true
# Scan source and the new top-level tests directory
files = ["commitai", "tests"]
disable_error_code = ["arg-type", "call-arg"]
[tool.pytest.ini_options]
minversion = "7.0"
# Keep addopts minimal; coverage flags are now explicit in the CI command
addopts = "-ra -q"
# Point to the new top-level tests directory
testpaths = [
"tests",
]
[tool.coverage.run]
# Explicitly tell coverage where the source code is
source = ["commitai"]
# Enable branch coverage
branch = true
# Omit test files from coverage measurement itself
omit = ["tests/*"]
# Specify the config file for coverage run command
# rcfile = pyproject.toml # Not needed here, specified in command line
[tool.coverage.report]
# This fail_under is used for local runs if not overridden by command line
fail_under = 70
show_missing = true