Skip to content

Scripts for brokering spreadsheets to ingest API, staging files and pushing bundles to datastore

License

Notifications You must be signed in to change notification settings

ebi-ait/ingest-broker

Repository files navigation

Build Status Maintainability Test Coverage Docker Repository on Quay

HCA Ingest Broker

Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI.

Web Application

Requirements

Requirements for this project are listed in 2 files: requirements.txt and requirements-dev.txt. The requirements-dev.txt file contains dependencies specific for development

The requirement files (requirements.txt, requirements-dev.txt) are generated using pip-compile from pip-tools

pip-compile requirements.in
pip-compile requirements-dev.in

The direct dependencies are listed in requirements.in, requirements-dev.in input files.

Install dependencies

  • by using pip-sync from pip-tools
pip-sync requirements.txt requirements-dev.txt
  • or by just using pip install
    pip install -r requirements.txt
    pip install -r requirements-dev.txt

Upgrade dependencies

To update all packages, periodically re-run pip-compile --upgrade

To update a specific package to the latest or a specific version use the --upgrade-package or -P flag:

pip-compile --upgrade-package requests

See more options in the pip-compile documentation .

Running with Python

Start the web application with

python broker/broker_app.py

Running with Flask's CLI

You can use the flask cli to start your app.

Set FLASK_APP beforehand:

export FLASK_APP=broker_app

then start flask

flask run

You can set this and other app environment variables such as INGEST_API in a .flaskenv file. See the template. See more in flask's docs

Running With Docker

Alternatively, you can build and run the app with Docker. To run the web application with Docker for build the Docker image with

docker build . -t ingest-broker:latest

then run the Docker container. You will need to provide the URL to the Ingestion API

docker run -p 5000:5000 -e INGEST_API=http://localhost:8080 ingest-broker:latest

or run against the development Ingest API

docker run -p 5000:5000 -e INGEST_API=https://api.ingest.dev.archive.data.humancellatlas.org ingest-broker:latest

The application will be available at http://localhost:5000

Tests

Running all tests

Will send requests to ingest core on dev

pytest

Running unit tests

Isolated, no external communication required

pytest test/unit/

Docs

see design docs

About

Scripts for brokering spreadsheets to ingest API, staging files and pushing bundles to datastore

Resources

License

Stars

Watchers

Forks

Packages

No packages published