Commit Graph

47 Commits

Author SHA1 Message Date
JSC
b66b8e36bb feat: Enhance user metrics retrieval by integrating Extraction model and updating related queries
Some checks failed
Backend CI / lint (push) Failing after 17s
Backend CI / test (push) Failing after 2m32s
2025-10-04 13:45:36 +02:00
JSC
95e166eefb feat: Add endpoint and service method to retrieve top users by various metrics
Some checks failed
Backend CI / lint (push) Failing after 9s
Backend CI / test (push) Failing after 1m36s
2025-09-27 21:52:00 +02:00
JSC
d9697c2dd7 feat: Add TTS statistics endpoint and service method for comprehensive TTS data 2025-09-27 21:37:59 +02:00
JSC
acdf191a5a refactor: Improve code readability and structure across TTS modules
Some checks failed
Backend CI / lint (push) Failing after 10s
Backend CI / test (push) Failing after 1m36s
2025-09-21 19:07:32 +02:00
JSC
d3b6e90262 style: Format code for consistency and readability across TTS modules 2025-09-21 18:05:20 +02:00
JSC
5e8d619736 feat: Implement Text-to-Speech (TTS) functionality with API endpoints, models, and service integration 2025-09-20 23:10:47 +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
7dee6e320e Add tests for extraction API endpoints and enhance existing tests
Some checks failed
Backend CI / lint (push) Successful in 9m25s
Backend CI / test (push) Failing after 4m48s
- Implement tests for admin extraction API endpoints including status retrieval, deletion of extractions, and permission checks.
- Add tests for user extraction deletion, ensuring proper handling of permissions and non-existent extractions.
- Enhance sound endpoint tests to include duplicate handling in responses.
- Refactor favorite service tests to utilize mock dependencies for better maintainability and clarity.
- Update sound scanner tests to improve file handling and ensure proper deletion of associated files.
2025-08-25 21:40:31 +02:00
JSC
16eb789539 feat: Add method to get extractions by status and implement user info retrieval in extraction service
Some checks failed
Backend CI / lint (push) Failing after 4m53s
Backend CI / test (push) Failing after 4m31s
2025-08-24 13:24:48 +02:00
JSC
6b55ff0e81 Refactor user endpoint tests to include pagination and response structure validation
- Updated tests for listing users to validate pagination and response format.
- Changed mock return values to include total count and pagination details.
- Refactored user creation mocks for clarity and consistency.
- Enhanced assertions to check for presence of pagination fields in responses.
- Adjusted test cases for user retrieval and updates to ensure proper handling of user data.
- Improved readability by restructuring mock definitions and assertions across various test files.
2025-08-17 12:36:52 +02:00
JSC
e6f796a3c9 feat: Add pagination, search, and filter functionality to user retrieval endpoint 2025-08-17 11:44:15 +02:00
JSC
99c757a073 feat: Implement pagination for extractions and playlists with total count in responses 2025-08-17 11:21:55 +02:00
JSC
66d22df7dd feat: Add filtering, searching, and sorting to extraction retrieval endpoints 2025-08-17 01:44:43 +02:00
JSC
3326e406f8 feat: Add filtering, searching, and sorting to user extractions retrieval 2025-08-17 01:27:41 +02:00
JSC
f906b6d643 feat: Enhance favorites functionality; add favorites filtering to playlists and sounds, and improve favorite indicators in responses 2025-08-16 21:41:50 +02:00
JSC
78508c84eb feat: Add favorites filtering to sound retrieval; include user-specific favorite sounds in the API response 2025-08-16 21:27:40 +02:00
JSC
a947fd830b feat: Implement favorites management API; add endpoints for adding, removing, and retrieving favorites for sounds and playlists
feat: Create Favorite model and repository for managing user favorites in the database
feat: Add FavoriteService to handle business logic for favorites management
feat: Enhance Playlist and Sound response schemas to include favorite indicators and counts
refactor: Update API routes to include favorites functionality in playlists and sounds
2025-08-16 21:16:02 +02:00
JSC
4cec3b9d18 feat: Enhance timestamp management in BaseModel and PlaylistRepository; add automatic updates and improve code readability
All checks were successful
Backend CI / lint (push) Successful in 9m21s
Backend CI / test (push) Successful in 4m0s
2025-08-16 00:19:53 +02:00
JSC
b691649f7e feat: Implement automatic updated_at timestamp management in BaseModel and update BaseRepository to reflect changes
Some checks failed
Backend CI / lint (push) Failing after 5m0s
Backend CI / test (push) Successful in 3m46s
2025-08-16 00:07:15 +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
f094fbf140 fix: Add missing commas in function calls and improve code formatting
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Successful in 4m19s
2025-08-12 23:37:38 +02:00
JSC
c69a45c9b4 feat: Add endpoint and service method to retrieve top sounds by play count with filtering options
Some checks failed
Backend CI / lint (push) Failing after 4m54s
Backend CI / test (push) Failing after 4m24s
2025-08-11 22:04:42 +02:00
JSC
49ad6c8581 feat: Add dashboard API endpoints and service for sound statistics
Some checks failed
Backend CI / lint (push) Failing after 4m52s
Backend CI / test (push) Failing after 3m42s
2025-08-11 11:16:45 +02:00
JSC
13e0db1fe9 feat: Add position shifting logic for adding sounds to playlists in repository 2025-08-10 21:33:06 +02:00
JSC
357fbcecac feat: Implement search and sorting functionality for playlists in API and repository
Some checks failed
Backend CI / lint (push) Failing after 4m54s
Backend CI / test (push) Failing after 4m25s
2025-08-10 19:30:14 +02:00
JSC
aa9a73ac1d feat: Add search and sorting functionality to sound repository and API
Some checks failed
Backend CI / lint (push) Failing after 4m54s
Backend CI / test (push) Failing after 3m46s
2025-08-10 15:33:15 +02:00
JSC
0a8b50a0be feat: Add user profile management and password change endpoints
Some checks failed
Backend CI / lint (push) Failing after 4m51s
Backend CI / test (push) Successful in 3m38s
2025-08-09 23:43:20 +02:00
JSC
9e07ce393f feat: Implement admin user management endpoints and user update schema 2025-08-09 22:37:51 +02:00
JSC
b4f0f54516 Refactor sound and extraction services to include user and timestamp fields
All checks were successful
Backend CI / lint (push) Successful in 18m8s
Backend CI / test (push) Successful in 53m35s
- Updated ExtractionInfo to include user_id, created_at, and updated_at fields.
- Modified ExtractionService to return user and timestamp information in extraction responses.
- Enhanced sound serialization in PlayerState to include extraction URL if available.
- Adjusted PlaylistRepository to load sound extractions when retrieving playlist sounds.
- Added tests for new fields in extraction and sound endpoints, ensuring proper response structure.
- Created new test file endpoints for sound downloads and thumbnail retrievals, including success and error cases.
- Refactored various test cases for consistency and clarity, ensuring proper mocking and assertions.
2025-08-03 20:54:14 +02:00
JSC
4bbae4c5d4 feat: Add endpoint to retrieve sounds with optional type filtering and implement corresponding repository method
Some checks failed
Backend CI / lint (push) Successful in 9m41s
Backend CI / test (push) Failing after 1m39s
2025-08-01 22:03:09 +02:00
JSC
6068599a47 Refactor test cases for improved readability and consistency
All checks were successful
Backend CI / lint (push) Successful in 9m49s
Backend CI / test (push) Successful in 6m15s
- Adjusted function signatures in various test files to enhance clarity by aligning parameters.
- Updated patching syntax for better readability across test cases.
- Improved formatting and spacing in test assertions and mock setups.
- Ensured consistent use of async/await patterns in async test functions.
- Enhanced comments for better understanding of test intentions.
2025-08-01 20:53:30 +02:00
JSC
d926779fe4 feat: Implement playlist reordering with position swapping and reload player on current playlist changes
Some checks failed
Backend CI / lint (push) Failing after 5m7s
Backend CI / test (push) Successful in 5m14s
2025-08-01 17:49:29 +02:00
JSC
0575d12b0e refactor: Rename global current playlist methods for clarity and consistency 2025-08-01 17:12:56 +02:00
JSC
c0f51b2e23 refactor: Update playlist service and endpoints for global current playlist management 2025-08-01 16:58:25 +02:00
JSC
95ccb76233 fix: Lint fixes of api and repositories
All checks were successful
Backend CI / test (push) Successful in 3m58s
2025-07-31 22:29:11 +02:00
JSC
3405d817d5 refactor: Simplify repository classes by inheriting from BaseRepository and removing redundant methods 2025-07-31 21:32:46 +02:00
JSC
974fb05087 feat: Add unique constraint on sound hash and update related tests 2025-07-30 21:43:27 +02:00
JSC
e43650c26c Add tests for sound repository, user OAuth repository, credit service, and credit decorators
- Implement comprehensive tests for SoundRepository covering CRUD operations and search functionalities.
- Create tests for UserOauthRepository to validate OAuth record management.
- Develop tests for CreditService to ensure proper credit management, including validation, deduction, and addition of credits.
- Add tests for credit-related decorators to verify correct behavior in credit management scenarios.
2025-07-30 21:33:55 +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
0fffce53b4 feat: Implement sound normalization service and API endpoints
- Added SoundNormalizerService for normalizing audio files with support for one-pass and two-pass normalization methods.
- Introduced API endpoints for normalizing all sounds and specific sounds by ID, including support for force normalization and handling of already normalized sounds.
- Created comprehensive test suite for the sound normalizer service and its API endpoints, covering various scenarios including success, errors, and edge cases.
- Refactored sound scanning service to utilize SHA-256 for file hashing instead of MD5 for improved security.
- Enhanced logging and error handling throughout the sound normalization process.
2025-07-28 09:18:18 +02:00
JSC
36949a1f1c feat: add SoundRepository and SoundScannerService for audio file management
- Implemented SoundRepository for database operations related to sounds, including methods for retrieving, creating, updating, and deleting sound records.
- Developed SoundScannerService to scan directories for audio files, calculate their metadata, and synchronize with the database.
- Added support for various audio file formats and integrated ffmpeg for audio duration extraction.
- Created comprehensive tests for sound API endpoints and sound scanner service to ensure functionality and error handling.
- Updated dependencies to include ffmpeg-python for audio processing.
2025-07-27 23:34:17 +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
e456d34897 Add tests for authentication and utilities, and update dependencies
- Created a new test package for services and added tests for AuthService.
- Implemented tests for user registration, login, and token creation.
- Added a new test package for utilities and included tests for password and JWT utilities.
- Updated `uv.lock` to include new dependencies: bcrypt, email-validator, pyjwt, and pytest-asyncio.
2025-07-25 17:48:43 +02:00
JSC
fefb7f7bf4 Refactor code structure for improved readability and maintainability 2025-07-22 13:21:44 +02:00