{"id":35415895,"url":"https://github.com/runwaterloo/racedb","last_synced_at":"2026-04-10T03:16:01.489Z","repository":{"id":300433957,"uuid":"1006126980","full_name":"runwaterloo/racedb","owner":"runwaterloo","description":"Results website for Run Waterloo","archived":false,"fork":false,"pushed_at":"2026-02-27T21:11:01.000Z","size":3813,"stargazers_count":2,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-28T02:27:34.084Z","etag":null,"topics":["bootstrap","django","font-awesome","python","running"],"latest_commit_sha":null,"homepage":"https://results.runwaterloo.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/runwaterloo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-21T14:55:33.000Z","updated_at":"2026-02-27T21:10:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"373e09d7-2611-43af-a3bd-eccf3ba9e08c","html_url":"https://github.com/runwaterloo/racedb","commit_stats":null,"previous_names":["runwaterloo/racedb"],"tags_count":111,"template":false,"template_full_name":null,"purl":"pkg:github/runwaterloo/racedb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwaterloo%2Fracedb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwaterloo%2Fracedb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwaterloo%2Fracedb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwaterloo%2Fracedb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/runwaterloo","download_url":"https://codeload.github.com/runwaterloo/racedb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/runwaterloo%2Fracedb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30322644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T01:36:58.598Z","status":"online","status_checked_at":"2026-03-10T02:00:06.579Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bootstrap","django","font-awesome","python","running"],"created_at":"2026-01-02T15:22:07.787Z","updated_at":"2026-03-10T02:29:07.325Z","avatar_url":"https://github.com/runwaterloo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Python](https://img.shields.io/badge/python-3.13+-blue?logo=python\u0026logoColor=white)\n[![Code style: ruff](https://img.shields.io/badge/code%20style-ruff-blueviolet)](https://docs.astral.sh/ruff/)\n[![Template style: djlint](https://img.shields.io/badge/template%20style-djlint-yellowgreen)](https://djlint.com/)\n[![Unit Tests](https://github.com/runwaterloo/racedb/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/runwaterloo/racedb/actions/workflows/unit-tests.yml)\n[![codecov](https://codecov.io/github/runwaterloo/racedb/graph/badge.svg?token=4NK7NXXBAP)](https://codecov.io/github/runwaterloo/racedb)\n# RaceDB\n\n## Getting started on Codespaces\n\nThe fastest way to get started is with GitHub Codespaces.\n\n1. Click the green \"Code\" button on GitHub, click Codespaces, Create codespace on main\n2. **Don't touch anything** until the terminal says \"Finsihed configuring codespace. Press any key to exit.\", it will take a while\n3. Press any key to get to a prompt, then type `./deploy/local/start.sh`\n4. Wait a few minutes for the build to complete, you'll see \"STARTUP COMPLETE!\"\n6. Click on PORTS, 8000, 🌐 (Open in Browser)\n\nYou now have your own development version of RaceDB running, you can edit code and it will be reflected on your site.\n\nIf you need to rebuild the environment run `./deploy/local/start.sh --rebuild` in the terminal\n\n### Codespaces tips \u0026 reminders\n\n- **Push your changes:** Always push your branches and commits to GitHub before stopping or deleting a Codespace. Unsaved work will be lost when a Codespace is deleted.\n- **Close unused Codespaces:** Delete or stop Codespaces you are no longer using to free up resources and avoid hitting your usage quota.\n- **Check your usage:** You can view your Codespaces usage and manage active environments at [github.com/codespaces](https://github.com/codespaces) or via the \"Codespaces\" tab on your GitHub profile.\n\n---\n\n## Getting started locally\n\nThese instructions are based on Docker Desktop in WSL/Ubuntu. Adapt as needed.\n\n### Clone the repo\n   ```bash\n   git clone git@gitlab.com:sl70176/racedb.git;\n   cd racedb\n   ```\n\n### Copy sample secrets\n```bash\ncp racedb/secrets.py.sample racedb/secrets.py\n```\n\n###  Setup virtual environmenet\n```bash\npython3 -m venv .venv;\nsource .venv/bin/activate;\npip install -r requirements/requirements-dev.txt\n```\n\n### Setup pre-commit hooks\n```bash\npre-commit install\n```\n\n### Start application\n```\n./deploy/local/start.sh\n```\nYou can add a --rebuild option to rebuild from scatch if needed\n\n### Access application\n\n- Racedb: http://localhost:8000/\n- Admin interface: http://localhost:8000/admin (admin/admin)\n\n\n### Run tests\n```bash\npytest\n```\n\n### Run tests inside container\nThis is closer to production, but slower. It uses a running PostgreSQL database instead of the\nin memory SQLite that is normally used for tests.\n```bash\ndocker exec racedb-web pytest\n```\n### Import a database\n```bash\ndeploy/local/importdb.sh $DUMP_FILE_PATH\n```\n\n## Developer Info\n\n### GitHub Actions\n\nThere are different workflows that may execute depending on the situation.\n\n**Unit Tests**:\n\n- always\n\n**Main Pipline**:\n\n- main branch only\n- includes Unit Tests\n- also build image, tags image, tags commit, creates GitHub release\n- can be skipped with `[skip build]` in commit message\n\n**Build and Push Docker Image**\n\n- pushes an image without creating a release, useful for pushing to dev\n- must be [triggered manually](https://github.com/runwaterloo/racedb/actions/workflows/docker-build-push.yml)\n\n**Integration Tests**:\n\n- any commit where Dockefile or requirements/* have changed\n- can be [triggered manually](https://github.com/runwaterloo/racedb/actions/workflows/integration-tests.yml)\n\n## Configurable Options\nThe following options can be configured in Configs in the Django admin site.\n\n**email_from_address**: Address that emails will be sent from.\n\n**email_to_address**: Address that emails will be sent to.\n\n**endurrun_same_name**: Configure an ENDURrun athlete to be recognized by multiple names. There can be multiple entries called `endurrun_same_name` in config, but there should only be ONE per human, order doesn't matter. The value should contain a semi-colon separated list of names. e.g.:\n\n```\nendurrun_same_name: Sam Lalonde;Jordan Schmidt\nendurrun_same_name: Bob Smith;Bobby Smith;Robert Smith\n```\n\n**endurrun_stats_min_finishes**: Minimum number of finishes to be included in the ENDURrun finishers section of the ENDURrun Stats view (`/endurrun/stats/`)\n\n**featured_member_id_next**: Member ID to be used next time `update_featured_member_id()` is executed. This will only work for active members with a profile photo. Once used this option will be unset.\n\n**featured_member_tag**: Restrict featured member to ones with this tag.\n\n**homepage_upcoming_exclude_events**: Comma-separated list of events to exclude from homepage Upcoming Events if they would have appeared.\n\n## REST API\n\nThe REST API provides programmatic access to results. The API is available at:\n\n[https://api.runwaterloo.com/v1/](https://api.runwaterloo.com/v1/)\n\n### Authentication\n\nAll API endpoints require authentication. If you access the API in a browser and are not authenticated, the response will include a `login_url` field to direct you to the login page. For programmatic access, you must include your authentication token in the `Authorization` header:\n\n```\nAuthorization: Token \u003cyour_token\u003e\n```\n\nHit someone up for an account and API token if needed.\n\n### Events Endpoint\n\nThe main entry point is the events endpoint:\n\n    GET /v1/events/\n\nReturns a list of events, sorted by date (most recent first). Each event includes denormalized fields for easy frontend use, and a link to the results for that event.\n\n##### Filtering Events\n\nYou can filter events using the following query parameters:\n\n- `year`: Filter by event year (e.g., `?year=2024`)\n- `race_slug`: Filter by race slug (e.g., `?race_slug=endurrun`)\n- `distance_slug`: Filter by distance slug (e.g., `?distance_slug=marathon`)\n- `results_exist`: Filter by whether results exist for the event (`true` or `false`)\n\nYou can combine filters as needed. Example:\n\n```\nGET /v1/events/?year=2024\u0026race_slug=endurrun\u0026results_exist=true\n```\n\n#### Results Link\n\nEach event includes a `results_url` field. You can use this to fetch results for that event:\n\n```\nGET /v1/events/\u003cevent_id\u003e/results/\n```\n### Pagination\n\nResponses from all endpointsare paginated with a page size of 50 items. Each response includes `count`, `next`, and `previous` fields:\n\n- `count`: Total number of items matching your query.\n- `next`: URL to fetch the next page of results (or `null` if there are no more pages).\n- `previous`: URL to fetch the previous page (or `null` if you are on the first page).\n\n\n### Notes\n\n- The API is evolving. Some endpoints (e.g., teams, splits) are not yet available.\n- All date and time fields are in ISO 8601 format (UTC).\n- If you have questions or need additional endpoints, please contact the maintainers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunwaterloo%2Fracedb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frunwaterloo%2Fracedb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frunwaterloo%2Fracedb/lists"}