Skip to content

samplackett/todo-list

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo List

Super simple todo app built in Python.

The instructions in this README file assume you are running the application on an Ubuntu or Debian machine.

Prerequisites

First, install pip:

sudo apt update
sudo apt install python3 python3-pip -y

Install the pip requirements (make sure you're in the repo root directory):

pip3 install -r requirements.txt

You need to set the database URI that the app needs to connect to and a secret key. This is done via environment variables.

export DATABASE_URI=[YOUR_DB_URI]
export SECRET_KEY=[YOUR_SECRET_KEY]

The secret key can be any value.

The Database URI can be set to an in-memory database using SQLite:

export DATABASE_URI=sqlite:///data.db

You will also need to run the create.py python script to generate the database schema.

python3 create.py

Running the App

Simply enter the following in your bash terminal:

python3 app.py

The website will be accessible on port 5000 on your machine's IP.

Make sure the machine's firewall rules allow network traffic on port 5000.

To stop the application, enter ctrl+C.

Testing the Application

Make sure the current working directory is this repository.

Install pytest:

sudo apt update 
sudo apt install python3 python3-pip -y
pip3 install pytest pytest-cov

Run pytest and generate test and coverage reports:

python3 -m pytest --doctest-modules --junitxml=junit/test-results.xml --cov=application --cov-report=xml --cov-report=html

This will generate reports that are readable by JUnit and Cobertura.

Look at this fork... in hell!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published