retail-aggregator

Python 3.7 Actions Status

Documentation

Please check the Wiki page for the documentation.

Note: In order to run the application, you will need docker. Or install manually MongoDB and the required python packages from the requirements.txt file. Also, you'll need to change the URI for the MongoDB connection in mongoConnector.py and sparkAggregator.py files.

Installation

Run the following command:

$ sudo docker-compose up

This will build your application container and will locate the necessary files under the app directory. Also, it will pull and run the mongo image.

In a new terminal run:

$ sudo docker-compose run retailapp /bin/bash

Now you'll run inside the docker container and you will be able to execute the application.

Execution

From the app directory navigate to the src directory and run retailAggregator.py by giving as an argument the path to your xlsx file.

$ cd src/
$ python retailAggregator.py ../resources/Online\ Retail.xlsx

Connect with Robomongo to localhost to see the results.

Pytest

From the app directory navigate to the test directory and run the pytest command

$ cd test/
$ python -m pytest --cov=../src