Files
disknext/pyproject.toml
于小丘 446d219aca Refactor import statements for ResponseBase in API routers
- Updated import statements in the following files to import ResponseBase directly from models instead of models.response:
  - routers/api/v1/share/__init__.py
  - routers/api/v1/site/__init__.py
  - routers/api/v1/slave/__init__.py
  - routers/api/v1/tag/__init__.py
  - routers/api/v1/user/__init__.py
  - routers/api/v1/vas/__init__.py
  - routers/api/v1/webdav/__init__.py

Enhance user registration and related endpoints in user router

- Changed return type annotations from models.response.ResponseBase to models.ResponseBase in multiple functions.
- Updated return statements to reflect the new import structure.
- Improved documentation for clarity.

Add PhysicalFile model and storage service implementation

- Introduced PhysicalFile model to represent actual files on disk with reference counting logic.
- Created storage service module with local storage implementation, including file operations and error handling.
- Defined exceptions for storage operations to improve error handling.
- Implemented naming rule parser for generating file and directory names based on templates.

Update dependency management in uv.lock

- Added aiofiles version 25.1.0 to the project dependencies.
2025-12-23 12:20:06 +08:00

63 lines
1.4 KiB
TOML

[project]
name = "DiskNext-Server"
version = "0.0.1"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.13"
dependencies = [
"aiofiles>=25.1.0",
"aiohttp>=3.13.2",
"aiosqlite>=0.21.0",
"argon2-cffi>=25.1.0",
"fastapi[standard]>=0.122.0",
"httpx>=0.27.0",
"itsdangerous>=2.2.0",
"loguru>=0.7.3",
"pyjwt>=2.10.1",
"pyotp>=2.9.0",
"pytest>=9.0.2",
"pytest-asyncio>=0.24.0",
"pytest-cov>=6.0.0",
"pytest-xdist>=3.5.0",
"python-dotenv>=1.2.1",
"python-multipart>=0.0.20",
"sqlalchemy>=2.0.44",
"sqlmodel>=0.0.27",
"uvicorn>=0.38.0",
"webauthn>=2.7.0",
]
[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
addopts = ["-v", "--strict-markers", "--tb=short"]
markers = [
"slow: 标记为慢速测试",
"integration: 集成测试",
"unit: 单元测试",
]
[tool.coverage.run]
source = ["models", "routers", "middleware", "service", "utils"]
branch = true
omit = ["*/tests/*", "*/__pycache__/*"]
[tool.coverage.report]
show_missing = true
precision = 2
fail_under = 80
exclude_lines = [
"pragma: no cover",
"if TYPE_CHECKING:",
"raise NotImplementedError",
"pass",
]
[tool.coverage.html]
directory = "htmlcov"
title = "DiskNext Server 测试覆盖率报告"