Best Flask open-source libraries and packages

Gudlft

Project 11 OpenClassrooms Path - Gudlft -- Improve a Python web application through testing and debugging
Updated 2 months ago

Gudlft

Description:

Project 11 OpenClassrooms Path - Gudlft -- Improve a Python web application through testing and debugging

Güdlft is a company that has created a digital platform to coordinate strength competitions. Güdlft has set up a team called Regional Outreach to create a lighter (and cheaper) version of their current platform for regional organisers. The aim of the application is to streamline the management of competitions between clubs.

The prototype is stored in this GitHub repository. In the issue section of this repository are bugs to fix and features to implement. The second step is to create functional and integration tests to make sure the functionality.

To implement unit tests, in branch modification/server I add functions to be able to make unit tests for a single function. In branch tests/server there are several unit tests. These two branches are not integrated into QA or main.

Installation:

open terminal

  1. clone the repository:
    git clone https://github.com/DoriDoro/Gudlft.git
  2. go to folder:
    cd Gudlft
  3. install the virtual environment:
    python3 -m venv venv
  4. activate the virtual environment with following command:
    • on MacOS and Linux: . venv/bin/activate
    • on Windows: venv\Script\activate
  5. install all dependencies with:
    pip install -r requirements.txt
  6. run the server with:
    export FLASK_APP=server
    export FLASK_ENV=development
    flask run
    

Testing:

To run all the tests use:
pytest

  • If you want to check one folder use (example):
    pytest tests/integration_tests/
  • If you want to test one file use (example):
    pytest tests/functional_tests/test_book.py

check the coverage of testing:
installed package:
pytest-cov
(This plugin produces coverage reports)

  • use this command to check the coverage:
    pytest --cov=Python_Testing tests/
  • to create the report use:
    coverage html

Results of testing: result testing

Skills:

  • Implement a Python test suite
  • Handling errors and exceptions in Python
  • Configure a Python environment
  • Debug the code of a Python application

Visualisation:

1. Home Page
home page

2. Dashboard
Dashboard

3. Show Summary
show summary

4. successful purchase of places
successful purchase

5. Error when purchase more than 12 places
Error 12 places

6. Error when purchase more places than points available
Error more places than points

7. Error when competition is over
Error competition over