Installation

Scrooge contains ralph in its requirements, because it is a plugin for ralph. For more information on how to configure or install ralph, please refer to its documentation.

Install Scrooge

There are two ways to install Scrooge. One of them is a simple pip installation which is nice and easy. Installation from sources require Scrooge to be downloaded from github and then, installed manually

Install Scrooge from pip

A fast and easy way is to install Scrooge from pip:

(scrooge_env)$ pip install scrooge

That’s it.

Install Scrooge from sources

It is also possible to install Scrooge from sources. To do this, first, you need to download Scrooge from github:

(scrooge_env)$ git clone git://github.com/allegro/ralph_pricing.git ralph_scrooge

Enter to the project folder:

(scrooge_env)$ cd ralph_scrooge

and install it:

(scrooge_env)$ pip install -e .

The Scrooge requirements will be installed automatically

Upgrade existing installation

To upgrade Scrooge, you need to stop any Scrooge processes that are running. It is good practice not to upgrade the old version, but create a separate virtual environment and install everything from the begin, but if you need to upgrade the old version, be sure that everything is stopped.

Upgrade Scrooge from pip

If you installed Scrooge from pip, then you can simply:

(scrooge_env)$ pip install --upgrade scrooge

After it is finished, upgrade the static files:

(scrooge_env)$ scrooge collectstatic

Upgrade Scrooge from sources

First, you need to download Scrooge from github:

(scrooge_env)$ git clone git://github.com/allegro/ralph_pricing.git

Enter to the project folder:

(scrooge_env)$ cd ralph_scrooge

and upgrade it:

(scrooge_env)$ pip install --upgrade -e .

Finally, you need to upgrade the static files:

(scrooge_env)$ scrooge collectstatic

Migrate the database

Some of updates require database migrations. To migrate a database, you need to run:

(scrooge_env)$ scrooge migrate ralph_scrooge

Be sure that you have a backup of your database. Sometimes you can migrate data or create some complicated and unwanted changes.

Update the settings

Some new features added to Ralph may require additional settings to work properly. In order to enable them in your settings, follow the instructions in the change log for the version you have installed.

Testing if it works

To be sure that everything work fine, is recommended to run unit tests. To do this, run:

(scrooge_env)$ test_scrooge test