Skip to content

elifesciences/data-hub-metrics-api

Repository files navigation

Data Hub Metrics API

Provides an API similar to elife-metrics but powered by Data Hub.

Configuration

Environment variables:

Name Description Default Value
REDIS_HOST The hostname for redis localhost
REDIS_POST The port for redis 6379

Development Using Virtual Environment

Pre-requisites (Virtual Environment)

  • Python, ideally using pyenv (see .python-version)
  • Docker to run Redis

First Setup (Virtual Environment)

make dev-venv

Update Dependencies (Virtual Environment)

make dev-install

Run Tests (Virtual Environment)

make dev-test

Start Server Redis Only (using Docker)

make start-redis

The server will be available on port 6379.

Start Server (Virtual Environment)

This will require redis to be available on localhost (port 6379).

make dev-start

The server will be available on port 8000.

You can access the API Docs via /docs

Refresh Data (Virtual Environment)

This will require redis to be available on localhost (port 6379).

make dev-refresh-data

This will load data from BigQuery into Redis.

Development Using Docker

Pre-requisites (Docker)

  • Docker

Run Tests (Docker)

make build-dev test

Start Server (Docker)

make build start logs

The server will be available on port 8000.

You can access the API Docs via /docs

Stop Server (Docker)

make stop

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 7

Languages