This repository contains modules with classes and tests for a program that models the system of a company used to register rentals, written in Python 3.
Class-based design with mainly composition and collaboration relations between objects. Also inheritance was used with strongly related classes.
Abstract base classes were used to declare and enforce the minimum required interface for the system and the separation of responsibilities.
- UML.
- PEP8 for naming, documenting and formatting conventions.
- TDD.
- SOLID principles.
-
Install pipenv and git. For instance on Fedora they can be installed running:
sudo dnf install pipenv git
-
Clone this repository and cd to its dir.
git clone https://github.com/Asta1986/bike-rental-company.git
cd bike-rental-company
-
Create a virtual environment and install dependencies.
pipenv install
-
Run tests with coverage report.
pipenv run pytest --cov-report term-missing --cov=bike_rental/ tests/
-
After cloning the repository and changing to its directory run the following commands to create a virtual environment and install dependencies.
python3.7 -m venv br_virtenv
source br_virtenv/bin/activate
pip install pytest-cov
-
Run tests with coverage report.
pytest --cov-report term-missing --cov=bike_rental/ tests
-
Exit the virtual environment's shell.
deactivate