codalab / chalab

1 stars 4 forks source link

Chalab

Requires:

For development (running the tests):

Structure

We use Celery + RabbitMQ to schedule long running tasks like creating the bundles.

Local Dev

The most straightforward way to run chalab is to use docker and docker-compose. It will start the system (database, server, etc) automatically.

Then you can run the tests on your local machine (non-dockerized) to get assistance from your IDE. As of now it's not possible to run the tests inside Docker (Pull-Requests are welcome!).

Start the server:

In the chalab folder,

make dev

It downloads all the containers & dependencies then start the containers. Access the app at http://localhost:8000/. Kill it (ctrl-c) then re-run make dev to rebuild the container and apply db migrations.

Management

Datasets

Chalab comes with a few datasets by defaults, we don't store them in the git repository.

Note that you should these commands only once or you'll have duplicates.

Testing: setup

Install django, selenium & other dependencies locally.

# in your venv:
pip install -r requirements.txt

Run the tests

# while the server is running using `make dev':
make test

# clean the data produced by tests
make clean

Deployment

Pull the repo, copy the example.env to .env, then adapt it to your system. Then run make prod

Both will be ready to be accessed behind a reverse proxy such as nginx (standard gunicorn setup).