This repository contains the source code of the Software Observatory API. This API is a FastAPI application that uses a remote mongodb database.
To start the development environment, first create a virtual environment and install the dependencies:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Then, start the development server:
export CONFIG_PATH=./api-variables/config_db.ini
uvicorn main:app --host 0.0.0.0 --port 3500 --reload --log-level debug
The API will be available at http://localhost:3500.
When a push is done to the main branch, the version of the API should be updated. This is done by adding the new version to VERSION. A GitHub action will create a tag with the version to the version in VERSION file, build and publish the docker image.
The API documentation is available at https://observatory.openebench.bsc.es/api/docs.
This documentation is automatically generated by FastAPI and is based on the OpenAPI standard.
The API is deployed in the BSC's infrastructure. The deployment is done using docker and docker-compose.
The docker image is built as part of the CI/CD pipeline. It is triggered by pushing a tag to the repository.
Notice that the API is accessible at a subdomain of the OpenEBench platform. The API is available at https://observatory.openebench.bsc.es/api. In development, the API is available directly at http://localhost:3500.
PYTHONPATH=$(pwd) pytest -s app/tests
This software is licensed under the MIT License. For more information, read the LICENSE file.