171 lines
3.5 KiB
TOML
171 lines
3.5 KiB
TOML
[project]
|
|
name = "myboot"
|
|
version = "0.2.0"
|
|
description = "类似 Spring Boot 的 Python 快速开发框架"
|
|
authors = [
|
|
{name = "TrumanDu", email = "truman.p.du@qq.com"}
|
|
]
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
requires-python = ">=3.9"
|
|
keywords = ["framework", "web", "api", "scheduler", "logging", "config"]
|
|
classifiers = [
|
|
"Development Status :: 4 - Beta",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"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 :: Libraries :: Application Frameworks",
|
|
"Topic :: Internet :: WWW/HTTP :: HTTP Servers",
|
|
]
|
|
|
|
dependencies = [
|
|
"fastapi>=0.104.0",
|
|
"hypercorn>=0.14.0",
|
|
"pydantic>=2.0.0",
|
|
"pyyaml>=6.0",
|
|
"APScheduler>=3.10.0",
|
|
"python-multipart>=0.0.6",
|
|
"jinja2>=3.1.0",
|
|
"python-dotenv>=1.0.0",
|
|
"loguru>=0.7.0",
|
|
"colorama>=0.4.6",
|
|
"click>=8.0.0",
|
|
"dynaconf>=3.2.0",
|
|
"requests>=2.28.0",
|
|
"dependency-injector>=4.41.0",
|
|
"pytz>=2024.1",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=7.0",
|
|
"pytest-cov>=4.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"black>=23.0",
|
|
"isort>=5.12",
|
|
"flake8>=6.0",
|
|
"mypy>=1.0",
|
|
"pre-commit>=3.0",
|
|
]
|
|
|
|
test = [
|
|
"pytest>=7.0",
|
|
"pytest-cov>=4.0",
|
|
"pytest-asyncio>=0.21.0",
|
|
"httpx>=0.24.0",
|
|
"pytest-mock>=3.10",
|
|
"prometheus-client>=0.19.0",
|
|
]
|
|
|
|
metrics = [
|
|
"prometheus-client>=0.19.0",
|
|
]
|
|
|
|
docs = [
|
|
"sphinx>=7.0",
|
|
"sphinx-rtd-theme>=1.3",
|
|
"myst-parser>=2.0",
|
|
]
|
|
|
|
[project.scripts]
|
|
myboot = "myboot.cli:cli"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["myboot"]
|
|
|
|
[tool.hatch.build.targets.sdist]
|
|
include = [
|
|
"/myboot",
|
|
"/tests",
|
|
"/pyproject.toml",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 88
|
|
target-version = ['py39', 'py310', 'py311', 'py312', 'py313']
|
|
include = '\.pyi?$'
|
|
extend-exclude = '''
|
|
/(
|
|
# directories
|
|
\.eggs
|
|
| \.git
|
|
| \.hg
|
|
| \.mypy_cache
|
|
| \.tox
|
|
| \.venv
|
|
| build
|
|
| dist
|
|
)/
|
|
'''
|
|
|
|
[tool.isort]
|
|
profile = "black"
|
|
multi_line_output = 3
|
|
line_length = 88
|
|
known_first_party = ["myboot"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.9"
|
|
warn_return_any = true
|
|
warn_unused_configs = true
|
|
disallow_untyped_defs = 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
|
|
warn_unreachable = true
|
|
strict_equality = true
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py", "*_test.py"]
|
|
python_classes = ["Test*"]
|
|
python_functions = ["test_*"]
|
|
addopts = [
|
|
"--strict-markers",
|
|
"--strict-config",
|
|
"--verbose",
|
|
"--tb=short",
|
|
]
|
|
markers = [
|
|
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
|
|
"integration: marks tests as integration tests",
|
|
"unit: marks tests as unit tests",
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["myboot"]
|
|
omit = [
|
|
"*/tests/*",
|
|
"*/test_*",
|
|
"*/__pycache__/*",
|
|
"*/venv/*",
|
|
"*/.venv/*",
|
|
]
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"if self.debug:",
|
|
"if settings.DEBUG",
|
|
"raise AssertionError",
|
|
"raise NotImplementedError",
|
|
"if 0:",
|
|
"if __name__ == .__main__.:",
|
|
"class .*\\bProtocol\\):",
|
|
"@(abc\\.)?abstractmethod",
|
|
]
|