This Student Data program is useful for teachers or administrators to manage student records easily. They can add new student data, view existing data, and have it all organized neatly in a Google Sheet.
It is built using Python and runs through the Code institute mock terminal on Heroku.
Welcome to Student Data
As a user, I want to be able to:
- As an administrator, I want to add a new student's data so that their information is stored in the system.
- As a teacher, I want to view a list of all student data so that I can have an overview of all students in the system.
- As a teacher, I want to calculate a student's average grade so that I can assess their performance in the course.
- As a teacher, I want to filter students by lesson so that I can view the performance of students in a specific lesson.
- As an administrator, I want to update a student's information so that the data in the system remains accurate.
- As an administrator, I want to delete a student's data so that their information is removed from the system.
The site aims to:
- Users can input student information, including name, surname, lesson, and exam scores.
- Users can list and display student data from Google Sheets worksheet.
- Describes how the program saves the entered student data to the worksheet.
- Users are encouraged to provide feedback or report issues for program improvement.
To achieve the above, the site will:
- When the user enters information that is not valid, a message should appear on the screen explaining what to do and how to continue.
- Create an option so that the user can check the information they enter.
- Provide the user with the opportunity to easily view and delete the information they enter.
I created the following flow chart using [lucid charts] (https://www.lucidchart.com/) to outline the necessary steps for programming the student data recording system.
This Python program allows users to manage and record student data using Google Sheets. The features included in this programme are listed in the main menu and they can be seen below:
When the user selects the add new student option, the program will be asked to enter student information.
- The program can list and display student data from the Google Sheets worksheet.
- Accordingly, the student's name, surname, course, and average exam scores are reflected on the screen.
- The system automatically calculates the student's status (Pass/Fail) based on their exam scores.
Utilizes Google Sheets API for data storage and retrieval.
Input validation ensures correct data entry, prompting users when invalid input is provided.
Users can select from a list of predefined lessons: English, Science, Math, and History.
The program provides feedback on successful data entry and error messages for invalid inputs.
Users can exit the program at any time.
Here are some potential improvements and features that I could add to enhance the functionality of the program:
-
User Authentication: I can implement user authentication to ensure only authorized users can access and modify student data.
-
Search and Filter: I can add functionality to search for specific students or filter students by criteria such as lesson, score, or status.
-
Update and Delete: I can include options to update and delete student records directly from the program interface.
-
Data Visualization: I can integrate data visualization tools to create charts and graphs for better data analysis and insights.
-
Email Notifications: I can send automated email notifications to teachers or administrators for important events, such as new student entries or low scores.
-
CSV Import/Export: I can allow users to import student data from CSV files and export data to CSV for easy sharing and backup.
-
Mobile App: I can develop a mobile app version of the program for convenient access on smartphones and tablets.
These enhancements could make the program more versatile, user-friendly, and efficient for managing student data.
I have used several technologies that have enabled this design to work:
- The entirety of the code in this application is composed using Python as the fundamental programming language, ensuring its complete functionality.
- In addition to core Python I have used the following Python modules:
- Gspread
- Used to access my google sheets document throughout the application, to access and edit data.
- Google Auth
- Used to provide access to the application to interact with my google sheet.
- Gspread
- In addition to core Python I have used the following Python modules:
- GitHub
- Used to store code for the project after being pushed.
- Git
- Used for version control by utilising the Gitpod terminal to commit to Git and Push to GitHub.
- Gitpod
- Used as the development environment.
- Heroku
- Used to deploy my application.
- Lucid
- Used to create the flowchart for the project.
- Grammarly
- Used to fix the grammar errors across the project.
- Google Sheets
- Used to store the 'Contacts' data used for the application.
- Pep8
- Used to test my code for any issues or errors.
I have written my testing in a different file for both during-development and post-development called TESTING.md .
For this project to function, I imported the following libraries:
- gspread: Used for accessing Google Sheets API.
- google-auth: Provides authentication credentials for accessing Google APIs.
The project was deployed to Heroku
- Log in to Heroku or create an account if required.
- Click on the dashboard from the hamburger menu on the top right to be navigated to the apps page.
- Click the new button on the top right of the page.
- Select the "create new app" option.
- Enter the app name. I named mine student-data (this has to be unique).
- Once Heroku accepts the app name select your region.
- Click the purple Create app button when you are ready to proceed.
- This will bring you to the project Deploy tab. From here, navigate to the settings tab and scroll down to the Config Vars section.
- Click the button labeled Reveal_Config Vars, Enter the key as Port, the Value as 8000 and Click the add button.
- Scroll down to the buildpacks section of the settings page, click the button labeled Add buildpack, select Python, and click Save Changes.
- Repeat step 10 but this time add node.js instead of python.
- Remember to keep the buildpacks in the correct order, Python first and Node second.
- Scroll back to the top of the settings page, and navigate to the Deploy tab.
- From the deploy tab select Github as the deployment method.
- Confirm you want to connect to GitHub.
- Search for the repository name and click the connect button next to the intended repository.
- From the bottom of the deploy page select your preferred deployment type by following one of the steps below:
- Clicking either "Enable Automatic Deploys" for automatic deployment when you push updates to GitHub.
- Select the correct branch for deployment from the drop-down menu and click the "Deploy Branch" button for manual deployment.
To deploy my command-line interface application, I had to use the Code Institute Python Essentials Template, as this enables the application to be properly viewed on Heroku using a mock terminal.
- Click the
Use This Template
button. - Add a repository name and brief description.
- Click the
Create Repository from Template
to create your repository. - To create a Gitpod workspace you then need to click
Gitpod
, this can take a few minutes. - When you want to work on the project it is best to open the workspace from Gitpod (rather than Github) as this will open your previous workspace rather than creating a new one. You should pin the workspace so that it isn't deleted.
- Committing your work should be done often and should have clear/explanatory messages, use the following commands to make your commits:
git add .
: adds all modified files to a staging areagit commit -m "A message explaining your commit"
: commits all changes to a local repository.git push
: pushes all your committed changes to your Github repository.
Forking the GitHub Repository
If you want to make changes to your repository without affecting it, you can make a copy of it by 'Forking' it. This ensures your original repository remains unchanged.
- Find the relevant GitHub repository
- In the top right corner of the page, click the Fork button (under your account)
- Your repository has now been 'Forked' and you have a copy to work on
Cloning the GitHub Repository
Cloning your repository will allow you to download a local version of the repository to be worked on. Cloning can also be a great way to backup your work.
- Find the relevant GitHub repository
- Press the arrow on the Code button
- Copy the link that is shown in the drop-down
- Now open Gitpod & select the directory location where you would like the clone created
- In the terminal type 'git clone' & then paste the link you copied in GitHub
- Press enter and your local clone will be created.
- Google Sheets API Utilizes for storing and retrieving student data.
- lucidchart.com was used to create the programme flow chart "student-data-flowchart.png"
- Code Institute's LMS (Learning Management System) for teaching me Python to begin with.
- Peer-code-review channel in Code Institute's Slack community for helping me find bugs and issues. Python tips book helped me gain knowledge about Python I otherwise would not have obtained.
- PEP 8 – Style Guide for Python Code It was used when fixing errors in Python codes.
I would like to thank my course mentor Tim Nelson, for his support and guidance throughout the course of the project and my peer Ilyascan Olgun for their support & feedback.