Adam Ladachowski
d79861df53
Remove redundant /api/civitai/search endpoint
...
Unified search at /api/search handles both CivitAI and HuggingFace.
CivitAI routes now only provide:
- /api/civitai/model/{id} - get model by ID
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-15 21:15:24 +01:00
Adam Ladachowski
fb27f8a9b0
Fix formatting issues
...
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-15 19:57:55 +01:00
Adam Ladachowski
24aaca2a48
Fix lint ignores for test files
...
- Add PLC0415, ARG001, ARG005, F841 to test file ignores
- Remove now-redundant inline noqa comments
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-15 19:56:49 +01:00
Adam Ladachowski
e4fc392a90
Expand server test coverage from 66% to 73%
...
Add comprehensive tests for:
- Download routes helper functions (_format_size, _get_output_dir, _resolve_version_id)
- Background download task execution (success, failure, exception handling)
- Progress callback with different sizes (bytes, KB, MB, GB)
- Auto-linking downloaded files to CivitAI
- Database file lookup and linking with CivitAI matches
- CivitAI cache failure handling
- Gallery edge cases and metadata operations
- Server initialization and OpenAPI schema
Server module coverage now:
- auth.py: 100%
- civitai_routes.py: 98%
- db_routes.py: 97%
- download_routes.py: 98%
- gallery_routes.py: 98%
- gallery.py: 95%
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-15 19:11:25 +01:00
Adam Ladachowski
356d8fd156
💬 Commit message: Update 2026-02-15 06:21:35, 7 files, 1559 lines
...
📁 Files changed: 7
📝 Lines changed: 1559
• .coverage
• cli.py
• __init__.py
• conftest.py
• test_client.py
• test_generate.py
• test_server.py
2026-02-15 06:21:35 +01:00
Adam Ladachowski
e9480a18c2
Remove internal sd-server management, proxy to external sd-server
...
- Remove ProcessManager and process.py
- Add get_sd_server_url() config (env/config/default)
- Update routes to proxy to external sd-server URL
- Remove model switching (handled by external sd-server)
- Update CLI serve command
- Update tests for new architecture
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-14 06:39:35 +01:00
Adam Ladachowski
e257a029da
Phase 6: Tests for database, server, and client modules
...
- Add tests/test_db.py with 33 tests for Database class:
- Schema initialization and migrations
- Local file CRUD operations (scan, list, link)
- CivitAI model caching (cache_model, tags, versions, files)
- Query operations (search, get_model, get_triggers)
- Statistics and context manager
- Extend tests/test_server.py with 27 tests for API endpoints:
- Gallery endpoints (list, get, meta, edit, delete, stats)
- Database endpoints (files, models, stats)
- Gallery class unit tests
- Add tests/test_client.py with 33 tests for TsrClient:
- Server status operations
- Gallery image operations (list, get, delete, edit, download)
- Model management (list, active, switch, loras)
- Image generation
- CivitAI download operations
- Database query operations
- Error handling and context manager
Total: 191 tests passing with 61% coverage
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com >
2026-02-14 01:54:00 +01:00
Adam Ladachowski
61e68fee15
Turn server wrapper into transparent proxy with /reload
...
Replace management endpoints (/start, /stop, /restart) with a transparent
reverse proxy and hot-reload architecture. The wrapper now sits in front of
sd-server, forwarding all requests and adding a /reload endpoint for model
swapping without restarting the wrapper itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-02-12 20:51:16 +00:00
Adam Ladachowski
503274a938
[Update] 2026-02-12 20:23:09, 18 files
2026-02-12 20:23:09 +00:00