Skip to content

jonathancychow/countdown

Repository files navigation

Countdown Application with Web UI Control

You could see the demo video here:

There are two parts to this project:

  1. Display
  2. Flask server that control the content for the html above.

Prereq

  • If you are runing the flast server on a raspberry pi, please see instruction below for chromedriver installation, see this link.

Python Library Installation

  • Run the command prompt with admin privilege and install the Python package Poetry as follow:
pip install poetry
  • Restart the command prompt and cd to the repo directory
  • Install the required libraries by invoking poetry
poetry install 

Environment

Environment variables for Flask

cp .env.copy .env

Start up script

chmod +x start_clock.sh

Test

Static code analysis - lint

This step verifies the code style of the project and makes sure that common inconsistencies are avoided. You can easily check for common bugs and also improve the readability of the code.

poetry run flake8

Autoformatting:

poetry run black {directory or folder}

Unit and functional testing - test

Testing verifies the functional requirements of the application. Pytest is used but this is configurable by the developer in case a different framework is needed.

poetry run pytest

Get Going

Start the flask server with the following command:

./start_clock.sh

Credit

Countdown clock credit to this project.

Releases

No releases published

Packages

No packages published

Languages