Git Product home page Git Product logo

velox's Introduction

Velox

What is Velox?

Velox is an extension library for the Kolibri project with a purpose to complete Kolibri by allowing setting up reproducible tests to simulate various use-case scenarios and measure their performance.

Installing Velox

The project is being actively developed, which means that you may run into potential issues and that you will most probably have to set up a few things before being able to successfully run Velox in your environment.

Requirements

Kolibri

You can follow the online developer documentation to set up the development environment.

PostgreSQL

To be able to run tests in the PostgreSQL context, you will have to install PostgreSQL and PostgresSQL related dependencies by running the following command (using the Kolibri virtualenv):

pip install -r requirements/postgres.txt

Get Velox code

  • Clone the Velox repository
  • Set up the virtualenv
  • Activate the virtualenv
  • run pip install -r requirements.txt to retrieve dependencies

Using Velox

Getting started

Velox library consist of two main scripts which can be used independently:

  • bootstrap.py - used to prepare the channels data for the actual tests
  • velox.py - used to run tests

velox.py implicitly calls bootstrap.py with all the necessary arguments, so there may be not be a need to call bootstrap.py independently, but nevertheless, it is possible.

You can run python src/velox.py -h or python src/bootstrap.py -h to see more info on the available command line options.

It should be possible to run velox script simply by:

python src/velox.py

as there are certain internal defaults defined.

Testing scenarios

To specify which testing scenario to run, -t or --test command line option can be used, e.g.:

python src/velox.py -t multiple_clients_multiple_resources

If no tests are specified as command line options, all tests within the scenarios directory will be ran.

All testing scenarios should be located within the scenarios directory. Each test scenario should be a python file and at minimum contain a function with the following syntax:

def run(base_url='http://kolibridemo.learningequality.org', learners=3):
    pass

Once ran, velox will try to load this module and execute its run function to launch the tests.

Configuration

Command line arguments have the highest precedence, but it is also possible to enable Velox settings module to be able to configure settings on a more permanent basis.

Configuration precedence list

  1. command line arguments
  2. settings module
  3. internally set defaults

Using the settings module

To enable the settings module simply copy the settings.example.py, rename it to settings.py and configure as per your development environment settings.

Default values

{
    'kolibri_dev': '',
    'kolibri_venv': os.path.join(os.path.expanduser('~'), os.path.join('.venvs', 'kolibri')),
    'kolibri_exec': '',
    'database': 'sqlite',
    'channel': 'multiple',
    'learners': 30,
    'classrooms': 1,
    'test': 'all',
    'iterations': 3,
    'db_postgresql_name': '',
    'db_postgresql_user': '',
    'db_postgresql_password': '',
    'db_postgresql_host': '127.0.0.1'
}

velox's People

Contributors

bonidjukic avatar jredrejo avatar

Watchers

James Cloos avatar Devon Rueckner avatar

velox's Issues

missing requirements file

The readme says to install postgres dependencies via

pip install -r requirements/postgres.txt

but this file doesn't exist

invalid package specified in requirements.txt

The requirements file tries to install pkg-resources==0.0.0

which results in the error

Could not find a version that satisfies the requirement pkg-resources==0.0.0 (from -r requirements.txt (line 1)) (from versions: )
No matching distribution found for pkg-resources==0.0.0 (from -r requirements.txt (line 1))
  • python version 3.6.5
  • pip version 10.0.1
  • macOS

This appears to be a bug in Ubuntu, and removing the pkg-resources allows installation to proceed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.