16 Commits
Author SHA1 Message Date
ajurna ce809ed1a9 **Refactor directory scanning and add scan task support**
- Added a new `scan_directory` task to enable folder scans as asynchronous tasks while maintaining compatibility with the immediate backend.
- Introduced the `reconcile` function, replacing `generate_directory` for improved separation of concerns between database writes and read operations.
- Established a unique constraint on `Directory` (`one_directory_name_per_parent`) to prevent duplicate directories under the same parent.
- Added a "Scan" button to the frontend for re-reading folders from disk, along with new task invocation endpoints in the API.
- Updated tests across modules to validate the new `scan_directory` task, unique constraints, and database indexing logic.
- Improved cleanup logic for stale files, directories, and thumbnails to handle concurrent operations efficiently.
- Simplified `scan_comics` management command by removing user dependency and aligning it with the new `reconcile` function.
- Enhanced frontend components (`TheComicReader`, `TheComicList`, and others) to include lifecycle method cleanups, prevent memory leaks, and handle task-based scans.
2026-10-13 15:58:06 +01:00
ajurna a7e9bd0743 **Replace Flake8 with Ruff, refactor type hints, and enhance archive processing logic**
- Removed `flake8` and `flake8-annotations` from dependencies, replaced by `ruff` for linting.
- Introduced cleaner type hinting and modern Python annotations (PEP 604 style) across multiple modules.
- Moved archive processing to a dedicated helper (`comic.archives`) for improved maintainability.
- Updated and simplified logic for archive file retrieval, directory cleaning, and user access validation.
- Improved error handling and added support for user classification restrictions in API responses.
2026-10-13 12:07:47 +01:00
ajurnaandPeter Dwyer 40b79c2f5d V1 cleanup (#73)
* removed obsolete code

* removed obsolete code

* removed obsolete code and added type annotations

* removed obsolete code and added type annotations

* version bump

Co-authored-by: Peter Dwyer <peter.dwyer@clanwilliamhealth.com>
2022-08-26 13:11:29 +01:00
ajurna d7821fab78 fixes for tests and update to README.md 2021-05-05 11:51:37 +01:00
ajurna d40c8e270c Rewrite of Comic lists so that tehy have thumbnails. (#26) 2021-04-23 18:21:25 +01:00
ajurna 43fc877445 fixed tests working. 2021-04-15 11:33:36 +01:00
ajurna 99e8077d8b fixed tests working. 2021-04-10 09:37:44 +01:00
ajurna 1d5dcb90c0 added a lock on a critical path when regenerating pages. this should allow all images to load correctly 2021-04-09 11:29:03 +01:00
ajurna dd806f0bce added a lock on a critical path when regenerating pages. this should allow all images to load correctly 2021-04-08 16:10:28 +01:00
ajurna 53d1ae6364 fixed bug where if duplicate pages exist comic will be rescanned. 2021-04-08 15:51:30 +01:00
ajurna b19d3aeaa2 fixed bug where if page is missing it will regenerate page records and serve it correctly. 2021-04-08 14:07:41 +01:00
ajurna c32f12cce7 fixed tests.
removed os based file access.
removed rarfile integration now using package.
now using environment variable for comic directory.
2021-04-07 16:30:46 +01:00
Kyle Harrison b4d1c4c2cb [ISSUE-3/4] Adds test container and tooling (#8)
* Adding black, isort, and flake8 to pytest

* Applying black, flake8, and isort to codebase
2019-07-29 13:19:03 +01:00
ajurna f87ab8636b Merge pull request #7 from apoclyps/docker-support
[ISSUE-3] Adding docker support
2019-07-25 22:35:13 +01:00
Apoclyps bd605e5832 Refactoring codebase to remove .decode() 2019-07-24 07:49:11 +01:00
Apoclyps 9aac431317 Adding pytest test runner 2019-07-24 07:21:24 +01:00