GithubHelp home page GithubHelp logo

bike-rental-company's Introduction

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.


Design

Class diagram

alt text

Guidelines

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.


Development practices

  • UML.
  • PEP8 for naming, documenting and formatting conventions.
  • TDD.
  • SOLID principles.

How to run the tests

  1. Install pipenv and git. For instance on Fedora they can be installed running:

    sudo dnf install pipenv git

  2. Clone this repository and cd to its dir.

    git clone https://github.com/Asta1986/bike-rental-company.git

    cd bike-rental-company

  3. Create a virtual environment and install dependencies.

    pipenv install

  4. Run tests with coverage report.

    pipenv run pytest --cov-report term-missing --cov=bike_rental/ tests/

Output should look like this: alt text

Alternative method if pipenv cannot be installed.

  1. 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

  2. Run tests with coverage report.

    pytest --cov-report term-missing --cov=bike_rental/ tests

  3. Exit the virtual environment's shell.

    deactivate

bike-rental-company's People

Contributors

lfir avatar

Stargazers

errir avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.