{"id":19612048,"url":"https://github.com/fnndsc/chris_ultron_backend","last_synced_at":"2026-04-02T13:32:59.387Z","repository":{"id":38079415,"uuid":"57900453","full_name":"FNNDSC/ChRIS_ultron_backEnd","owner":"FNNDSC","description":"Backend for ChRIS","archived":false,"fork":false,"pushed_at":"2026-03-26T18:45:09.000Z","size":10684,"stargazers_count":36,"open_issues_count":37,"forks_count":99,"subscribers_count":11,"default_branch":"master","last_synced_at":"2026-03-26T19:45:45.633Z","etag":null,"topics":["django","django-rest-framework","docker","kubernetes","medical","openshift","pipelines","python3","swift-storage"],"latest_commit_sha":null,"homepage":"https://fnndsc.github.io/ChRIS_ultron_backEnd","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/FNNDSC.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2016-05-02T15:35:40.000Z","updated_at":"2026-03-26T18:45:15.000Z","dependencies_parsed_at":"2024-04-16T04:39:55.255Z","dependency_job_id":"bee37b71-0498-46e5-88e3-ee94a8ab8c80","html_url":"https://github.com/FNNDSC/ChRIS_ultron_backEnd","commit_stats":null,"previous_names":[],"tags_count":93,"template":false,"template_full_name":null,"purl":"pkg:github/FNNDSC/ChRIS_ultron_backEnd","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_ultron_backEnd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_ultron_backEnd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_ultron_backEnd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_ultron_backEnd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FNNDSC","download_url":"https://codeload.github.com/FNNDSC/ChRIS_ultron_backEnd/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FNNDSC%2FChRIS_ultron_backEnd/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31307142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-02T12:59:32.332Z","status":"ssl_error","status_checked_at":"2026-04-02T12:54:48.875Z","response_time":89,"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"}},"keywords":["django","django-rest-framework","docker","kubernetes","medical","openshift","pipelines","python3","swift-storage"],"created_at":"2024-11-11T10:45:44.650Z","updated_at":"2026-04-02T13:32:59.360Z","avatar_url":"https://github.com/FNNDSC.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ![ChRIS logo](./docs/assets/logo_chris.png) ChRIS\\_ultron\\_backEnd\n\n[![Build](https://github.com/FNNDSC/ChRIS_ultron_backEnd/actions/workflows/ci.yml/badge.svg)](https://github.com/FNNDSC/ChRIS_ultron_backEnd/actions/workflows/ci.yml)\n[![License](https://img.shields.io/github/license/fnndsc/ChRIS_ultron_backEnd.svg)](./LICENSE)\n\n_ChRIS_ is an open-source platform for containerized medical compute.\n\nhttps://chrisproject.org/\n\n## TL;DR\n\nWith [Docker Compose](https://docs.docker.com/compose/) and [just](https://just.systems/) installed, run\n\n```shell\ngit clone https://github.com/FNNDSC/ChRIS_ultron_backEnd.git\ncd ChRIS_ultron_backEnd\njust\n```\n\n## Introduction\n\nThe _ChRIS_ backend, a.k.a. _ChRIS Ultron Backend_ or _**CUBE**_ for short,\nis a component of the _ChRIS_ system. It is responsible for maintaining the database\nof users, files, plugins, and pipelines.\n\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://chrisproject.org/img/figures/ChRIS_architecture_dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://chrisproject.org/img/figures/ChRIS_architecture.svg\"\u003e\n  \u003cimg alt=\"Architecture diagram\" src=\"https://chrisproject.org/img/figures/ChRIS_architecture.svg\"\u003e\n\u003c/picture\u003e\n\nHere lives the code of _CUBE_. It is a Django project using PostgreSQL and Celery.\nThe HTTP API primarily supports the [collection+json](http://amundsen.com/media-types/collection/) content-type.\n\n## Development\n\nDevelopment is mainly supported on Linux. MacOS and WSL on Windows also work (because Docker Desktop is a Linux VM). You will need at least 8GM RAM, 20GB disk space, and a good internet connection.\n\nInstall Docker (version 27 or above) or Podman (version 5.2 or above), Docker Compose, and [just](https://github.com/casey/just?tab=readme-ov-file#installation).\n\n\u003cdetails\u003e\n\u003csummary\u003e\nDocker Installation Instructions\n\u003c/summary\u003e\n\n- For MacOS and Windows, see: https://docs.docker.com/get-started/get-docker/\n- For Linux, see: https://docs.docker.com/engine/install/\n\n\u003e [!CAUTION]\n\u003e On **Linux**, the official Docker Documentation will try to trick you into installing \"Docker Desktop.\" Do not install \"Docker Desktop.\" Look for \"Docker Engine\" instead.\n\n\u003e [!CAUTION]\n\u003e On **Ubuntu**, make sure you follow the instructions here: https://docs.docker.com/engine/install/ubuntu/. If you do not follow the instructions, Ubuntu will try to install Docker using snap, which will cause many problems.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\nPodman Setup Instructions\n\u003c/summary\u003e\n\nRootless Podman is supported. You must install and configure Podman to use `docker-compose`, _not_ `podman-compose`. `podman-compose` is missing features, see issues [#575](https://github.com/containers/podman-compose/issues/575) and [#866](https://github.com/containers/podman-compose/issues/866).\n\nA Podman daemon must be running, because _ChRIS_ runs containers of its own. To start the Podman daemon on Linux, run\n\n```shell\nsystemctl --user start podman.service\n```\n\nIf both Podman and Docker are installed, Podman will be used by default. A preference to use either Podman or Docker can be set by running\n\n```shell\njust prefer podman  # or\njust prefer docker\n```\n\nWith Podman, RabbitMQ might fail to start. Simply retry the command. See https://github.com/FNNDSC/ChRIS_ultron_backEnd/issues/573\n\n\u003c/details\u003e\n\n### Just Commands\n\nDevelopment is handled by [`just`](https://just.systems).\nRunning _CUBE_ in development mode is as-simple-as running the command\n\n```shell\njust\n```\n\nThe first run of `just` will take 5-20 minutes because it needs to pull and build container images. Subsequent runs should only take 1-5 minutes.\n\n_CUBE_ is now running at http://localhost:8000/api/v1/. You can click around in the web browser. Alternatively, check out [chrs](https://chrisproject.org/docs/chrs) and/or [ChRIS\\_ui](https://github.com/FNNDSC/ChRIS_ui).\n\nRun tests:\n\n```shell\njust test-all                       # run all tests\njust test-unit                      # run unit tests\njust test-integration               # run integration tests\njust test feeds.tests.test_views    # run chris_backend/feeds/tests/test_views.py\n```\n\nShut down and clean up:\n\n```shell\njust nuke\n```\n\nList all `just` commands:\n\n```shell\njust --list --unsorted\n```\n\n### Development Tips and Tricks\n\n#### Recreate containers after changing `docker-compose.yml`\n\nIf you modify `docker-compose.yml`, you need to recreate/restart the affected services.\n\n```shell\njust up\n```\n\n#### Rebuild the image after changing package dependencies\n\nIf you modify `Dockerfile` or `requirements/*.txt`, you need to rebuild the image and recreate your containers.\n\n```shell\njust build \u0026\u0026 just up\n```\n\n#### Trying HTTP requests from the CLI\n\nFor CLI tools, I recommend [xh](https://github.com/ducaale/xh) and [jnv](https://github.com/ynqa/jnv) or [jq](https://jqlang.github.io/jq/). Example:\n\n```shell\nxh -a chris:chris1234 :8000/api/v1/ | jnv\n```\n\n#### Interactive shell\n\nIt is often easiest to debug things using a shell.\n\n```shell\njust bash    # run bash in a container\n# -- or --\njust shell   # run a Python REPL\n```\n\nIn the Python REPL, you can import models and interact with them. Here is some common starter code:\n\n```python\nfrom django.conf import settings\nfrom django.contrib.auth.models import User, Group\nfrom plugins.models import *\nfrom plugininstances.models import *\nfrom core.storage import connect_storage\n\nstorage = connect_storage(settings)\n```\n\n### IDE Setup\n\nVisual Studio Code and PyCharm both support using Docker containers to run the Python interpreter. Run `just build`, then point your IDE to use the container image `localhost/fnndsc/cube:dev`.\n\nNot all text editors support using Docker, or configuring the LSP might be inconvenient. In these cases, you need to install Python and the dependencies on-the-metal.\n\n#### Installing Python Dependencies On-The-Metal\n\nThe traditional but worst approach is to install Python 3.12, then run\n\n```shell\npython -m venv venv\nsource venv/bin/activate\npip install -r requirements/local.txt\n```\n\nSome dependencies (such as `python-ldap`) build C code during installation,\nrequiring `clang` to be installed. Alternatively, my recommendation is to use\n`micromamba` to install Python 3.12 and `python-ldap`, then use `pip` to\ninstall everything else.\n[Install micromamba](https://mamba.readthedocs.io/en/latest/installation/micromamba-installation.html), then run\n\n```shell\nmicromamba create -p ./.mambaenv -c conda-forge -y python=3.12 python-ldap=3.4\nmicromamba -p ./.mambaenv run pip install -r requirements/local.txt\n```\n\nNow the environment is ready. Activate the environment\n\n```shell\nmicromamba activate -p ./.mambaenv\n```\n\nAnd you are ready to run your LSP + text editor.\n\n### OpenAPI Compatibility\n\n[drf-spectacular](https://drf-spectacular.readthedocs.io/) is used to generate an OpenAPI schema.\nGenerally, its introspection is capable and accurate, but some special care is necessary to make\neverything work. See:\n\n- https://github.com/FNNDSC/ChRIS_ultron_backEnd/pull/584\n- https://github.com/tfranzel/drf-spectacular/issues/1303#issuecomment-2387220962\n- https://drf-spectacular.readthedocs.io/en/latest/faq.html#my-get-queryset-depends-on-some-attributes-not-available-at-schema-generation-time\n\nBe sure to lint your OpenAPI annotations for errors and warnings by running:\n\n```shell\njust openapi \u003e /dev/null\njust openapi-split \u003e /dev/null\n```\n\n## Production Deployment\n\nSee https://chrisproject.org/docs/run/helm\n\n## GitHub Actions\n\nThis repository can also be used as a GitHub Actions step for running _CUBE_ integration tests, e.g.\n\n```yaml\nname: CI\n\non:\n  push:\n    branches: [ master ]\n  pull_request:\n    branches: [ master ]\n\njobs:\n  test:\n    runs-on: ubuntu-24.04\n    steps:\n      - name: Run ChRIS backend integration tests\n        uses: FNNDSC/ChRIS_ultron_backEnd@master\n        # all inputs are optional\n        with:\n          engine: docker  # or podman\n          command: test-integration  # or test-unit, ...\n        # optionally change image used for pfcon, or cube\n        env:\n          CUBE_IMAGE: localhost/fnndsc/cube:dev\n          PFCON_IMAGE: localhost/fnndsc/pfcon:dev\n```\n\n## Documentation\n\n\u003e [!CAUTION]\n\u003e Everything below in this section is outdated.\n\n#### REST API reference\n\nAvailable [here](https://fnndsc.github.io/ChRIS_ultron_backEnd).\n\nInstall Sphinx and the http extension (useful to document the REST API)\n```\npip install Sphinx\npip install sphinxcontrib-httpdomain\n```\n\nBuild the html documentation\n```\ncd docs/\nmake html\n```\n\n#### ChRIS REST API design.\n\nAvailable [here](https://github.com/FNNDSC/ChRIS_ultron_backEnd/wiki/ChRIS-REST-API-design).\n\n#### ChRIS backend database design.\n\nAvailable [here](https://github.com/FNNDSC/ChRIS_ultron_backEnd/wiki/ChRIS-backend-database-design).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fchris_ultron_backend","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffnndsc%2Fchris_ultron_backend","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffnndsc%2Fchris_ultron_backend/lists"}