live link is here Auto Pay Tracking App
My Pay Tracker app is a python terminal project, which aids users to track their worked hours and how much they are due to be paid for that day. This app is targeted at average hospitability, workers, care worker or someone who is in need to track a dayshift which is paid hourly with unpaid breaks. Users enter the of there shift, start time, end time, breaks and hourly wage. The application will return to the user how much they are due to be paid for the day shift. It will also log it to a google sheet for storage. The user has the option to recall the last 7 entries. This is ideally so the user can pull the last weeks’ worth of data and check their pay., worked hours and breaks. The user follows the prompts to get to the calculated results. I designed this application with someone like me in mind. After a few work collages and I were paid incorrectly. I started to track my worked hours. I needed to track my working hours for each day and calculate my days pay. I created an excel spreadsheet and had to manually enter the data and set the functions for each item list I wanted to enter. This was taking a bit of time, was really small on my phone. I thought this would be easier if there was an application to do the work for me and possibly an application my work collages could use to track their own working days too.
When the program is loaded
The user can see a welcome message with prompts for the user to follow.
At this stage, the user will need to enter a valid date. This cannot be in the future, as the app is tracked worked days only. The app will only take data that is less than 5 years old. This app is designed for more current data, not historical dates. For this reason, I set the limit for no more then 5 years past.
After you enter a valid date, the user is asked to enter a start time followed by an end time These need to be with the 24-hour format and must run within that daytime frame, it does not support night shifts.
Now the user is asked to enter their break duration. This app will deduct the break time form the total worked hour to calculate their pay. If someone’s breaks are paid, then this app is not for that type of user.
From here the user is asked to enter their hourly wage. I set a limit of £1-250. This helps stick to the applications targeted audience.From here the data is logged to the google sheet and the user is given the option to enter more shifts. If the user enters no, they can check the last 7 entries then exit the application.
I brainstormed using lucid chats to understand what I need to do and how to get the idea into working code.
On the google sheet there is a work sheet called commission. I would like to add code to have the user enter how much commission they did earn on each shift.
I have manually tested the project by doing the following:
- Passed the code through a PEP8 linter and confirmed there are no problems.
- Tested in my local terminal and within the Heroku terminal.
- Made sure invalid user inputs are identified and promoted to be corrected.
- Users were being able to enter times that were outside a 24-hour time frame, that resulted in negative hours worked and a negative pay amount. I correct this by checking the start time is before the end time and shifts are within the same 24-hour time frame.
- You could enter a longer break time then the length of the shift time. I corrected this by setting a realistic break time limit of 120 minutes.
- You could enter white space in the inputs and crash the programme. I made sure to add if/else statements to check for white space and loops to make sure the user enters the correct data.
- After passing my code through a PEP8 check, I somehow created errors in my loops. I had to check each one and find the errors and rewrite the simple mistakes and pass the code back through PEP8.
- Fork or clone this repository.
- Make sure you create a requirements.txt. for your dependencies
- Your code must be placed in the `run.py` file.
- Push to GitHub.
- Sign into Heroku or create an account.
- Create a new Heroku app.
- Set up configuration Variables.
- Make sure to add key as ‘port’ and value is ‘8000’.
- Set the buildpacks to Python 1st and NodeJS 2nd.
- Connect GitHub repository.
- Link the Heroku app to the repository.
- Choose deployment method, this can be manual or automatic.
- Click on Deploy.
Content – The content, idea, and code to make the project was created by myself. I sourced help from online platforms like YouTube to search for coding problem solving and more python coding videos to help me problem solve, I found Kayle Yang was really helpful. I would like to thank Google for making the APIs and Google Worksheets for making the project possible. I would like to thank my Mentor Juilia, She has guided me through this project.