Winter Wedding RSVP tool is a terminal based application that allows users to RSVP to a wedding invite they had received. It works with Google Sheets to record and retrieve individual responses, as well as to calculate totals and return them to the wedding coordinator. The data can then be used for further planning linked to the event.
- to provide a tool for wedding guests they can use to send their RSVP
- to record their responses in an organised data file
- to track and monitor responses submitted
- Specific group of guests and their families who had been invited to a wedding
- Wedding coordinator
- as an invited guest, I want to be able to send my RSVP
- as an invited guest, I want to be able to see a confirmation of my responses
- as a user, I want to clearly understand what actions are required
- as a user, I want to be clearly notified about any errors during the RSVP process
- as a returning user, I want to be notified if my response had already been recorded and what it said
- as the wedding coordinator, I want to be able to access overview of RSVPs received
- Flowchart
- Database Structure
Google Sheet with 2 worksheets: main and totals
Main worksheet
Totals worksheet
As this is a terminal based application, the design is limited. I have kept the basic terminal colours and fonts as per the Code Institute's template used. The only addition to the design is the intro logo shown when the program starts. It illustrates the purpose of the tool and entices the user to interact with it.
-
Option to access the tool as a wedding guest (and RSVP) or the wedding coordinator (to preview summary of all RSVPs received)
-
Intro image and welcome message:
-
Series of questions with requests for user input that gets recorded on the Google Sheet
Responses are recorded on Google Sheet with 2 worksheets.
-
Checking for duplicated response attempt and printing back a message to the user
-
Recording totals of RSVP details, tracking % of responses received and preparing a live admin overview
-
End message with option to start again
Due to time constraints, I was unable to implement all planned features. In the future, I'd like to add the following:
- Option for the user to quit the RSVP flow - at the moment, they have to complete the selected flow or press Run Program button
- Option for the returning guest to cancel or amend their RSVP
- Automation to send out emails with confirmation to the guest and to the wedding coordinator using Zapier
- Add authorisation option to access the overview as the admin only
- Python - language used for this project
- Code Institute Template - to display and run the command line terminal in the browser
- Google Sheets - to store and organise data
- Google Cloud Platform - for APIs and credentials to access Google Sheets
- gsptread - to access, update and manipulate data from Google Sheets
- re - for regular expression to validate email syntax
- google.oauth2.service_account - to authenticate and authorize the application
- datetime - for creating the timestamp
- Lucidchart - to create the flowchart
- Heroku - for presenting the deployed project
- GitHub - for hosting the project code and version control
- Gitpod - to write the code and push it to GitHub
- PEP8 Online Validation Service - to validate the code
- Online-Spellcheck - to spellcheck the README
The project was developed in GitPod, committed to Git and pushed to GitHub. The site was deployed to Heroku with the following steps:
- In GitPod, import the required dependencies to the requirements.txt file, using
pip3 freeze > requirements.txt
- Git add, commit and push the saved changes to GitHub. Heroku will use this file to import the dependencies that are required.
- Sign up and log in to Heroku.
- On the dashboard, click New in the top right-hand corner and select Create New App.
- Select a unique name for your application and choose your region (Europe in my case).
- Click Create App.
- Navigate to the Settings tab (must be done before deploying code)
- Go to section Config Vars, click button "Reveal Config Vars" and press "Add" button
- In the "KEY" field: type "CREDS" (all capital letters) and in the "VALUE" field: paste the copied content of "creds.json" file from GitPod
- Click "Add" and add another key "PORT" and value "8000"
- Go to the Settings tab and scroll down to Buildpacks. Select and save: 'Python', then repeat and select and save: 'Node.js'. (has to be in this order, drag and drop if needed)
- Navigate to the Deploy tab and scroll down to Deployment Method.
- Select GitHub as deployment method.
- Enter the name of the repository you want to connect to and click Connect.
- Select one of the deployment options - Automatic Deployments or Manual - to deploy the app.
- Once successfully deployed, a View button will appear and take you to a mock terminal.
You can create a fork (copy) of the repository. This allows you to experiment with the code without affecting the original project.
To fork the repository:
- Log in to your GitHub account
- On GitHub, navigate to the repository you want to fork
- In the top right corner of the page, underneath your profile avatar, click Fork
- You should now have a copy of the original repository in your GitHub account
You can clone your repository to create a local copy on your computer. Any changes made to the local copy will not affect the original project. To clone the Winter Wedding project, follow the steps below:
- Log in to your GitHub account and locate the Winter Wedding repository
- In the repository, click on Code button located above all the project files
- Under HTTPS, copy the link generated (https://github.com/renatabiniek/winter-wedding.git)
- Open the terminal you're using, e.g. Gitpod
- Change the current working directory to the location where you want the cloned directory created
- Type
git clone
and then paste the URL you copied earlier:
git clone https://github.com/renatabiniek/winter-wedding.git
- Press Enter to create your local clone.
You can also refer to this GitHub documentation for detailed instructions.
-
I tested the program regularly during the development process. I relied on multiple print statements to understand which part of the code is getting executed and causes any potential issues. Once the app was deployed to the mock terminal on Heroku, I manually tested the program, by following all available user paths. Any issues found, were addressed at that stage and double checked before moving on with the rest of the project.
-
I tested input validation by:
- entering email address in incorrect format
- entering email address that already is on the Google Sheet
- entering values that don't match the expected values (response: Y/N, diet: V/VG/GF/S, end: W/C)
- entering incorrect number of guests (adults = 0 or > 2, kids > 6)
- entering guest data in incorrect format (not exactly 2 numbers separated by a comma)
-
The program has been tested on various browsers on desktop and mobile:
- Chrome
- Mozila Firefox
- Edge
- Safari
Although not responsive on mobiles, the program still is displayed and works as expected. The only issue on some mobile phones was with input autofill, where random characters where pre-populating in the input field. Once overridden, input was getting accepted.
I tested the program considering the user stories from the UX section as well.
-
as an invited guest, I want to be able to send my RSVP
Test result: PASS
User is led through a series of RSVP questions and their answers are recorded once they complete the path.
Start
Questions
End
-
as an invited guest, I want to be able to see a confirmation of my responses
Test result: PASS
Detailed confirmation of the responses is printed in the terminal at the end of the path.
-
as a user, I want to clearly understand what actions are required
Test result: PASS
Each question has clear instruction as for the details and format required, available options are clearly presented and user is informed how to select them.
-
as a user, I want to be clearly notified about any errors during the RSVP process
Test result: PASS
Each time incorrect value is entered, the user sees details of the error in the terminal, and has an option to enter data again until it's valid.
Incorrect email syntax
Incorrect number of values entered
Number outside of the specified selection
At least 1 adult has to attend if the RSVP is Yes
Invalid input
-
as a returning user, I want to be notified if my response had already been recorded and what it said
Test result: PASS
The program looks up the provided email address on the Google Sheet, and if email is already recorded, it informs the user and prints details of the RSVP in the terminal.
-
as the wedding coordinator, I want to be able to access overview of RSVPs received
Test result: PASS
Coordinator can request the overview that is calculated based on the current data on the Google Sheet. The overview is printed in the terminal.
I used PEP8 Online Validation Service to regularly check and validate the code. I've been resolving any issues as they come up. Main errors were to do with line length, white spaces, however there were also a few that caught invalid syntax and unused variables. The final validation result contains no errors:
-
This project is my first attempt at using Python, so I ran into multiple general issues with indentation, correct order of calling appropriate functions and if/else statement logic. I've managed to resolve them referring to course materials and researching online.
-
Issue with length of regex line: I used this advice from Stackoverflow to split the long expression
-
Request to input dietary requirements (get_diet()) was running even if the guest responded that they're not attending the event. This was due to the conditional statement in my main() function, where all other functions would run if the user was validated as new. I changed the logic and now when the RSVP is N, there are no further request for input.
-
sum() function wouldn't work properly at first when calculating total number of kids. This was due to empty cells in the column. I resolved this using list comprehension that would only get values from the column if there was a value in a cell. As this was used to simply sum the values, I didn't need to worry about the potential misalignment where row number might be important. I followed this post on Stackoverflow to achieve this.
-
Count of adults and children wasn't increasing as expected at one point - this was due to incorrect order of functions called in main(). The count functions use data from the main worksheet but were called before the current RSVP data was added to the main worksheet. Fixed the order of them to be called after the data is added.
-
Global variable rsvp_info: A number of issues resulted from me using a global variable rsvp_info that was collecting all individual inputs into an empty list. During the development, at one point a list of new responses was getting attached to the previous row of responses in the main worksheet. This happened after a while loop was added to display a final option to start the tool again. When user selected to start again, their responses were getting added to the existing list. This was solved by wiping the data in the rsvp_info list when program restarts. However, at the refactoring stage upon advice from my mentor, the global variable has been moved to run_selected_option() and linked functions have been refactored accordingly, so that response values keep getting appended to the empty list, but with the variable being local.
-
Known issue: There are multiple yellow warning messages in the terminal problems tab that relate to the image art used. Correcting them would distort the image so I left them as they are.
-
Love Sandwiches walk-through project by Code Institue has been used regularly as a reference when building this tool. Some code has been used and adjusted to fit the needs of this project.
-
Image for the welcome message from Ascii Art
-
Code to validate syntax of email address using regular expressions from this article on Stackabuse
-
Stackoverflow in general, for providing answers on multiple occasions. Especially, advice on how to split long regex from this post on Stackoverflow and this post on Stackoverflow to ignore empty cells in a column
Thank you to:
- My mentor Guido Cecilio for the invaluable support and feedback. I learned so much during our sessions!
- The community on Slack.
- My partner for continuous support.
This program has been created for educational purposes only, as part of Code Institute’s Python Essentials Portfolio Project 3. The requirements are to build a command-line application that allows your users to manage a common dataset.