Skip to content

zucler/Parker

Repository files navigation

CarParker

CarParker is a web based searching engine to facilitate drivers to quickly find a parking with acceptable rates. It crawls the web to build up an up-to-date database of parking rates which is then used to serve search results to end users.

Getting started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisities

You need to have Docker Engine and docker-compose installed.

Installing

Create a new file parker/settings.py.

Copy the contents from parker/settings.default.py into the new file.

Alternatively, on Unix/Linux systems you can simply create a symlink by running.

ln -s parker/settings/default.py parker/settings.py

Start docker containers

docker-compose up -d

Attaching to app container

In order to run any commands and test your code, you need to be attached to the main app container. In order to do so, execute

docker exec -i -t carparker_parker_1 /bin/bash

Downloading rates

Run the following command in order to download HTML cache for all known carparks.

python3 scripts/downloadParkingRatesHTML.py

Run the following command to process and store the cached rates.

python3 scripts/loadParkingRates.py

Running the tests

Tests are located in parker/tests/.py*.

To execute test run:

./runtests.sh

Backing up database

If any changes has been made to the data in database, they need to be backed up manually in order to not get lost. It can be done by running a backup_db.sh script from the main app container.

Versioning

Used SemVer for versioning. For the versions available, see the tags on this repository.

Authors

  • Maxim Pak - Initial idea & work - zucler
  • Stepan Tsymbal - Greatest contributor - ouvtk

License

Copyright (C) Maxim Pak - All Rights Reserved