Giter VIP home page Giter VIP logo

winter-wedding's Introduction

Table of Contents

  1. Introduction

  2. User Experience (UX)

  3. Features

  4. Technologies used

  5. Deployment

  6. Testing

  7. Credits

  8. Acknowledgments

  9. Disclaimer


Winter Wedding RSVP

Live program

RSVP Tool image

Introduction


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.

User Experience (UX)


Project goals

  • 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

Target audience

  • Specific group of guests and their families who had been invited to a wedding
  • Wedding coordinator

User stories:

  • 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

Structure:

  • Flowchart

Flowchart image

  • Database Structure

Google Sheet with 2 worksheets: main and totals

Main worksheet

Main worksheet image

Totals worksheet

Totals worksheet image

Design:

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.

Features


Existing Features

  • Option to access the tool as a wedding guest (and RSVP) or the wedding coordinator (to preview summary of all RSVPs received)

    Start options image

  • Intro image and welcome message:

    Intro image

  • Series of questions with requests for user input that gets recorded on the Google Sheet

    RSVP response image

    Guest count image

    Diet choice image

    Responses are recorded on Google Sheet with 2 worksheets.

  • Checking for duplicated response attempt and printing back a message to the user

    Duplicated email image

  • Recording totals of RSVP details, tracking % of responses received and preparing a live admin overview

    Coordinator overview image

  • End message with option to start again

    End message image

Features to be implemented in the future

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

Technologies used


Deployment


Deploying to Heroku

Deployed program on Heroku

The project was developed in GitPod, committed to Git and pushed to GitHub. The site was deployed to Heroku with the following steps:

  1. In GitPod, import the required dependencies to the requirements.txt file, using

pip3 freeze > requirements.txt

  1. Git add, commit and push the saved changes to GitHub. Heroku will use this file to import the dependencies that are required.
  2. Sign up and log in to Heroku.
  3. On the dashboard, click New in the top right-hand corner and select Create New App.
  4. Select a unique name for your application and choose your region (Europe in my case).
  5. Click Create App.
  6. Navigate to the Settings tab (must be done before deploying code)
  7. Go to section Config Vars, click button "Reveal Config Vars" and press "Add" button
  8. In the "KEY" field: type "CREDS" (all capital letters) and in the "VALUE" field: paste the copied content of "creds.json" file from GitPod
  9. Click "Add" and add another key "PORT" and value "8000"
  10. 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)
  11. Navigate to the Deploy tab and scroll down to Deployment Method.
  12. Select GitHub as deployment method.
  13. Enter the name of the repository you want to connect to and click Connect.
  14. Select one of the deployment options - Automatic Deployments or Manual - to deploy the app.
  15. Once successfully deployed, a View button will appear and take you to a mock terminal.

Forking to GitHub Repository

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:

  1. Log in to your GitHub account
  2. On GitHub, navigate to the repository you want to fork
  3. In the top right corner of the page, underneath your profile avatar, click Fork
  4. You should now have a copy of the original repository in your GitHub account

Making a local clone

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:

  1. Log in to your GitHub account and locate the Winter Wedding repository
  2. In the repository, click on Code button located above all the project files
  3. Under HTTPS, copy the link generated (https://github.com/renatabiniek/winter-wedding.git)
  4. Open the terminal you're using, e.g. Gitpod
  5. Change the current working directory to the location where you want the cloned directory created
  6. Type git clone and then paste the URL you copied earlier:
    git clone https://github.com/renatabiniek/winter-wedding.git
  7. Press Enter to create your local clone.

You can also refer to this GitHub documentation for detailed instructions.

Testing


Testing Approach

  • 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.

User stories testing from the UX section

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

    RSVP start image

    Questions

    RSVP response image

    Guest count image

    Diet choice image

    End

    RSVP end image

  • 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.

    RSVP confirmation image

  • 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.

    Actions image

  • 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 format image

    Incorrect number of values entered

    Incorrect number image

    Number outside of the specified selection

    Incorrect kids count image

    At least 1 adult has to attend if the RSVP is Yes

    Incorrect adults count image

    Invalid input

    Invalid choice image

  • 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.

    Duplicated email image

  • 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.

    Coordinator overview image

Validator Testing

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:

PEP8 results image

Issues and Bugs

  • 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.

Credits

  • 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

Acknowledgments

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.

Disclaimer

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.

Back to top

winter-wedding's People

Contributors

renatabiniek avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.