-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
133 lines (118 loc) · 3.32 KB
/
Copy pathpyproject.toml
File metadata and controls
133 lines (118 loc) · 3.32 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
[project]
name = "codesphere"
version = "1.0.0"
description = "Use Codesphere within python scripts."
readme = "README.md"
license = { file="LICENSE" }
authors = [
{ name = "Datata1", email = "jan-david.wiederstein@codesphere.com" }
]
requires-python = ">=3.12"
dependencies = [
"httpx>=0.28.1",
"pydantic>=2.11.7",
"pydantic-settings>=2.11.0",
"python-dotenv>=1.2.1",
"pyyaml>=6.0.2",
]
classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.build.targets.wheel]
packages = ["src/codesphere"]
[project.optional-dependencies]
dev = [
"pre-commit>=4.2.0",
"pytest>=8.4.0",
"pytest-asyncio",
"pytest-cov>=6.2.1",
"ruff>=0.11.13",
"bandit>=1.7.0",
"ty==0.0.58",
]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = [
"."
]
python_files = "test_*.py *_test.py"
python_functions = "test_*"
python_classes = "Test*"
asyncio_mode = "auto"
markers = [
"integration: mark test as integration test (requires API token and --run-integration flag)",
]
[tool.coverage.run]
source = ["src/codesphere"]
branch = true
omit = [
"*/__main__.py",
]
[tool.coverage.report]
show_missing = true
exclude_lines = [
"pragma: no cover",
"if __name__ == .__main__.:",
"raise NotImplementedError",
"@(abc\\.)?abstractmethod",
"def __repr__",
"def __str__",
]
include_namespace_packages = true
[tool.coverage.html]
directory = "test-results"
[tool.bandit]
targets = ["src/codesphere"]
exclude_dirs = ["tests", ".venv", ".uv", "examples", "docs", ".github", "scripts"]
skips = ["B101"]
[tool.ty.src]
exclude = [
# The refactor-ticket ratchet (plans/refactor/) is fully resolved: src and
# tests are type-checked. Do not add exclusions without a ticket reference.
# Examples have their own dependencies (e.g. fastapi) not installed in
# this project's environment.
"examples/",
]
[tool.unasyncd]
# The sync client is generated from the async source of truth.
# Regenerate with `make sync-gen`; CI verifies freshness via
# `unasyncd --check`. Never edit src/codesphere/_sync by hand.
files = { "src/codesphere/_async" = "src/codesphere/_sync" }
add_editors_note = true
transform_docstrings = true
cache = false
remove_unused_imports = false
ruff_fix = false
ruff_format = false
[tool.unasyncd.add_replacements]
"httpx.AsyncClient" = "httpx.Client"
"contextlib.AbstractAsyncContextManager" = "contextlib.AbstractContextManager"
"aiter_lines" = "iter_lines"
"aread" = "read"
"codesphere._async" = "codesphere._sync"
[tool.unasyncd.per_file_add_replacements]
"src/codesphere/_async/_compat.py" = { "asyncio" = "threading" }
[dependency-groups]
dev = [
"respx>=0.23.1",
"unasyncd>=0.10.1",
]
docs = [
"mkdocs-material>=9.5",
"mkdocstrings[python]>=0.27",
]
[project.urls]
Homepage = "https://codesphere.com/"
Repository = "https://github.com/Datata1/codesphere-python"
"Bug Tracker" = "https://github.com/Datata1/codesphere-python/issues"