{"id":29165228,"url":"https://github.com/digitalfabrik/opendrift-leeway-webgui","last_synced_at":"2025-10-24T10:56:40.339Z","repository":{"id":64450140,"uuid":"574436581","full_name":"digitalfabrik/opendrift-leeway-webgui","owner":"digitalfabrik","description":"OpenDrift Leeway simulations for Search and Rescue operations (experimental!)","archived":false,"fork":false,"pushed_at":"2025-10-04T10:58:57.000Z","size":1421,"stargazers_count":13,"open_issues_count":17,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-23T10:51:43.573Z","etag":null,"topics":["celery","django","leeway","opendrift","python","python3","sar","search-and-rescue","simulations"],"latest_commit_sha":null,"homepage":"https://leeway.tuerantuer.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digitalfabrik.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-05T10:04:12.000Z","updated_at":"2025-08-30T15:31:32.000Z","dependencies_parsed_at":"2024-01-04T18:27:56.359Z","dependency_job_id":"4c9a45bc-c274-4a9d-a5d1-8dbd5a7ade5d","html_url":"https://github.com/digitalfabrik/opendrift-leeway-webgui","commit_stats":{"total_commits":99,"total_committers":6,"mean_commits":16.5,"dds":"0.46464646464646464","last_synced_commit":"297e24726463ec27cc309b9de9dc1b0a18a7b94f"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/digitalfabrik/opendrift-leeway-webgui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfabrik%2Fopendrift-leeway-webgui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfabrik%2Fopendrift-leeway-webgui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfabrik%2Fopendrift-leeway-webgui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfabrik%2Fopendrift-leeway-webgui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digitalfabrik","download_url":"https://codeload.github.com/digitalfabrik/opendrift-leeway-webgui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digitalfabrik%2Fopendrift-leeway-webgui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280783881,"owners_count":26390280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-24T02:00:06.418Z","response_time":73,"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":["celery","django","leeway","opendrift","python","python3","sar","search-and-rescue","simulations"],"created_at":"2025-07-01T07:10:49.557Z","updated_at":"2025-10-24T10:56:40.310Z","avatar_url":"https://github.com/digitalfabrik.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GitHub Workflow Status](https://github.com/digitalfabrik/opendrift-leeway-webgui/workflows/Tests/badge.svg)](https://github.com/digitalfabrik/opendrift-leeway-webgui/actions?query=workflow%3ATests)\n[![Pylint](https://img.shields.io/badge/pylint-10.00-brightgreen)](https://www.pylint.org/)\n[![PyPi](https://img.shields.io/pypi/v/opendrift-leeway-webgui.svg)](https://pypi.org/project/opendrift-leeway-webgui/)\n[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n# About\n\nThis is a little Django web application that does an [OpenDrift](https://github.com/OpenDrift/opendrift) [Leeway](https://opendrift.github.io/choosing_a_model.html) simulation with a set of provided parameters via a web form. The result is sent to a user via e-mail.\n\nThis is an experimental tool to help Search and Rescue operations. An experimental service is available at [leeway.tuerantuer.org](https://leeway.tuerantuer.org).\n\nSample output from the leeway tool (100 points, 1km radius, south of Lampedusa):\n\n![Example leeway output](./.github/leeway-simulation-output.png)\n\n# Usage\n\nDjango users have to be created in the CRUD backend, available at https://leeway.example.com/admin. E-mail addresses should be added for users as they receive the result via e-mail.\n\nThe program regularly fetches incoming mails via IMAP and starts simulations from key-value-pairs in the mail subject or text body. The sender of the mail needs to have an associated account. Allowed keys via e-mail are: `longitude`, `latitude`, `object_type`, `radius`, `duration`, `start_time`. The separator between key and value is `=`. Key-value-pairs are separated by `;` in the subject and by new lines in the text body. The date format for start date is `YYYY-MM-DD HH:MM:SS`.\n\n# API usage\n\nAPI documentation can be found at: https://leeway.tuerantuer.org/api/docs/\n\nAuthentication can be provided in two ways:\n1. Via your session cookie, obtained from the normal login\n2. Via an authentication token, can be obtained via [/api/auth/login/](https://leeway.tuerantuer.org/api/v1/docs/#/auth/auth_login_create)\n\n# Installation\n\n**Prerequisite:** _Python 3.8 or later is required._\n\n1. Clone this repository and change into the new directory:\n   ```bash\n   git clone git@github.com:digitalfabrik/opendrift-leeway-webgui.git leeway\n   cd leeway\n   ```\n2. Create a virtual environment outside of the project directory and activate it:\n   ```bash\n   python3 -m venv ~/.venv\n   source ~/.venv/bin/activate\n   ```\n3. Install the dependencies:\n   ```bash\n   pip install -e .[dev]\n   ```\n4. Create minimal config file `/etc/opendrift-leeway-webgui.ini` to enable `DEBUG` mode:\n   ```dosini\n   [base]\n   DEBUG = True\n   ```\n5. Initialize the database:\n   ```bash\n   cd opendrift_leeway_webgui\n   python3 manage.py migrate\n   python3 manage.py createsuperuser\n   ```\n6. Build the enhanced Docker container:\n   ```bash\n   cd opendrift\n   docker build -t opendrift-leeway-custom .\n   ```\n\n# Development Server\n\n1. Switch into the cloned project and then into the `opendrift_leeway_webgui` subdirectory.\n2. Open two terminals:\n   1. In the first terminal run:\n      ```bash\n      source ../.venv/bin/activate\n      python3 manage.py runserver\n      ```\n   2. In the second terminal run:\n      ```bash\n      source ../.venv/bin/activate\n      celery -A leeway worker -l INFO\n      ```\n\n\n# Releasing\n\nRun `bumpver update` to perform the following tasks with one command:\n\n1. Bump the version in `pyproject.toml`\n2. Create a version bump commit\n3. Create a new version tag\n4. Push the commit and tag\n5. Create a new release on PyPI via GitHub Actions\n\n\n# Production Server\n\nThis details the installation on Debian with Apache2 and mod_wsgi.\n\n1. Create target directory on the production system:\n   ```bash\n   sudo mkdir /opt/iopendrift-leeway-webgui\n   sudo chown www-data:www-data /opt/opendrift-leeway-webgui\n   ```\n2. Create the virtual environment:\n   ```bash\n   sudo -u www-data bash\n   python3 -m venv .venv\n   source .venv/bin/activate\n   ```\n3. Install the application into the virtual environment:\n   ```bash\n   pip install opendrift-leeway-webgui\n   ```\n4. Copy the example config file to `/etc/opendrift-leeway-webgui.ini` and fill in the template\n5. Install Docker and add the `docker` group to the `www-data` user.\n6. Create symlink to facilitate the Apache configuration:\n   ```bash\n   ln -s $(python -c \"from opendrift_leeway_webgui.core import wsgi; print(wsgi.__file__)\") .\n   ```\n7. Configure Apache2 according to the example.\n8. Set up Celery worker with `leeway-celery.service` and start the service.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalfabrik%2Fopendrift-leeway-webgui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigitalfabrik%2Fopendrift-leeway-webgui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigitalfabrik%2Fopendrift-leeway-webgui/lists"}