-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpyproject.toml
More file actions
279 lines (254 loc) · 7.67 KB
/
pyproject.toml
File metadata and controls
279 lines (254 loc) · 7.67 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
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
[project]
name = "youtrack-cli"
version = "0.22.2"
description = "YouTrack CLI - Command line interface for JetBrains YouTrack issue tracking system"
readme = "README.md"
requires-python = ">=3.9, <3.14"
license = { text = "MIT" }
authors = [
{ name = "Ryan Cheley", email = "rcheley@gmail.com" },
]
keywords = ["youtrack", "cli", "issue-tracking", "jetbrains", "project-management"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Software Development :: Bug Tracking",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]
dependencies = [
"rich>=13.0.0",
"textual>=0.40.0",
"pydantic>=2.0.0",
"click>=8.0.0",
"httpx>=0.24.0",
"python-dotenv>=1.0.0",
"pydantic-settings>=2.0.0",
"tomli>=1.2.0; python_version<'3.11'",
"structlog>=25.4.0",
"keyring>=25.0.0",
"cryptography>=41.0.0",
"ty>=0.0.1a14",
"docker>=7.0.0",
"selenium>=4.34.2",
]
[project.urls]
Homepage = "https://github.com/ryancheley/yt-cli"
Documentation = "https://yt-cli.readthedocs.io/"
Repository = "https://github.com/ryancheley/yt-cli.git"
Issues = "https://github.com/ryancheley/yt-cli/issues"
Changelog = "https://github.com/ryancheley/yt-cli/blob/main/CHANGELOG.md"
[project.scripts]
yt = "youtrack_cli.main:main"
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["youtrack_cli"]
[tool.hatch.build.targets.wheel.force-include]
"youtrack_cli/py.typed" = "youtrack_cli/py.typed"
[tool.ruff]
target-version = "py39"
line-length = 120
extend-exclude = [
"migrations",
"build",
"dist",
".venv",
"venv",
"__pycache__",
".git",
]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"Q", # flake8-quotes
# Temporarily disabled for gradual adoption:
# "N", # pep8-naming
# "S", # flake8-bandit (security)
# "T20", # flake8-print
# "PT", # flake8-pytest-style
# "RET", # flake8-return
# "SIM", # flake8-simplify
# "TID", # flake8-tidy-imports
# "ARG", # flake8-unused-arguments
# "ERA", # eradicate (commented-out code)
# "PL", # pylint
# "TRY", # tryceratops
# "FURB", # refurb
]
ignore = [
# Python 3.9 compatibility
"UP045", # Use `X | None` for type annotations
"UP007", # Use `X | Y` for type annotations
"UP006", # Use `dict` instead of `Dict`
"UP035", # `typing.Dict` is deprecated
# Security exceptions for CLI tools
"S101", # Use of assert (common in tests)
"S603", # subprocess call without shell=True
"S607", # Starting a process with a partial executable path
# Style preferences
"E501", # Line too long (handled by formatter)
"T201", # print statements (allowed in CLI)
"PLR0913", # Too many arguments (can be necessary)
"PLR2004", # Magic value comparison
# Security exceptions (additional)
"S108", # Probable insecure usage of temporary files
"S110", # try-except-pass detected
"S112", # try-except-continue detected
# Code complexity (can be addressed gradually)
"PLR0911", # Too many return statements
"PLR0912", # Too many branches
"PLR0915", # Too many statements
"C901", # Complex function
"PLC0415", # Import outside top-level
"ARG001", # Unused function argument
"ARG002", # Unused method argument
"TRY300", # Consider moving statement to else block
"TRY400", # Use logging.exception instead of logging.error
"RET504", # Unnecessary assignment before return
"SIM102", # Use single if statement
"SIM115", # Use context manager for opening files
"PT003", # scope='function' is implied in pytest.fixture
# Temporary ignores (can be removed gradually)
"N806", # Variable in function should be lowercase
"SIM108", # Use ternary operator
"TRY003", # Avoid specifying long messages outside exception class
]
[tool.ruff.lint.per-file-ignores]
"tests/*" = [
"S101", # Use of assert (required in tests)
"PLR2004", # Magic value comparison (common in tests)
"ARG001", # Unused function argument (fixtures)
"S105", # Hardcoded password (test data)
"S106", # Hardcoded password (test data)
]
"docs/*" = [
"INP001", # Missing __init__.py (not needed for docs)
]
[tool.ruff.lint.isort]
known-first-party = ["youtrack_cli"]
force-single-line = false
combine-as-imports = true
split-on-trailing-comma = true
[tool.ruff.lint.flake8-quotes]
inline-quotes = "double"
multiline-quotes = "double"
docstring-quotes = "double"
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
line-ending = "auto"
[tool.ty]
# Type checking configuration for ty - using minimal config for now
[tool.pydocstyle]
convention = "google"
add_ignore = ["D100", "D104", "D105", "D107", "D212", "D403"]
match_dir = "youtrack_cli"
match = "(?!test_).*\\.py"
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py", "*_test.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"-v",
"--tb=short",
"--strict-markers",
"--strict-config",
"--disable-warnings",
"--cov=youtrack_cli",
"--cov-report=term-missing",
"--cov-report=html:htmlcov",
"--cov-report=xml",
"--cov-fail-under=50",
"--maxfail=5",
"--durations=10",
"--doctest-modules",
]
markers = [
"integration: marks tests as integration tests (require real YouTrack API access)",
"unit: marks tests as unit tests (fast, isolated, no external dependencies)",
"doctest: marks tests as doctests (documentation code examples)",
"slow: marks tests as slow (may take more than 1 second)",
"network: marks tests that require network access",
]
filterwarnings = [
"ignore::DeprecationWarning",
"ignore::PendingDeprecationWarning",
"ignore::pytest.PytestUnraisableExceptionWarning",
"ignore::UserWarning",
]
doctest_optionflags = ["NORMALIZE_WHITESPACE", "ELLIPSIS", "IGNORE_EXCEPTION_DETAIL"]
[tool.coverage.run]
source = ["youtrack_cli"]
omit = [
"tests/*",
"*/test_*",
"youtrack_cli/__main__.py",
"*/venv/*",
"*/.venv/*",
"*/migrations/*",
]
branch = true
parallel = true
[tool.coverage.report]
precision = 2
show_missing = true
skip_covered = false
sort = "Cover"
exclude_lines = [
"pragma: no cover",
"def __repr__",
"def __str__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
"except ImportError:",
]
fail_under = 60
[tool.coverage.html]
directory = "htmlcov"
show_contexts = true
[tool.coverage.xml]
output = "coverage.xml"
[dependency-groups]
dev = [
"ty>=0.0.1a13",
"pytest>=8.4.1",
"pytest-asyncio>=1.0.0",
"pytest-cov>=6.2.1",
"pytest-randomly>=3.0.0",
"ruff>=0.12.1",
"tox>=4.27.0",
"tox-uv>=1.0.0",
"zizmor>=1.11.0",
"twine>=6.1.0",
"pre-commit>=3.0.0",
"pydocstyle>=6.3.0",
]
docs = [
"sphinx>=7.0.0",
"sphinx-rtd-theme>=2.0.0",
"sphinx-autobuild>=2021.3.14",
"sphinx-autodoc-typehints>=1.24.0",
"sphinx-click>=5.0.0",
]