/OpenConext-statistics

Statistics

Primary LanguageJavaScriptApache License 2.0Apache-2.0

OpenConext-Statistics

Build Status codecov.io

This project contains the Statistics API to retrieve OpenConext login information.

Overview Requirements

  • Python 3.6.x
  • InfluxDB v1.5.x
  • Yarn 1.7+
  • node

Getting started

Create a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install -r ./requirements/test.txt

Ensure InfluxDb is running and run the Python server:

PROFILE=local python -m server

The GUI can be started with:

cd client
yarn start

To create a GUI production build to be deployed:

yarn build

To analyze the bundle:

yarn analyze

API

See the Wiki for the API documentation.

Testing

To run all Python tests:

flake8 server
pytest server

To generate coverage reports:

pytest --cov=server --cov-report html:htmlcov server/test
open htmlcov/index.html

To run all JavaScript tests:

cd client
yarn test

Or to run all the tests and do not watch:

cd client
CI=true yarn test