Рефакторинг: - OtherAPI упразднён — все методы перемещены в KworkClient - Методы client.get_wants(), get_kworks_status() и др. теперь напрямую в клиенте - Удалён property client.other Документация: - MkDocs + mkdocstrings + Material theme для HTML сайта - Навигация, поиск, форматирование кода - docs/index.md — quick start guide - docs/api/*.md — API reference с автогенерацией из docstrings - Pre-commit hook для автогенерации HTML Зависимости: - Добавлены: mkdocs, mkdocs-material, mkdocstrings, mkdocstrings-python - Убран pydoc-markdown (не нужен) Команды: - mkdocs build — сборка HTML - mkdocs serve — локальный просмотр
107 lines
2.3 KiB
TOML
107 lines
2.3 KiB
TOML
[project]
|
|
name = "kwork-api"
|
|
version = "0.1.0"
|
|
description = "Unofficial Kwork.ru API client"
|
|
readme = "README.md"
|
|
license = {text = "MIT"}
|
|
requires-python = ">=3.10"
|
|
authors = [
|
|
{name = "Claw", email = "claw@localhost"}
|
|
]
|
|
keywords = ["kwork", "api", "client", "parsing", "freelance"]
|
|
classifiers = [
|
|
"Development Status :: 3 - Alpha",
|
|
"Intended Audience :: Developers",
|
|
"License :: OSI Approved :: MIT License",
|
|
"Operating System :: OS Independent",
|
|
"Programming Language :: Python :: 3",
|
|
"Programming Language :: Python :: 3.10",
|
|
"Programming Language :: Python :: 3.11",
|
|
"Programming Language :: Python :: 3.12",
|
|
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
]
|
|
|
|
dependencies = [
|
|
"httpx[http2]>=0.26.0",
|
|
"pydantic>=2.0.0",
|
|
"structlog>=24.0.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-cov>=4.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
"respx>=0.20.0",
|
|
"ruff>=0.3.0",
|
|
]
|
|
|
|
[project.urls]
|
|
Homepage = "http://5.188.26.192:3000/claw/kwork-api"
|
|
Repository = "http://5.188.26.192:3000/claw/kwork-api.git"
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["src/kwork_api"]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.0.0",
|
|
"pytest-cov>=4.0.0",
|
|
"pytest-asyncio>=0.23.0",
|
|
"respx>=0.20.0",
|
|
"ruff>=0.3.0",
|
|
"pydoc-markdown>=4.8.2",
|
|
"mkdocs>=1.6.1",
|
|
"mkdocs-material>=9.7.6",
|
|
"mkdocstrings>=1.0.3",
|
|
"mkdocstrings-python>=2.0.3",
|
|
]
|
|
|
|
[tool.pytest.ini_options]
|
|
testpaths = ["tests"]
|
|
python_files = ["test_*.py"]
|
|
python_functions = ["test_*"]
|
|
asyncio_mode = "auto"
|
|
markers = [
|
|
"unit: Unit tests with mocks",
|
|
"integration: Integration tests with real API",
|
|
]
|
|
addopts = "-v --cov=kwork_api --cov-report=term-missing"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py310"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"E", # pycodestyle errors
|
|
"W", # pycodestyle warnings
|
|
"F", # pyflakes
|
|
"I", # isort
|
|
"B", # flake8-bugbear
|
|
"C4", # flake8-comprehensions
|
|
"UP", # pyupgrade
|
|
]
|
|
ignore = [
|
|
"E501", # line too long
|
|
]
|
|
|
|
[tool.coverage.run]
|
|
source = ["kwork_api"]
|
|
branch = true
|
|
|
|
[tool.coverage.report]
|
|
exclude_lines = [
|
|
"pragma: no cover",
|
|
"def __repr__",
|
|
"raise NotImplementedError",
|
|
"if __name__ == .__main__.:",
|
|
"if TYPE_CHECKING:",
|
|
]
|
|
|
|
|