Some checks failed
CI / style (push) Has been cancelled
CI / build-client (push) Has been cancelled
CI / build-amd64 (push) Has been cancelled
CI / build-tester (push) Has been cancelled
CI / test (cockroachdb) (push) Has been cancelled
CI / test (mariadb) (push) Has been cancelled
CI / test (postgres) (push) Has been cancelled
CI / test (sqlite) (push) Has been cancelled
CI / build-arm64 (push) Has been cancelled
CI / build-armv7 (push) Has been cancelled
CI / publish-images (push) Has been cancelled
CI / publish-release (push) Has been cancelled
Backend: - Add User model with username, hashed password, role, is_active - Add passlib[bcrypt] and python-jose[cryptography] dependencies - Create auth.py with JWT utilities, password hashing, role checking - Add /auth endpoints: status, setup, login, me, users CRUD - Add role-based permission system (viewer/operator/editor/admin) - Environment: SPOOLMAN_AUTH_ENABLED, SPOOLMAN_AUTH_SECRET_KEY - Migration for user table Frontend: - Add AuthProvider context with login/logout/setup - Add LoginPage component with setup mode for first user - Add ProtectedRoute wrapper for auth-required pages - Add axios interceptor to attach JWT token to requests - Add User Management tab in Settings (admin only) - Add translation keys for auth UI When SPOOLMAN_AUTH_ENABLED=true: - Users must login to access the app - First visit shows setup page to create admin account - Role-based access control for future endpoint protection Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
113 lines
2.2 KiB
TOML
113 lines
2.2 KiB
TOML
[project]
|
|
name = "spoolman"
|
|
version = "0.23C.3"
|
|
description = "A web service that keeps track of 3D printing spools."
|
|
authors = [
|
|
{ name = "Tony", email = "tony@nastynas.xyz" },
|
|
{ name = "Donkie", email = "daniel.cf.hultgren@gmail.com" },
|
|
{ name = "Claude", email = "noreply@anthropic.com" },
|
|
]
|
|
dependencies = [
|
|
"uvicorn~=0.34",
|
|
"httptools>=0.6.4; platform_machine != \"armv7l\"",
|
|
"uvloop!=0.15.0,!=0.15.1,>=0.21.0; platform_machine != \"armv7l\" and sys_platform != \"win32\" and (sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\")",
|
|
"fastapi~=0.115",
|
|
"SQLAlchemy[aiomysql,aiosqlite,asyncio,postgresql_asyncpg]~=2.0",
|
|
"pydantic~=2.10",
|
|
"platformdirs~=4.3",
|
|
"alembic~=1.15",
|
|
"scheduler~=0.8",
|
|
"sqlalchemy-cockroachdb~=2.0",
|
|
"asyncpg~=0.30",
|
|
"psycopg2-binary~=2.9",
|
|
"setuptools~=76.0",
|
|
"WebSockets~=15.0",
|
|
"prometheus-client~=0.21",
|
|
"httpx~=0.28",
|
|
"hishel~=0.1",
|
|
"python-multipart~=0.0",
|
|
"passlib[bcrypt]~=1.7",
|
|
"python-jose[cryptography]~=3.3",
|
|
]
|
|
requires-python = ">=3.9,<3.13"
|
|
|
|
[project.license]
|
|
text = "MIT"
|
|
|
|
[tool.pdm.dev-dependencies]
|
|
dev = [
|
|
"ruff==0.11.0",
|
|
"black~=25.1.0",
|
|
"pre-commit~=4.1.0",
|
|
"pytest~=8.3.5",
|
|
"pytest-asyncio~=0.25.3",
|
|
"httpx~=0.28.1",
|
|
]
|
|
|
|
[tool.pdm.scripts.docs]
|
|
call = "spoolman.docs:generate_docs"
|
|
|
|
[tool.pdm.scripts.bump]
|
|
call = "spoolman.bump:bump"
|
|
|
|
[tool.pdm.scripts.app]
|
|
cmd = "uvicorn spoolman.main:app"
|
|
|
|
[tool.pdm.scripts.itest]
|
|
cmd = "python tests_integration/run.py"
|
|
|
|
[tool.ruff]
|
|
line-length = 120
|
|
target-version = "py39"
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
"ALL",
|
|
]
|
|
ignore = [
|
|
"A003",
|
|
"D101",
|
|
"D104",
|
|
"D203",
|
|
"D213",
|
|
"D406",
|
|
"D407",
|
|
"FA100",
|
|
"FIX002",
|
|
"S104",
|
|
"TRY201",
|
|
"TRY003",
|
|
"EM101",
|
|
"EM102",
|
|
"DTZ003",
|
|
"PLR0913",
|
|
"SIM108",
|
|
"TD002",
|
|
"TD003",
|
|
]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"tests*/*" = [
|
|
"ANN201",
|
|
"ASYNC210",
|
|
"S101",
|
|
"PLR2004",
|
|
"D103",
|
|
"TID252",
|
|
]
|
|
"migrations/versions/*" = [
|
|
"N999",
|
|
]
|
|
|
|
[tool.black]
|
|
line-length = 120
|
|
target-version = [
|
|
"py39",
|
|
]
|
|
|
|
[build-system]
|
|
requires = [
|
|
"pdm-backend",
|
|
]
|
|
build-backend = "pdm.backend"
|