{"id":20215260,"url":"https://github.com/kitwaremedical/otm-server","last_synced_at":"2026-02-25T03:35:39.867Z","repository":{"id":39967197,"uuid":"311418356","full_name":"KitwareMedical/otm-server","owner":"KitwareMedical","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-09T19:26:45.000Z","size":92979,"stargazers_count":0,"open_issues_count":27,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-24T12:56:16.461Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","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/KitwareMedical.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":"2020-11-09T17:43:54.000Z","updated_at":"2024-12-09T19:26:52.000Z","dependencies_parsed_at":"2024-12-09T20:36:28.529Z","dependency_job_id":null,"html_url":"https://github.com/KitwareMedical/otm-server","commit_stats":null,"previous_names":["kitwaremedical/otm-server","girder/otm-server"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fotm-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fotm-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fotm-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KitwareMedical%2Fotm-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KitwareMedical","download_url":"https://codeload.github.com/KitwareMedical/otm-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248232522,"owners_count":21069487,"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","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":["hacktoberfest"],"created_at":"2024-11-14T06:20:48.443Z","updated_at":"2025-10-15T03:21:38.329Z","avatar_url":"https://github.com/KitwareMedical.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Optimal Transport Morphometry\n\n## Develop with Docker (recommended quickstart)\n\nThis is the simplest configuration for developers to start with.\n\n### Initial Setup\n\n1. Run `docker-compose run --rm django ./manage.py migrate`\n2. Run `docker-compose run --rm django ./manage.py createsuperuser`\n   and follow the prompts to create your own user\n3. Run `docker-compose run --rm django ./manage.py populate_db --include-images sample_data/oasis_small.csv` to seed the database and generate a sample dataset.\n\n### Run Application\n\n1. Run `docker-compose up`\n2. Access the site, starting at \u003chttp://localhost:8000/admin/\u003e\n3. When finished, use `Ctrl+C`\n\n### Application Maintenance\n\nOccasionally, new package dependencies or schema changes will necessitate\nmaintenance. To non-destructively update your development stack at any time:\n\n1. Run `docker-compose pull`\n2. Run `docker-compose build --pull --no-cache`\n3. Run `docker-compose run --rm django ./manage.py migrate`\n\n## Develop Natively (advanced)\n\nThis configuration still uses Docker to run attached services in the background,\nbut allows developers to run Python code on their native system.\n\n### Initial Setup\n\n1. Run `docker-compose -f ./docker-compose.yml up -d`\n2. Install Python 3.9\n3. Install\n   [`psycopg2` build prerequisites](https://www.psycopg.org/docs/install.html#build-prerequisites)\n4. Create and activate a new Python virtual environment\n5. Run `pip install -e .[dev]`\n6. Run `source ./dev/export-env.sh`\n7. Run `./manage.py migrate`\n8. Run `./manage.py createsuperuser` and follow the prompts to create your own user\n9. Run `./manage.py populate_db sample_data/oasis_small.csv`\n\n### Run Application\n\n1. Ensure `docker-compose -f ./docker-compose.yml up -d` is still active\n2. Run:\n   1. `source ./dev/export-env.sh`\n   2. `./manage.py runserver`\n3. Run in a separate terminal:\n   1. `source ./dev/export-env.sh`\n   2. `celery --app optimal_transport_morphometry.celery worker --loglevel INFO --without-heartbeat`\n4. When finished, run `docker-compose stop`\n\n## Remap Service Ports (optional)\n\nAttached services may be exposed to the host system via alternative ports. Developers who work\non multiple software projects concurrently may find this helpful to avoid port conflicts.\n\nTo do so, before running any `docker-compose` commands, set any of the environment variables:\n\n* `DOCKER_POSTGRES_PORT`\n* `DOCKER_RABBITMQ_PORT`\n* `DOCKER_MINIO_PORT`\n\nThe Django server must be informed about the changes:\n\n* When running the \"Develop with Docker\" configuration, override the environment variables:\n  * `DJANGO_MINIO_STORAGE_MEDIA_URL`, using the port from `DOCKER_MINIO_PORT`.\n* When running the \"Develop Natively\" configuration, override the environment variables:\n  * `DJANGO_DATABASE_URL`, using the port from `DOCKER_POSTGRES_PORT`\n  * `DJANGO_CELERY_BROKER_URL`, using the port from `DOCKER_RABBITMQ_PORT`\n  * `DJANGO_MINIO_STORAGE_ENDPOINT`, using the port from `DOCKER_MINIO_PORT`\n\nSince most of Django's environment variables contain additional content, use the values from\nthe appropriate `dev/.env.docker-compose*` file as a baseline for overrides.\n\n## Testing\n\n### Initial Setup\n\ntox is used to execute all tests.\ntox is installed automatically with the `dev` package extra.\n\nWhen running the \"Develop with Docker\" configuration, all tox commands must be run as\n`docker-compose run --rm django tox`; extra arguments may also be appended to this form.\n\n### Running Tests\n\nRun `tox` to launch the full test suite.\n\nIndividual test environments may be selectively run.\nThis also allows additional options to be be added.\nUseful sub-commands include:\n\n* `tox -e lint`: Run only the style checks\n* `tox -e type`: Run only the type checks\n* `tox -e test`: Run only the pytest-driven tests\n\nTo automatically reformat all code to comply with\nsome (but not all) of the style checks, run `tox -e format`.\n\n## Database seeding\n\nDevelopers should run the following command to generate a dataset and relevant\nimage data in their dev instance:\n\n```bash\ndocker-compose run --rm django ./manage.py populate_db sample_data/oasis_small.csv\n```\n\nFor now, this ensures the existence of a test dataset, and generates a pending upload\nbatch into it.\n\n## Authentication Setup\n\nIn order to set up authentication for your local development environment, you need to create an application which will issue a `client_id` to set in your client app. Visit http://localhost:8000/admin/oauth2_provider/application/ and create a new one.\n\nThe settings for your new application should be as follows:\n\n* Redirect URLs: http://localhost:8080/datasets (no trailing slash)\n* Client type: Public\n* Authorization grant type: Authorization code\n* Client Secret: empty\n* Name: A descriptive name of your choosing\n\nIn the client app directory (otm-client, currently a private repository), create a new file `.env.development.local` and set `VUE_APP_OAUTH_CLIENT_ID` to the value found in your application's \"Client ID\" field. This value represents a new OAuth2 public client ID.\n\n\n## Acknowledgement\n\nThis work was supported by the National Institute Of Mental Health of the National Institutes of Health under Award Number R42MH118845. The content is solely the responsibility of the authors and does not necessarily represent the official views of the National Institutes of Health.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fotm-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkitwaremedical%2Fotm-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkitwaremedical%2Fotm-server/lists"}