-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
168 lines (154 loc) · 4.02 KB
/
pyproject.toml
File metadata and controls
168 lines (154 loc) · 4.02 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
[build-system]
requires = ["hatchling", "hatch-vcs"]
build-backend = "hatchling.build"
[project]
name = "astroapi-python"
dynamic = ["version"]
description = "Modern Python client for Astrology API v3"
readme = "README.md"
license = {text = "MIT"}
authors = [
{name = "Procoders", email = "info@procoders.tech"}
]
classifiers = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Typing :: Typed",
"Topic :: Software Development :: Libraries :: Python Modules",
]
requires-python = ">=3.10"
dependencies = [
"httpx>=0.27.0",
"pydantic>=2.0.0",
]
[project.optional-dependencies]
dev = [
"pytest>=8.0.0",
"pytest-cov>=4.1.0",
"pytest-httpx>=0.30.0",
"ruff>=0.3.0",
"mypy>=1.9.0",
"pre-commit>=3.0.0",
]
[project.urls]
Homepage = "https://github.com/astro-api/astroapi-python"
Documentation = "https://github.com/astro-api/astroapi-python#readme"
Repository = "https://github.com/astro-api/astroapi-python"
Issues = "https://github.com/astro-api/astroapi-python/issues"
[tool.hatch.version]
source = "vcs"
[tool.hatch.build.hooks.vcs]
version-file = "src/astroapi/_version.py"
[tool.hatch.build.targets.wheel]
packages = ["src/astroapi"]
[tool.pytest.ini_options]
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = [
"--cov=src/astroapi",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-branch",
"-v",
"-m", "not integration",
]
markers = [
"integration: Integration tests calling real API (run with: pytest -m integration)",
]
filterwarnings = [
"error",
"ignore::DeprecationWarning",
]
[tool.coverage.run]
branch = true
source = ["src/astroapi"]
omit = [
"src/astroapi/__init__.py",
"src/astroapi/_version.py",
"src/astroapi/types/__init__.py",
"src/astroapi/categories/__init__.py",
"src/astroapi/utils/__init__.py",
"tests/*",
]
[tool.coverage.report]
fail_under = 100
exclude_lines = [
"pragma: no cover",
"def __repr__",
"raise AssertionError",
"raise NotImplementedError",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"@abstractmethod",
"except ImportError:",
]
[tool.ruff]
line-length = 100
target-version = "py310"
exclude = ["src/astroapi/_version.py"]
[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"N", # pep8-naming
"UP", # pyupgrade
"S", # flake8-bandit
"B", # flake8-bugbear
"A", # flake8-builtins
"C4", # flake8-comprehensions
"DTZ", # flake8-datetimez
"T10", # flake8-debugger
"ISC", # flake8-implicit-str-concat
"ICN", # flake8-import-conventions
"PIE", # flake8-pie
"PT", # flake8-pytest-style
"Q", # flake8-quotes
"RET", # flake8-return
"SIM", # flake8-simplify
"ARG", # flake8-unused-arguments
"PTH", # flake8-use-pathlib
"ERA", # eradicate
"PL", # pylint
"RUF", # ruff-specific rules
]
ignore = [
"S101", # Use of assert
"PLR0913", # Too many arguments
"PLR2004", # Magic value used in comparison
]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[tool.ruff.lint.per-file-ignores]
"tests/*" = ["S101", "PLR2004", "ARG001"]
[tool.mypy]
python_version = "3.10"
strict = true
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
disallow_any_generics = true
disallow_subclassing_any = true
disallow_untyped_calls = true
disallow_incomplete_defs = true
check_untyped_defs = true
disallow_untyped_decorators = true
no_implicit_optional = true
warn_redundant_casts = true
warn_unused_ignores = true
warn_no_return = true
follow_imports = "normal"
ignore_missing_imports = false
[[tool.mypy.overrides]]
module = "tests.*"
disallow_untyped_defs = false