Commit Graph

19 Commits

Author SHA1 Message Date
JSC
d5f9a3c736 feat: Run database migrations in a thread pool to avoid blocking during initialization 2025-09-21 13:21:23 +02:00
JSC
2bdd109492 Refactor code structure for improved readability and maintainability 2025-08-29 15:27:12 +02:00
JSC
dc89e45675 Refactor scheduled task repository and schemas for improved type hints and consistency
- Updated type hints from List/Optional to list/None for better readability and consistency across the codebase.
- Refactored import statements for better organization and clarity.
- Enhanced the ScheduledTaskBase schema to use modern type hints.
- Cleaned up unnecessary comments and whitespace in various files.
- Improved error handling and logging in task execution handlers.
- Updated test cases to reflect changes in type hints and ensure compatibility with the new structure.
2025-08-28 23:38:47 +02:00
JSC
03abed6d39 Add comprehensive tests for scheduled task repository, scheduler service, and task handlers
- Implemented tests for ScheduledTaskRepository covering task creation, retrieval, filtering, and status updates.
- Developed tests for SchedulerService including task creation, cancellation, user task retrieval, and maintenance jobs.
- Created tests for TaskHandlerRegistry to validate task execution for various types, including credit recharge and sound playback.
- Ensured proper error handling and edge cases in task execution scenarios.
- Added fixtures and mocks to facilitate isolated testing of services and repositories.
2025-08-28 22:37:43 +02:00
JSC
821093f64f Refactor code structure for improved readability and maintainability
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Failing after 4m35s
2025-08-20 11:37:28 +02:00
JSC
87d6e6ed67 feat: Update API documentation endpoints and enhance application metadata for SBD v2
All checks were successful
Backend CI / lint (push) Successful in 9m22s
Backend CI / test (push) Successful in 3m54s
2025-08-13 13:56:01 +02:00
JSC
bee1076239 refactor: Improve exception handling and logging in authentication and playlist services; enhance code readability and structure
All checks were successful
Backend CI / lint (push) Successful in 9m21s
Backend CI / test (push) Successful in 4m18s
2025-08-13 00:04:55 +02:00
JSC
d1bf2fe0a4 feat: Add scheduler for daily user credits recharge 2025-08-11 00:30:29 +02:00
JSC
9e07ce393f feat: Implement admin user management endpoints and user update schema 2025-08-09 22:37:51 +02:00
JSC
734521c5c3 feat: Add environment configuration files and update settings for production and development
Some checks failed
Backend CI / lint (push) Failing after 5m0s
Backend CI / test (push) Successful in 3m39s
2025-08-09 14:43:20 +02:00
JSC
5fdc7aae85 fix: Lint fixes of last errors in app 2025-08-01 02:08:36 +02:00
JSC
1b0d291ad3 Add comprehensive tests for player API endpoints and player service functionality
- Implemented tests for player API endpoints including play, pause, stop, next, previous, seek, set volume, set mode, reload playlist, and get state.
- Added mock player service for testing API interactions.
- Created tests for player service methods including play, pause, stop playback, next, previous, seek, set volume, set mode, and reload playlist.
- Ensured proper handling of success, error, and edge cases in both API and service tests.
- Verified state management and serialization in player state tests.
2025-07-30 01:22:24 +02:00
JSC
5ed19c8f0f Add comprehensive tests for playlist service and refactor socket service tests
- Introduced a new test suite for the PlaylistService covering various functionalities including creation, retrieval, updating, and deletion of playlists.
- Added tests for handling sounds within playlists, ensuring correct behavior when adding/removing sounds and managing current playlists.
- Refactored socket service tests for improved readability by adjusting function signatures.
- Cleaned up unnecessary whitespace in sound normalizer and sound scanner tests for consistency.
- Enhanced audio utility tests to ensure accurate hash and size calculations, including edge cases for nonexistent files.
- Removed redundant blank lines in cookie utility tests for cleaner code.
2025-07-29 19:25:46 +02:00
JSC
9b5f83eef0 feat: Implement background extraction processor with concurrency control
- Added `ExtractionProcessor` class to handle extraction queue processing in the background.
- Implemented methods for starting, stopping, and queuing extractions with concurrency limits.
- Integrated logging for monitoring the processor's status and actions.
- Created tests for the extraction processor to ensure functionality and error handling.

test: Add unit tests for extraction API endpoints

- Created tests for successful extraction creation, authentication checks, and processor status retrieval.
- Ensured proper responses for authenticated and unauthenticated requests.

test: Implement unit tests for extraction repository

- Added tests for creating, retrieving, and updating extractions in the repository.
- Mocked database interactions to validate repository behavior without actual database access.

test: Add comprehensive tests for extraction service

- Developed tests for extraction creation, service detection, and sound record creation.
- Included tests for handling duplicate extractions and invalid URLs.

test: Add unit tests for extraction background processor

- Created tests for the `ExtractionProcessor` class to validate its behavior under various conditions.
- Ensured proper handling of extraction queuing, processing, and completion callbacks.

fix: Update OAuth service tests to use AsyncMock

- Modified OAuth provider tests to use `AsyncMock` for mocking asynchronous HTTP requests.
2025-07-29 01:06:29 +02:00
JSC
2e87ff9927 Refactor code structure for improved readability and maintainability 2025-07-27 14:24:11 +02:00
JSC
51423779a8 feat: Implement OAuth2 authentication with Google and GitHub
- Added OAuth2 endpoints for Google and GitHub authentication.
- Created OAuth service to handle provider interactions and user info retrieval.
- Implemented user OAuth repository for managing user OAuth links in the database.
- Updated auth service to support linking existing users and creating new users via OAuth.
- Added CORS middleware to allow frontend access.
- Created tests for OAuth endpoints and service functionality.
- Introduced environment configuration for OAuth client IDs and secrets.
- Added logging for OAuth operations and error handling.
2025-07-26 14:38:13 +02:00
JSC
c219aaac1a Add API routing for v1 endpoints and health check functionality 2025-07-25 11:24:03 +02:00
JSC
b6d1ef2a27 Add logging configuration and middleware for improved request tracking 2025-07-25 10:54:30 +02:00
JSC
fefb7f7bf4 Refactor code structure for improved readability and maintainability 2025-07-22 13:21:44 +02:00