- Python 76%
- Vue 20.6%
- JavaScript 2.5%
- TypeScript 0.6%
- PowerShell 0.1%
|
João Vitória Silva
a0ba9e3743
refactor(tests): remove import path hacks ( #654 )
## What does this PR do? Refactors backend test imports to remove `sys.path` and `sys.modules` hacks used around app imports. This PR adds pytest-managed app import resolution via `pythonpath = ["app"]`, moves test environment bootstrapping into a root `backend/conftest.py`, and cleans up GPX/TCX tests so they use normal top-level imports without `ruff` E402 suppressions. ## Feature freeze note This is a refactor/code quality improvement and does not introduce a user-facing feature. ## Related issue Closes #641 ## Type of change - [ ] Bug fix - [ ] New feature (exception during freeze; link prior discussion/acknowledgment) - [ ] Documentation - [x] Refactor / code quality - [ ] Translation - [ ] Other (describe below) ## Checklist - [x] This PR is focused on a single concern - [x] An issue was opened and acknowledged before writing this code (if not a small fix) - [ ] If this PR introduces a new feature during freeze, it was discussed and explicitly acknowledged first - [x] The PR is under ~300 lines changed, excluding lock files, migrations, and generated code - [x] Tests have been added or updated where applicable - [ ] Documentation has been updated where applicable - [ ] Commit messages follow Conventional Commits format ## Notes for the reviewer Validation run: - `python -m ruff check conftest.py tests/conftest.py tests/activities/activity_file_import/test_utils_gpx.py tests/activities/activity_file_import/test_utils_tcx.py` - `python -m pytest tests/activities/activity_file_import/test_utils_gpx.py tests/activities/activity_file_import/test_utils_tcx.py -q -p no:cacheprovider --no-cov` Both passed. The new root `backend/conftest.py` is needed because app modules read settings such as `SECRET_KEY` at import time, so `.env.test` must be loaded before `tests/conftest.py` imports application packages. Reviewed-on: endurain-project/endurain#654 |
||
|---|---|---|
| .forgejo | ||
| .github | ||
| aux_scripts | ||
| backend | refactor(tests): remove import path hacks ( #654 ) | |
| docker | ||
| docker_forgejo_runner | ||
| docs | feat: add secret generation tools and update documentation for key generation | |
| frontend/app | chore: dependency bump | |
| .dockerignore | ||
| .env.example | ||
| .gitignore | feat: add secret generation tools and update documentation for key generation | |
| CODE_OF_CONDUCT.md | ||
| CONTRIBUTING.md | ||
| docker-compose.yml-multiple-backends.example | ||
| docker-compose.yml.example | ||
| docker-compose.yml.secrets.example | ||
| LICENSE | ||
| mkdocs.yml | feat: add secret generation tools and update documentation for key generation | |
| README.md | ||
| renovate.json | ||
| ROADMAP.md | ||
| screenshot_01.png | ||
| SECURITY.md | ||
| TRADEMARK.md | ||
Note
GitHub Mirror - If you are viewing this on GitHub, please be aware that this repository is a read-only mirror. Issues, pull requests, and all project activity are tracked on Codeberg: https://codeberg.org/endurain-project/endurain
Note
Endurain is on a temporary feature freeze - The project is not paused. The focus is shifting from new features to strengthening the foundations. More details here
Endurain
Translation status License Release Stars Trademark Policy
A self-hosted fitness tracking service
Visit Endurain's Mastodon profile and Discord server.
🚀 Try the Demo
Experience Endurain without installation:
Demo URL: https://demo.endurain.com
- Username:
admin - Password:
admin - Reset Schedule: Daily at midnight (Europe/Lisbon timezone)
⚠️ Note: The demo environment resets every day. Do not store important data.
Table of Contents
- Endurain documentation
- What is Endurain?
- Endurain screenshots
- Sponsors
- Contributing
- Help Translate
- License
What is Endurain?
Endurain is a self-hosted fitness tracking service designed to give users full control over their data and hosting environment. It's similar to Strava but focused on privacy and customization. Built with:
- Frontend: Vue.js, Notivue and Bootstrap CSS
- Backend: Python FastAPI, Alembic, SQLAlchemy, Apprise, stravalib and python-garminconnect for Strava and Garmin Connect integration, gpxpy, tcxreader and fitdecode for .gpx, .tcx and .fit file import respectively
- Database: PostgreSQL for efficient data management
- Observability: Jaeger for basic tracing and monitoring
- Integrations: Supports Strava and Garmin Connect. Manual upload of activities using .gpx, .tcx and .fit files are also supported
To deploy Endurain, a Docker image is available, and a comprehensive example can be found in the "docker-compose.yml.example" file provided. Configuration is facilitated through environment variables, ensuring flexibility and ease of customization.
For more information please see the Endurain's documentation.
Sponsors
A huge thank you to the project sponsors! Your support helps keep this project going.
Support Endurain's development on:
Contributing
Contributions are welcomed! Please open an issue to discuss any changes or improvements before submitting a PR. Check out the Contributing Guidelines for more details.
Help Translate
Endurain has multi-language support, and you can help translate it into more languages via Codeberg Translate.
License
This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.
Trademark Notice
Endurain® is a trademark of João Vitória Silva.
You are welcome to self-host Endurain and use the name and logo, including for personal, educational, research, or community (non-commercial) use.
Commercial use of the Endurain name or logos (such as offering paid hosting, products, or services) is not permitted without prior written permission.
See TRADEMARK.md for full details.