For stable usage of the application, python version 3.10.4 is recommended. Install python from the official website. Check your python version with entering your command promt and execute the following command:
python --version It is recommended to use a customized environment to ensure full functionality, e.g. with the distribution anaconda, which can be downloaded here.
Install the required packages with the following command in your command line interface (For more information about pip, please check the pip documentation):
pip install -r requirements.txt
First download the code by either downloading the .zip-File or clone it via the command promt. For more information about the later please check the github docs.
To run the application, either open the project with a python-IDE and run the file main.py or enter the following in the command prompt:
python main.py Or simply install the VS Code along with Python extensions and open the main.py then click on the play button that is at the top right corner of the screen on the top ribbon.
After following the steps above, you should be greeted with the following screen, which is the main menu of the application:
From here on, you can create new habits, search, update and delete existing ones, and analyse the habits. To navigate through the application, please use your up and down keys as well as the Enter button. If you want to close the application, either move the cursor to Quit the application and press Enter.
If you want to create new habits, select Create a new Habit in the main menu. The following step through will show you what to consider.
Choosing the first three options will require you to enter habit name, description and periodicity as shown in the following screenshot;
Whereas the fourth option, Load Predefined Data to the application, prints a list of predefined habits to the screen from which you can select a habit to load;
From the application main menu, selecting search an existing Habit will yeild following output where you will be asked to enter the name of the habit that you want to search. If search is found, following is outputted;
If in case the searched habit does not exist, following is the result;
To update habits, you need to choose Update an existing Habit option from the main menu. Then following update operations menu will be shown after the habits;
Among these options, Track/Complete will yield such a screen with the possible habits that can be updated and you are to select the one that you want to track;
The second option, Edit the contents will be shown with such a screen. Select your desired habit whose contents that you want to change;
And such an output will be generated when a habit is selected and the details to change are provided;
Existing habits can be deleted as well by choosing delete a habit option that results in such a screen;
Choose the habit that you want to delete, then such an output will be produced;
When the option Analyze the habits is selected, following menu is presented;
If you select Show all habits option, then all the habits along with their details are printed in a formatted tabular form as shown in the following screenshot;
If you select Show the habit with best streak option, then a single habit (whose best streak is the highest among all habits) along with its details is printed as shown in the accompanying screenshot;
If you select Show the most completed habit option, then a single habit (which has been completed most times) along with its details is printed as shown in the accompanying screenshot;
You can choose the option Clear all the data from the main menu to delete all the habits from the application. It produces the following output when selected;
You can quit the application by selecting the last option from the main menu, Quit the application. This results in following output;
To test the application, change in the directory unittest and run test_habit.py for testing the Habit class methods as the whole application is based on that class defined in habit.py file.