Web endpoint for submitting spreadsheets for HCA Ingest and basic admin UI.
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.
- by using
pip-sync
frompip-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
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 .
Start the web application with
python broker/broker_app.py
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
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
Will send requests to ingest core on dev
pytest
Isolated, no external communication required
pytest test/unit/
see design docs