Skip to content

Commit 06b7f6a

Browse files
committed
🔧 Add initial setup and configurations for pyproject.toml
1 parent 3292b53 commit 06b7f6a

File tree

1 file changed

+115
-3
lines changed

1 file changed

+115
-3
lines changed

pyproject.toml

Lines changed: 115 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,131 @@
11
[project]
22
name = "fastapi-cli"
3-
version = "0.0.1"
4-
description = ""
3+
dynamic = ["version"]
4+
description = "Run FastAPI applications from the command line."
55
authors = [
66
{name = "Sebastián Ramírez", email = "[email protected]"},
77
]
8-
dependencies = []
98
requires-python = ">=3.7"
109
readme = "README.md"
1110
license = {text = "MIT"}
11+
classifiers = [
12+
"Intended Audience :: Information Technology",
13+
"Intended Audience :: System Administrators",
14+
"Operating System :: OS Independent",
15+
"Programming Language :: Python :: 3",
16+
"Programming Language :: Python",
17+
"Topic :: Software Development :: Libraries :: Application Frameworks",
18+
"Topic :: Software Development :: Libraries :: Python Modules",
19+
"Topic :: Software Development :: Libraries",
20+
"Topic :: Software Development",
21+
"Typing :: Typed",
22+
"Development Status :: 4 - Beta",
23+
"Framework :: FastAPI",
24+
"Intended Audience :: Developers",
25+
"License :: OSI Approved :: MIT License",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.7",
28+
"Programming Language :: Python :: 3.8",
29+
"Programming Language :: Python :: 3.9",
30+
"Programming Language :: Python :: 3.10",
31+
"Programming Language :: Python :: 3.11",
32+
"Programming Language :: Python :: 3.12",
33+
"License :: OSI Approved :: MIT License",
34+
]
35+
dependencies = []
36+
37+
[project.optional-dependencies]
38+
standard = []
39+
40+
[project.urls]
41+
Documentation = "https://fastapi.tiangolo.com"
42+
homepage = "https://github.com/tiangolo/fastapi-cli"
43+
Repository = "https://github.com/tiangolo/fastapi-cli"
44+
45+
[project.scripts]
46+
fastapi = "fastapi_cli.cli:main"
1247

1348
[build-system]
1449
requires = ["pdm-backend"]
1550
build-backend = "pdm.backend"
1651

1752

1853
[tool.pdm]
54+
version = { source = "file", path = "src/fastapi_cli/__init__.py" }
1955
distribution = true
56+
57+
[tool.pdm.build]
58+
source-includes = [
59+
"tests/",
60+
"requirements*.txt",
61+
"scripts/",
62+
]
63+
64+
[tool.tiangolo._internal-slim-build.packages.fastapi-cli-slim.project]
65+
name = "fastapi-cli-slim"
66+
67+
[tool.tiangolo._internal-slim-build.packages.fastapi-cli]
68+
include-optional-dependencies = ["standard"]
69+
70+
[tool.tiangolo._internal-slim-build.packages.fastapi-cli.project]
71+
optional-dependencies = {}
72+
73+
[tool.pytest.ini_options]
74+
addopts = [
75+
"--strict-config",
76+
"--strict-markers",
77+
]
78+
xfail_strict = true
79+
junit_family = "xunit2"
80+
81+
[tool.coverage.run]
82+
parallel = true
83+
data_file = "coverage/.coverage"
84+
source = [
85+
"src",
86+
"tests",
87+
]
88+
context = '${CONTEXT}'
89+
90+
[tool.coverage.report]
91+
exclude_lines = [
92+
"pragma: no cover",
93+
"@overload",
94+
'if __name__ == "__main__":',
95+
"if TYPE_CHECKING:",
96+
]
97+
98+
[tool.mypy]
99+
strict = true
100+
101+
# [[tool.mypy.overrides]]
102+
# module = "shellingham"
103+
# ignore_missing_imports = true
104+
105+
[tool.ruff.lint]
106+
select = [
107+
"E", # pycodestyle errors
108+
"W", # pycodestyle warnings
109+
"F", # pyflakes
110+
"I", # isort
111+
"B", # flake8-bugbear
112+
"C4", # flake8-comprehensions
113+
"UP", # pyupgrade
114+
]
115+
ignore = [
116+
"E501", # line too long, handled by black
117+
"B008", # do not perform function calls in argument defaults
118+
"C901", # too complex
119+
"W191", # indentation contains tabs
120+
]
121+
122+
# [tool.ruff.lint.per-file-ignores]
123+
# "__init__.py" = ["F401"]
124+
125+
126+
[tool.ruff.lint.isort]
127+
known-third-party = ["typer", "fastapi"]
128+
129+
[tool.ruff.lint.pyupgrade]
130+
# Preserve types, even if a file imports `from __future__ import annotations`.
131+
keep-runtime-typing = true

0 commit comments

Comments
 (0)