Releases: track-train/back
Releases Β· track-train/back
π§ Release 0.9.1-pre-prod
Changelog
[Task] - API Endpoints Enhancement
π Task Added
Addition of Two New API Endpoints
- Daily Checkup Retrieval Endpoint
- Purpose: Allows retrieval of the daily checkup data for a targeted user.
- Access Control: Restricted to users with Admin or Coach roles only.
- Description: This endpoint enables authorized personnel to obtain detailed daily checkup information for any specified user, supporting enhanced monitoring and personalized coaching.
- Single Diet Retrieval Endpoint
- Purpose: Enables fetching the details of a single diet entry.
- Description: Provides an endpoint to retrieve all information related to a specific diet, improving data access and management for diet-related features.
Tags
- Version:
0.9.1-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.9.1-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#fix daily checkup #52 - Version Type: Bug Fixes
- Source branch:
Fix/daily-checkup-#52 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
β¨ Release 0.9.0-pre-prod
Changelog
[Feature] - Notification
Added
- Daily Notification Feature:
Implemented a new system to send daily notifications to users. The feature is designed to encourage users to complete their daily checkup and provide feedback to their coach. - Scheduled Task:
Added a background scheduled job (using APScheduler) that runs every day at 00:00 (midnight).
This task automatically creates a new daily notification for each user profile in the system.
The scheduler is started as part of the FastAPI app startup event to ensure it runs in the correct event loop. - New Notification Endpoints:
POST /notifications/create-daily
Allows an admin to manually trigger the creation of daily notifications for all users.
Useful for testing or manual re-triggering by administrators.GET /notifications/me
Retrieves all notifications for the currently authenticated user.POST /notifications/{notification_id}/read
Marks a specific notification as read by the user.
Changed
- Refactored the notification service and repository layer to support batch creation of notifications.
- Improved database session management to ensure safe usage in both request/response cycles and background jobs.
Technical Notes
- The scheduler uses APScheduler's AsyncIOScheduler and is launched within FastAPI's
startupevent. - When the scheduled job runs, it opens a dedicated async database session and creates notifications for all profiles.
- The background job and the manual admin endpoint both use the same service logic for consistency.
Example:
- Every day at 00:00, all users receive a new notification titled "Daily Checkup" prompting them to fill out their daily feedback.
- Admins can use the new endpoint to manually generate these notifications if needed.
Tags
- Version:
0.9.0-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.9.0-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#feat notification #43 - Version Type: New Features
- Source branch:
Feat/notification-#43 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
β¨ Release 0.8.0-pre-prod
Changelog
[Feature] - Daily Checkup
Added
- Daily Checkup module:
- Domain layer: Added models and ports for daily checkup.
- SQL adapter: Implemented
SqlAlchemyDailyCheckupRepositoryfor persistent storage. - In-memory adapter: Implemented
InMemoryDailyCheckupRepositoryfor testing and development. - Routers:
GET /daily-checkups/β Retrieve all daily checkups for the current user.GET /daily-checkups/todayβ Retrieve today's daily checkup for the current user.POST /daily-checkups/β Create a new daily checkup, including multiple image uploads.DELETE /daily-checkups/{id}β Delete a daily checkup by ID.
Changed
- Minio adapter:
- Refactored to support multiple buckets (profile pictures, users/daily checkups, etc.) with dedicated factory methods.
Refactored
- Updated the dependency injection container for better modularity and to wire up the new daily checkup module and storage adapters.
- General codebase optimization related to the new feature integration.
Tags
- Version:
0.8.0-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.8.0-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#feat daily checkup #41 - Version Type: New Features
- Source branch:
Feat/daily-checkup-#41 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
β¨ Release 0.7.0-pre-prod
Changelog
[Feature] - Minio
Added
- MinIO Feature: Introduced MinIO integration to store user images.
- MinIO Adapter: Created a new adapter to interact with MinIO for image storage and retrieval.
- InMemory Adapter Update: Enhanced the in-memory adapter to simulate MinIO behavior for testing and development purposes.
- Database Changes:
- Updated tables to store image links (pointing to MinIO) for user profiles.
- Created the
daylichekuptable in the database in preparation for a future feature.
API Endpoints
- PATCH Endpoints:
PATCH /profile/photo: Update the user's profile photo.PATCH /profile/background-photo: Update the user's profile background photo.
- DELETE Endpoints:
DELETE /profile/photo: Delete the user's profile photo.DELETE /profile/background-photo: Delete the user's profile background photo.
Tags
- Version:
0.7.0-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.7.0-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#feat minio #18 - Version Type: New Features
- Source branch:
feat/minio-#18 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
β¨ Release 0.6.0-pre-prod
Changelog
π Features
- Full unit test coverage for domain layer:
ProfileService: unit tests for profile creation, update, deletion, login, roles, email, password management, and error handling.GroupService: unit tests for group creation, deletion, member management (add/remove), group/member listing, and coach listing.ExerciseService: unit tests for exercise creation, deletion, update, owner and global listing, and error handling.TrainingService: unit tests for training creation, deletion, update, task management (create/update/delete/list), validation management, and all relevant error cases.DietService: unit tests for diet creation, update, deletion, listing, macro plan and meal plan CRUD, as well as robust error and input handling.- BcryptPasswordHasher: comprehensive tests for password hashing and verification, including edge cases, invalid hashes, special/unicode characters, and long passwords.
- New CI/CD GitHub Actions pipeline:
- Split jobs for clarity and speed:
unit-tests: runs all domain and lib unit tests with coverage reporting.integration-tests: runs all API integration tests (with Uvicorn server startup).
- Explicit job naming for easier understanding and log analysis.
- Separate pip cache keys for each test type to optimize build speed.
- Summary step at the end of each job for quick feedback.
- Integration tests only run if unit tests pass (job dependency).
- Split jobs for clarity and speed:
π οΈ Files Added/Modified
src/domain/tests/test_profile_service.pysrc/domain/tests/test_group_service.pysrc/domain/tests/test_exercise_service.pysrc/domain/tests/test_training_service.pysrc/domain/tests/test_diet_service.pysrc/domain/tests/test_bcrypt_password_hasher.py.github/workflows/tests.yml(refactored CI/CD pipeline)
π§ͺ Test/CI Coverage
- Strict verification of all business logic and error cases
- Robustness against integration errors (hashing, mocks, dependencies, API)
- Security coverage for sensitive operations (password hashing/verification)
- Automated unit and integration tests on every Pull Request
Check GitHub Actions logs for detailed test outcomes and coverage reports!
Tags
- Version:
0.6.0-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.6.0-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#feat unitary testing #47 - Version Type: New Features
- Source branch:
feat/unitary-testing#47 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
π§ Release 0.5.9-pre-prod
Changelog
fix the code error 400 to 409 who is more apropriate for this error
Tags
- Version:
0.5.9-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.5.9-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#fix error code 400 to 409 for a conflict - Version Type: Bug Fixes
- Source branch:
fix/#31 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
π§ Release 0.5.8-pre-prod
Changelog
Changes Made
Async Conversion Only
- Converted all router functions to async - Changed
deftoasync deffor all endpoint functions - Added await to service calls - Added
awaitkeywords to all service method calls - Preserved all dependencies exactly - No changes to authentication, authorization, or role-based access controls
- Maintained container pattern - Routers continue using
container.get_*_service()as originally designed
What Was NOT Changed
- No dependency modifications - All
dependencies=[Depends(...)]declarations remain identical - No auth pattern changes - Authentication and authorization logic preserved exactly
- No security endpoint modifications - Role access controls remain unchanged
- No architectural changes - Container injection pattern maintained as-is
Technical Details
The conversion involved only:
- Function signature changes:
def function_name()βasync def function_name() - Service call changes:
service.method()βawait service.method() - Repository call changes:
service._repo.method()βawait service._repo.method()
All dependency parameters, authentication requirements, and authorization patterns remain exactly as they were before the async conversion.
Example
Before:
@router.get("", dependencies=[Depends(get_current_user)])
def get_exercises(user=Depends(get_current_user)):
service = container.get_exercise_service()
exercises = service.get_all_exercises()
return [ExerciseRead.model_validate(e) for e in exercises]After:
@router.get("", dependencies=[Depends(get_current_user)])
async def get_exercises(user=Depends(get_current_user)):
service = container.get_exercise_service()
exercises = await service.get_all_exercises()
return [ExerciseRead.model_validate(e) for e in exercises]Tags
- Version:
0.5.8-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.5.8-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#fix Fix/session asynchrone #28 - Version Type: Bug Fixes
- Source branch:
fix/session-asynchrone-#28 - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
π§ Release 0.5.7-pre-prod
Changelog
π Track&Train Backend
A modern, modular, and testable backend for fitness & coaching platforms, built with Python, FastAPI, and a full Hexagonal Architecture.
β¨ Features
- π§βπΌ User & Coach Management: Register, login, promote users to coaches, manage roles
- ποΈ Group Management: Create, update, delete, join/leave groups, add/remove members
- π Training & Exercise: CRUD for trainings and exercises
- π½οΈ Diet: CRUD for diets
- π JWT Auth: Secure endpoints with role-based access
- π§© Hexagonal Architecture: Clean separation of concerns, easy to test and extend
- π§ͺ Comprehensive Tests: All business logic tested with in-memory adapters
- π Hot Reload: Fast development with Docker volume binding
Tags
- Version:
0.5.7-pre-prod
Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.5.7-pre-prod
# Pull latest pre-release
docker pull ghcr.io/track-train/api:pre-releaseInformation
- PR Title:
#fix update for info - Version Type: Bug Fixes
- Source branch:
info/release-info - Target branch:
develop - Release type: Pre-production
- PR author: @Baptiste-Ferrand
Release 0.5.6-pre-prod
π Changelog
- Updated the Readme file with more details on the project architecture, how to install and run the project, and what the project does
- Added an image for the project architecture for better readability
π·οΈ Tags
- Version:
0.5.6-pre-prod
π¦ Docker Package
# Pull specific version
docker pull ghcr.io/track-train/api:0.5.6-pre-prodβΉοΈ Information
- Source branch:
fix/refacto-readme - Target branch:
develop - Release type: Pre-production π§ͺ
- PR author: @Baptiste-Ferrand