{"id":326330,"name":"Galv backend","description":"An open-source platform for automated storage of battery data with advanced metadata support for battery scientists.","url":"https://github.com/galv-team/galv-backend","last_synced_at":"2026-04-14T18:30:18.916Z","repository":{"id":212080506,"uuid":"728300690","full_name":"galv-team/galv-backend","owner":"galv-team","description":"Django Rest Framework powered REST API for Galv data.","archived":false,"fork":false,"pushed_at":"2026-03-30T19:57:55.000Z","size":3636,"stargazers_count":6,"open_issues_count":10,"forks_count":1,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2026-04-03T01:06:00.144Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://galv-team.github.io/galv-backend/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/galv-team.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-12-06T16:44:14.000Z","updated_at":"2025-10-08T19:56:55.000Z","dependencies_parsed_at":"2026-03-25T09:01:29.009Z","dependency_job_id":null,"html_url":"https://github.com/galv-team/galv-backend","commit_stats":null,"previous_names":["battery-intelligence-lab/galv-backend","galv-team/galv-backend"],"tags_count":146,"template":false,"template_full_name":null,"purl":"pkg:github/galv-team/galv-backend","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galv-team","download_url":"https://codeload.github.com/galv-team/galv-backend/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31687881,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-11T13:07:20.380Z","status":"ssl_error","status_checked_at":"2026-04-11T13:06:47.903Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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"}},"owner":{"login":"galv-team","name":"Galv","uuid":"170310506","kind":"organization","description":"Battery experiment data management platform.","email":null,"website":null,"location":"United Kingdom","twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/170310506?v=4","repositories_count":1,"last_synced_at":"2024-05-20T10:37:51.818Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/galv-team","funding_links":[],"total_stars":4,"followers":0,"following":0,"created_at":"2024-05-20T10:37:51.826Z","updated_at":"2024-05-20T10:37:51.826Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galv-team","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/galv-team/repositories"},"packages":[],"commits":{"id":11481550,"full_name":"galv-team/galv-backend","default_branch":"master","total_commits":294,"total_committers":3,"total_bot_commits":7,"total_bot_committers":2,"mean_commits":98.0,"dds":0.023809523809523836,"past_year_total_commits":44,"past_year_total_committers":2,"past_year_total_bot_commits":1,"past_year_total_bot_committers":1,"past_year_mean_commits":22.0,"past_year_dds":0.022727272727272707,"last_synced_at":"2026-04-11T17:01:28.614Z","last_synced_commit":"a808ae3d606c3e62bc8a5fd14404bd65aeb72339","created_at":"2025-10-10T00:02:50.312Z","updated_at":"2026-04-11T17:01:21.869Z","committers":[{"name":"Matt Jaquiery","email":"matt.jaquiery@dtc.ox.ac.uk","login":"mjaquiery","count":287},{"name":"dependabot[bot]","email":"49699333+dependabot[bot]","login":"dependabot[bot]","count":4},{"name":"pre-commit-ci[bot]","email":"66853113+pre-commit-ci[bot]","login":"pre-commit-ci[bot]","count":3}],"past_year_committers":[{"name":"Matt Jaquiery","email":"matt.jaquiery@dtc.ox.ac.uk","login":"mjaquiery","count":43},{"name":"pre-commit-ci[bot]","email":"66853113+pre-commit-ci[bot]","login":"pre-commit-ci[bot]","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-13T00:00:06.408Z","repositories_count":6212945,"commits_count":903831244,"contributors_count":34932484,"owners_count":1144091,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"galv-team/galv-backend","html_url":"https://github.com/galv-team/galv-backend","last_synced_at":"2026-04-07T15:00:45.212Z","status":"active","issues_count":3,"pull_requests_count":34,"avg_time_to_close_issue":13126314.5,"avg_time_to_close_pull_request":462073.23076923075,"issues_closed_count":2,"pull_requests_closed_count":26,"pull_request_authors_count":3,"issue_authors_count":1,"avg_comments_per_issue":0.3333333333333333,"avg_comments_per_pull_request":0.0,"merged_pull_requests_count":26,"bot_issues_count":0,"bot_pull_requests_count":9,"past_year_issues_count":0,"past_year_pull_requests_count":5,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":669526.6666666666,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":3,"past_year_pull_request_authors_count":2,"past_year_issue_authors_count":0,"past_year_avg_comments_per_issue":null,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":1,"past_year_merged_pull_requests_count":3,"created_at":"2025-08-29T17:02:45.767Z","updated_at":"2026-04-07T15:00:45.213Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/galv-team%2Fgalv-backend/issues","issue_labels_count":{"enhancement":2,"bug":1,"frontend":1},"pull_request_labels_count":{"dependencies":5,"codex":1},"issue_author_associations_count":{"COLLABORATOR":3},"pull_request_author_associations_count":{"COLLABORATOR":25,"CONTRIBUTOR":7,"NONE":2},"issue_authors":{"mjaquiery":3},"pull_request_authors":{"mjaquiery":25,"dependabot[bot]":5,"pre-commit-ci[bot]":4},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:10.509Z","repositories_count":14166153,"issues_count":34533406,"pull_requests_count":112959556,"authors_count":11231438,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{"codex":1},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{"COLLABORATOR":4,"CONTRIBUTOR":1},"past_year_issue_authors":{},"past_year_pull_request_authors":{"mjaquiery":4,"pre-commit-ci[bot]":1},"maintainers":[{"login":"mjaquiery","count":28,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/mjaquiery"}],"active_maintainers":[{"login":"mjaquiery","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/mjaquiery"}]},"events":{"total":{"ReleaseEvent":15,"DeleteEvent":21,"PullRequestEvent":29,"ForkEvent":1,"WatchEvent":1,"PushEvent":192,"PullRequestReviewCommentEvent":6,"PullRequestReviewEvent":8,"CreateEvent":78},"last_year":{"ReleaseEvent":9,"DeleteEvent":8,"PullRequestEvent":5,"PushEvent":79,"PullRequestReviewEvent":1,"PullRequestReviewCommentEvent":1,"CreateEvent":25}},"keywords":[],"dependencies":[{"ecosystem":"actions","filepath":".github/workflows/docs.yml","sha":null,"kind":"manifest","created_at":"2024-01-02T03:02:30.313Z","updated_at":"2024-01-02T03:02:30.313Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/docs.yml","dependencies":[{"id":15381954185,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":15381954186,"package_name":"mxschmitt/action-tmate","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":15381954187,"package_name":"actions/configure-pages","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":15381954188,"package_name":"actions/upload-pages-artifact","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":15381954189,"package_name":"actions/deploy-pages","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/issue-release.yml","sha":null,"kind":"manifest","created_at":"2024-01-02T03:02:30.556Z","updated_at":"2024-01-02T03:02:30.556Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/issue-release.yml","dependencies":[{"id":15381954192,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":15381954193,"package_name":"actions/download-artifact","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":15381954194,"package_name":"softprops/action-gh-release","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"docker","filepath":"docs/Dockerfile","sha":null,"kind":"manifest","created_at":"2024-01-02T03:02:31.170Z","updated_at":"2024-01-02T03:02:31.170Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/docs/Dockerfile","dependencies":[{"id":15381954205,"package_name":"sphinxdoc/sphinx","ecosystem":"docker","requirements":"latest","direct":true,"kind":"build","optional":false}]},{"ecosystem":"docker","filepath":"Dockerfile","sha":null,"kind":"manifest","created_at":"2023-12-12T13:27:06.258Z","updated_at":"2023-12-12T13:27:06.258Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/Dockerfile","dependencies":[{"id":15048707801,"package_name":"python","ecosystem":"docker","requirements":"3.10.4-slim@sha256","direct":true,"kind":"build","optional":false}]},{"ecosystem":"pypi","filepath":"requirements-test.txt","sha":null,"kind":"manifest","created_at":"2023-12-12T13:27:06.334Z","updated_at":"2023-12-12T13:27:06.334Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/requirements-test.txt","dependencies":[{"id":15048707802,"package_name":"factory_boy","ecosystem":"pypi","requirements":"==3.2.1","direct":true,"kind":"test","optional":false},{"id":15048707803,"package_name":"faker","ecosystem":"pypi","requirements":"==17.0.0","direct":true,"kind":"test","optional":false},{"id":15048707804,"package_name":"drf-openapi-tester","ecosystem":"pypi","requirements":"==2.3.3","direct":true,"kind":"test","optional":false}]},{"ecosystem":"pypi","filepath":"requirements.txt","sha":null,"kind":"manifest","created_at":"2023-12-12T13:27:06.584Z","updated_at":"2023-12-12T13:27:06.584Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/requirements.txt","dependencies":[{"id":15048707805,"package_name":"Django","ecosystem":"pypi","requirements":"==4.1.4","direct":true,"kind":"runtime","optional":false},{"id":15048707806,"package_name":"django-cors-headers","ecosystem":"pypi","requirements":"==3.13.0","direct":true,"kind":"runtime","optional":false},{"id":15048707807,"package_name":"django-filter","ecosystem":"pypi","requirements":"==22.1","direct":true,"kind":"runtime","optional":false},{"id":15048707808,"package_name":"django-dry-rest-permissions","ecosystem":"pypi","requirements":"==1.2.0","direct":true,"kind":"runtime","optional":false},{"id":15048707809,"package_name":"djangorestframework","ecosystem":"pypi","requirements":"==3.14.0","direct":true,"kind":"runtime","optional":false},{"id":15048707810,"package_name":"django-rest-knox","ecosystem":"pypi","requirements":"==4.2.0","direct":true,"kind":"runtime","optional":false},{"id":15048707811,"package_name":"psycopg2-binary","ecosystem":"pypi","requirements":"==2.9.5","direct":true,"kind":"runtime","optional":false},{"id":15048707812,"package_name":"redis","ecosystem":"pypi","requirements":"==4.4.0","direct":true,"kind":"runtime","optional":false},{"id":15048707813,"package_name":"drf-spectacular","ecosystem":"pypi","requirements":"==0.25.1","direct":true,"kind":"runtime","optional":false},{"id":15048707814,"package_name":"markdown","ecosystem":"pypi","requirements":"==3.4.1","direct":true,"kind":"runtime","optional":false},{"id":15048707815,"package_name":"gunicorn","ecosystem":"pypi","requirements":"==20.1.0","direct":true,"kind":"runtime","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/scheduled-demo-redeploy.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:54.216Z","updated_at":"2025-12-14T08:00:54.216Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/scheduled-demo-redeploy.yml","dependencies":[]},{"ecosystem":"actions","filepath":".github/workflows/docker-image.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:53.655Z","updated_at":"2025-12-14T08:00:53.655Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/docker-image.yml","dependencies":[{"id":25768283179,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283180,"package_name":"docker/login-action","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":25768283181,"package_name":"aws-actions/configure-aws-credentials","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":25768283182,"package_name":"aws-actions/amazon-ecr-login","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":25768283197,"package_name":"docker/metadata-action","ecosystem":"actions","requirements":"v5","direct":true,"kind":"composite","optional":false},{"id":25768283198,"package_name":"owenthereal/action-upterm","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false},{"id":25768283199,"package_name":"docker/build-push-action","ecosystem":"actions","requirements":"v5","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/update-demo.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:54.260Z","updated_at":"2025-12-14T08:00:54.260Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/update-demo.yml","dependencies":[{"id":25768283201,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283202,"package_name":"aws-actions/configure-aws-credentials","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/configure-workflows.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:53.594Z","updated_at":"2025-12-14T08:00:53.594Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/configure-workflows.yml","dependencies":[{"id":25768283171,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283172,"package_name":"owenthereal/action-upterm","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false},{"id":25768283173,"package_name":"actions/upload-artifact","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283174,"package_name":"docker/login-action","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":25768283175,"package_name":"actions/download-artifact","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283176,"package_name":"actions/setup-node","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283177,"package_name":"JS-DevTools/npm-publish","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false},{"id":25768283178,"package_name":"pypa/gh-action-pypi-publish","ecosystem":"actions","requirements":"release/v1","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/ci-tests.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:53.215Z","updated_at":"2025-12-14T08:00:53.215Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/ci-tests.yml","dependencies":[{"id":25768283137,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283138,"package_name":"owenthereal/action-upterm","ecosystem":"actions","requirements":"v1","direct":true,"kind":"composite","optional":false},{"id":25768283162,"package_name":"docker/login-action","ecosystem":"actions","requirements":"v3","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/update-staging.yml","sha":null,"kind":"manifest","created_at":"2025-12-14T08:00:54.317Z","updated_at":"2025-12-14T08:00:54.317Z","repository_link":"https://github.com/galv-team/galv-backend/blob/develop/.github/workflows/update-staging.yml","dependencies":[{"id":25768283203,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":25768283204,"package_name":"aws-actions/configure-aws-credentials","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false}]}],"score":3.8712010109078907,"created_at":"2025-10-10T00:02:33.281Z","updated_at":"2026-04-14T18:30:18.920Z","avatar_url":"https://github.com/galv-team.png","language":"Python","category":"Energy Storage","sub_category":"Battery","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"# Galv backend (REST API)\n\u003e A metadata secretary for battery science\n\n[Check out the demo](https://galv-demo.fly.dev)\n\n[![GitHub Releases](https://img.shields.io/github/v/release/galv-team/galv-backend)](https://github.com/galv-team/galv-backend/releases/latest)\n[![Docker image](https://ghcr-badge.egpl.dev/galv-team/galv-backend/latest_tag?color=%2344cc11\u0026ignore=latest\u0026label=image\u0026trim=0)](https://github.com/galv-team/galv-backend/pkgs/container/galv-backend)\n\n[![CI workflows](https://github.com/galv-team/galv-backend/actions/workflows/configure-workflows.yml/badge.svg)](https://github.com/galv-team/galv-backend/actions/workflows/configure-workflows.yml)\n[![pre-commit.ci status](https://results.pre-commit.ci/badge/github/galv-team/galv-backend/develop.svg)](https://results.pre-commit.ci/latest/github/galv-team/galv-backend/develop)\n\n\u003e API client libraries:\n\u003e\n\u003e [![NPM Downloads](https://img.shields.io/npm/dm/%40galv%2Fgalv)](https://www.npmjs.com/package/@galv/galv)\n\u003e [![PyPI - Downloads](https://img.shields.io/pypi/dm/galv)](https://pypi.org/project/galv/)\n\n\nThe Galv backend provides a REST API powered by [Django](https://www.djangoproject.com/) and [Django REST Framework](https://www.django-rest-framework.org/).\n\n## Galv Project\n- [**Backend**](https://github.com/galv-team/galv-backend)\n- [Frontend](https://github.com/galv-team/galv-frontend)\n- [Harvester](https://github.com/galv-team/galv-harvester)\n\nFor more complete documentation, see the\n[Galv Server documentation](https://galv-team.github.io/galv-backend/).\n\n\n## Demo instance\n\nThere is a public demo instance of Galv (reset every week) available at [galv-demo.fly.dev](https://galv-demo.fly.dev).\n\n## Deploying\n\nThe Galv backend is deployed using [Docker](https://www.docker.com/).\nYou can deploy the Galv backend in a number of ways.\n\n### Docker image\n\nEach [release](/galv-team/galv-backend/releases) is accompanied by a [Docker image](/galv-team/packages?repo_name=galv-backend).\nThe latest stable version is tagged as `latest`.\nYou can acquire the image by pulling it from GitHub Packages:\n\n```bash\ndocker pull ghcr.io/galv-team/galv-backend:latest\n```\n\nYou can then run the image using the following command:\n\n```bash\ndocker run -p 8001:80 ghcr.io/galv-team/galv-backend:latest\n```\n\nYou will need to add in a database and set the environment variables appropriately.\nYou will also need to add environment variables as detailed [below](#Envvars).\n\n### Docker Compose\n\nGalv can be deployed using the Dockerfile provided in this repository.\nExample usage is provided in the [docker-compose.yml](/galv-team/galv-backend/blob/main/docker-compose.yml) file.\nThis is generally for development, however, so you will need to add a database and set the [environment variables](#Envvars) appropriately.\n\n## Envvars\n\nYou should ensure that all environment variables in the `.env` file are set correctly before deploying.\nThese variables can be set by editing and including the `.env` file, by setting them in the environment,\nor by setting them via a hosting platform's interface.\n\n## Development\n\nDevelopment is most easily done by using the provided Dockerfile and docker-compose.yml files.  The docker-compose.yml file will start a postgres database and the Django server.  The Django server will automatically reload when changes are made to the code.\nThe following command will start the server:\n\n```bash\ndocker-compose up app\n```\n\nThe server will be available at http://localhost:8001.\n\n### Gotchas\n\n- The docker-compose file only mounts the `galv-backend` directory, so if you add a new file or directory, to the project root, you will need to rebuild the container.\n- The `app` container is started with `server.sh`. If this file has acquired non-LF line endings, the container will report that it can't be found when starting.\n\n### Setting up in PyCharm\n\nTo set up the development environment in PyCharm, make sure there's a project interpreter set up for the Docker container.\nOnce you have that, create a Django server configuration with the following settings:\n- Host: `0.0.0.0` (this allows you to reach the server from your host machine)\n- Port: `80` (**not** `8001` - this is the port on the Docker container, not the host machine)\n\n## Documentation\n\nDocumentation is generated using [Sphinx](https://www.sphinx-doc.org/en/master/).\nTo make it easy to develop documentation, a Dockerfile is provided that will build the documentation and serve it using a webserver.\nIt should refresh automatically when changes are made to the documentation.\n\nThe docs container is started with `docker-compose up docs`.\nBy default, it will serve at http://localhost:8005.\n\n### Versioning\n\nThe documentation supports multiple versions.\nTo add a new version, add a new entry to `docs/tags.json`.\nThese tags must be in the format `v*.*.*` and must be available as a git tag.\nTags that match `v\\d+\\.\\d+\\.\\d+` will be tagged as `latest` when released.\nTags with a suffix, e.g. `v1.0.0-beta`, will not be tagged as `latest`.\n\nThere is a fairly complex workflow that will update the documentation for all versions when a new version is released.\nThis workflow is defined in `.github/workflows/docs.yml`, with help from `docs/build_docs.py`.\n\n## Testing\n\nTests are most easily run using the provided Dockerfile and docker-compose.yml files.\nThe docker-compose.yml file will start a postgres database and run the tests.\nThe following command will run the tests:\n\n```bash\ndocker-compose run --rm app_test\n```\n\n## Publishing\n\n### Versioning\n\nWe use [Semantic Versioning](https://semver.org/).\nWhen you make a change, you should update the `API_VERSION` in `galv_backend/config/settings_base.py`.\n\nIf you update the documentation, you should also update the `release` version in `docs/source/conf.py` and add the new version tag to `docs/tags.json`.\n\nThese versions should all use clean SemVer versioning, i.e. `v*.*.*`, where the *s represent the major, minor, and patch versions respectively.\n\nPublished versions should be released incrementally.\n\n#### Compatibility checks\n\nNew versions of the API should be compatible with the previous version.\nIf this is not the case, you should increment the major version number.\n\nThe CI workflow will check for compatibility issues in the OpenAPI spec by comparing the current version of the spec\nwith the first version of the current major version.\n\nCompatibility checking is done for both the OpenAPI specification and the database schema.\nThe OpenAPI spec is checked using the `check_spec` container, which runs the `openapi-diff` tool.\nThe database schema is checked using Django's built-in migration system during staging deployments (versions ending with `-rc#`).\n\n### Tagged releases\n\nWhen you want to release a new version, using the GitHub Actions workflow, create a new tag.\nThe tag should be a SemVer version, optionally with a qualifier (e.g. `v1.2.3-alpha`).\n\nMake sure the tag's version matches the `API_VERSION` in `galv_backend/config/settings_base.py`.\n\nE.g. if your `API_VERSION` is `1.2.3` you can create tags like `v1.2.3`, `v1.2.3-alpha`, `v1.2.3-rc1`, etc.\n\n#### Release candidates\n\nTags that end with `-rc#` will be treated as release candidates.\n\nWhen you create a release candidate, the GitHub Actions will deploy the candidate version to the `staging` server.\n\nThis deployment will run the migrations, etc. so we can detect if something is likely to break in production.\n\n#### Demo version\n\nThe `demo` instance is published every week, and with every release.\n\n### GitHub Actions\n\nWe use a fairly complicated GitHub Actions flow to ensure we don't publish breaking changes.\nThe `configure-workflows.yml` action is run on every push to the repository, and it determines which workflows to run based on the branch/tag and the contents of the repository.\n\nWhen you push to a branch, the following actions are considered:\n- Configure workflows\n- Run tests (A)\n- Build and publish documentation (B)\n- Build and publish OpenAPI spec (C)\n- Build and publish API client libraries (C)\n- Build and publish Docker images (A)\n- Issue a GitHub release (A)\n- Deploy staging instance (D)\n- Deploy demo instance (E)\n\nThe triggers are:\nA. changes in `backend_django`, or other code files like `requirements.txt` or `Dockerfile`\nB. changes in `docs`\nC. B \u0026 changes to the OpenAPI spec (i.e. the specifications are not equivalent)\nD. tags that match `v*.*.*-rc#`\nE. if the tag is the `latest` release version\n\nN.B. Changes are calculated vs _the previous release_, not the previous commit.\n\n#### Requirements:\n\nThe `configure-workflows.yml` action also checks a couple of requirements:\n\n- The version in the tag must match the `API_VERSION` in `galv_backend/config/settings_base.py`.\n- If the tag is a release (v*.*.*), there must not be an existing release for the same version.\n- If there are breaking changes in the OpenAPI spec, the tag must be a major version.\n\nTo run the OpenAPI compatibility checks locally, run the following command:\n\n```bash\ndocker-compose run --rm check_spec\n```\n\nYou can optionally specify the `REMOTE_SPEC_SOURCE` environment variable to check against a different version of the galv-spec.\n\n```bash\ncp my_spec.json .dev/spec\n# .dev/spec is mounted as a volume at /spec in the container\ndocker-compose run --rm -e REMOTE_SPEC_SOURCE=/spec/my_spec.json check_spec\n```\n\n## Releasing with AWS\n\nWe use AWS (Amazon Web Services) to host a few instances.\nThere is a [repository](https://github.com/galv-team/galv-aws-cdk) that contains the AWS Cloud Development Kit (CDK) code to deploy the Galv backend to AWS.\nThe workflows for the staging and demo instances use this CDK code to deploy the Galv backend to AWS.\n\nTo perform a manual deployment to AWS, please follow the instructions in the CDK repository.\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["archiving","observation","optimize","measur","transforms","projection","conversion","data-profiling","threads","energy-system-model"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/326330","html_url":"https://ost.ecosyste.ms/projects/326330"}