Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Sage-Bionetworks/rocc-service

Repository files navigation

March 8, 2022: This project has been moved to Sage-Bionetworks/challenge-registry.

ROCC API Service

GitHub Release GitHub CI GitHub License Docker Pulls Coverage Status

Introduction

This GitHub repository includes the code of the REST API service of the Registry of Open Community Challenges (ROCC). This service implements the ROCC OpenAPI specification (schemas).

Specification

Usage

Running with Docker

Create the configuration file.

cp .env.example .env

The command below starts the ROCC service locally.

docker compose up --build

You can stop the container run with Ctrl+C, followed by docker compose down.

Running with Python

We recommend using a Conda environment to install and run the ROCC service.

conda create --name rocc-service python=3.9.5
conda activate rocc-service

Create the configuration file and export its parameters to environment variables.

cp .env.example .env
export $(grep -v '^#' .env | xargs)

Start the MongoDB instance.

docker compose up -d db

Install and start the ROCC service.

cd server/
pip install -r requirements.txt
python -m openapi_server

Acessing the Swagger UI

This API service provides a web interface (Swagger User Interface) that you can use to interact with the service. The address of this interface depends on the value of SERVER_PORT specified in .env.

Versioning

GitHub release tags

This repository uses semantic versioning to track the releases of this tool. This repository uses "non-moving" GitHub tags, that is, a tag will always point to the same git commit once it has been created.

Docker image tags

The artifact published by the CI/CD workflow of this GitHub repository is a Docker image pushed to the Docker Hub Registry. This table lists the image tags pushed to the registry.

Tag name Moving Description
latest Yes Latest stable release.
edge Yes Latest commit made to the default branch.
edge-<sha> No Same as above with the reference to the git commit.
<major>.<minor>.<patch> No Stable release.

You should avoid using a moving tag like latest when deploying containers in production, because this makes it hard to track which version of the image is running and hard to roll back.

Contributing

Thinking about contributing to this project? Get started by reading our contribution guide.

License

Apache License 2.0