Skip to content

Dayana-N/inventory-management-PP3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inventory Management

Image of the app

Inventory Management is a software program developed to facilitate the management of serialized inventory for businesses. This application is specifically tailored for businesses that utilize stock with unique serial numbers. The implemented features allow the user to efficiently add, search, view, change location, and delete stock from the system. These capabilities prove particularly valuable to businesses that install equipment in various locations and rely on engineering services to do so, as the program enables them to keep track of the precise location of each item.

Table Of Content


User Experience

User Stories

  1. As a warehouse manager, I want to easily add new items to the inventory system, so that I can keep track of all the items that we have in stock.
  2. As a warehouse manager, I want to be able to search for specific items in the inventory system, so that I can quickly locate items when I need them.
  3. As an engineer, I want to be able to update the location of items in the inventory system, so that I can keep track of the location of items that I need to use in the field.
  4. As a warehouse manager, I want to be able to view all stock in the inventory system, so that I can have a comprehensive overview of all items in stock.
  5. As an inventory manager, I want to be able to delete items from the inventory system, so that I can remove items that are no longer in use or have been added incorrectly
  6. As an inventory manager, I want to be able to ensure that duplicate items are not added to the inventory system so that I can maintain an accurate and efficient inventory.

Goals

  1. Develop a feature to enable the user to easily add new items to the inventory system
  2. Develop a search feature to enable the users to quickly and easily locate items in the inventory system
  3. Develop a feature that enables users to easily change the location of items in the inventory system
  4. Enable users to delete items from the inventory system in a simple and efficient manner, ensuring the inventory remains up-to-date and accurate.
  5. Develop a feature that allows users to easily view all of the stock in the inventory system or refine by location, making it easy to keep track of inventory in different locations.
  6. Develop a feature that prevents the addition of duplicate items to the inventory system
  7. Develop easy to navigate menu
  8. Add instructions on how to use the application

Scope

Required functionality:

  1. Easy-to-navigate menu
  2. Add stock feature which allows the user to input the name of the item, serial number, location, and location name
  3. Search the inventory by serial number and only add stock if it does not exist already
  4. Display all stock or by location feature
  5. Search the inventory by serial number and display all the information for this item
  6. Change the stock location feature
  7. Delete stock from the system
  8. Display instructions on how to use to program

Design

Colour Scheme

The main text colour is the standard white colour.
Red colour was used to highlight invalid input and warning messages.
Green colour was used to highlight success messages

Flowchart

The flowchart for the program was created by diagrams.net

Flowchart Image

flowchart

Features

Welcome Screen

The welcome screen is displayed when the program runs. It uses ASCII art to surround the welcome message.
welcome screen

Main Menu

The main menu is displayed when the program runs initially and when the user selects the main menu option from another menu. This menu allows the user to access the program's functionalities.
main menu

C - Add stock

This option allows the user to add stock to the inventory system. The following steps are required to add stock. The user must input a name, serial number, stock location, and location name. Each input is validated and it will display a warning message to the user with guidelines for the input requirements. The user is presented with three possible locations for the serial number entered.

  1. Warehouse - This location has two options:
  • Good - This is where all good stock is stored
  • Bad - This is where faulty, broken stock or returns are stored
  1. Job/Site - This is the location where the stock was installed
  • The user must enter the name of the job.
  1. Engineer - This location is selected when the stock is added to the engineer's inventory
  • The name of the engineer holding the stock must be entered.

add stock
The program will then check if this serial number already exists. If it doesn't exist will display all of the details entered in green with a success message and will add the serial number. If the serial number already exists a message in red will appear to warn the user that this serial number is already on the system and will redirect back to the main menu.

V - View Stock

This option allows the user to view the current inventory by location or all stock. The data is presented in an easy-to-read table. view stock
The user has the option to go back to the view menu or back to the main menu.

S - Search and edit

This option allows the user to search the system by serial number.

  1. If the serial number doesn't exist on the system the user will be presented with a message in red advising that this serial number wasn't found. The user will be redirected to the main menu. search result not found
  2. If the serial number exists on the system, the data will be displayed in a table. The user will be presented with a menu that will allow them to search again, edit, delete, or go back to the main menu. search result found
  • The search again option will bring the user back to the search screen and will ask for the serial number.

E - Edit stock location

The edit stock location will allow the user to change the location of the stock. It will require location input followed by location name. If the input is valid the user will be presented with a success message with the new details saved on the system. The user can either search again or go back to the main menu. edit stock location

D - Delete

The delete option will ask the user for confirmation if they wish to delete the serial number from the system. Once the user presses Y the data is deleted permanently. delete stock

  • The main menu option brings the user back to the main menu.

I - Instructions

This option will print to the user the instructions on how to use the application with the typewriter effect. Then the main menu is displayed. instructions

Q - Quit

The user will be asked for confirmation if they wish to quit.

  • Y exits the program
  • N brings the user back to the main menu. quit

Future Features

  • I would like to use a database to store all the data.
  • I would like to implement a feature showing stock movements for each serial number.
  • I would like to build a front end for this application for easier navigation through the features

Testing

Testing documentation can be found under Testing.md

Bugs

  1. During the testing stages of the application an infinite loop was discovered when invalid input was entered. The message invalid input kept printing. This was resolved by printing the menu options within the while loop.
  2. Before a new serial number is added, the system will loop through each spreadsheet and search if the serial number exists and will update a variable with the result. I was getting incorrect results due to the fact that the variable was updated on every loop and if the serial number is not found in the last spreadsheet then the variable is updated as not found. This was resolved by adding a condition to update the variable only if the result is not none. The screenshot attached shows the value of the variable changing on each loop. Further tests confirmed that the issue was resolved bug

Storage Data

The application uses Google Sheet API or Gspread to store and manipulate the data. The spreadsheet consists of three worksheets - one for each location. Every time a new entry is added a row with the information is added to the corresponding spreadsheet. When the user selects the option to change the location of an item, the program will update the changes and will check if the data is in the correct worksheet. If it is in the wrong worksheet the app will move it to the correct one and delete the original to avoid duplicates.
GSpread

Technologies And Languages

Languages Used

  • Python
  • CSS to add style to the body of layout.html

Python Modules

  • Gspread - to access Google Sheets and edit data
  • Google auth - was used for authentication with Google APIs using credentials.
  • Sys - to call specific functions that allow displaying the text with a typewriter effect
  • Time - to add a sleep function between displaying each character
  • Re - to create a regex pattern for input validation
  • Rich - to create tables and add colour to text

User-defined modules

  • app_text - was used to store the welcome screen ASCII and the instructions on how to use the application.

Technologies and programs

  • GitHub is the hosting site used to store the code for the website.
  • Git was used as a version control software to commit and push the code to the GitHub repository.
  • Heroku was used to deploy the application
  • CI Python Linter was used to validate the python code
  • Diagrams.net was used to create the flowchart
  • CI Template was used as a starting point for the project
  • Black was used as code formatter

Deployment

Before Deployment

To ensure the application is deployed correctly on Heroku it is mandatory to update the requirements.txt. This is a list of requirements that the application needs in order to run.

  • To create the list of requirements we use the command pip3 freeze > requirements.txt. This will ensure the file with the requirements is updated.
  • Then commit and push the changes to GitHub.

Deployment on Heroku

  • To deploy the project on Heroku, first create an account.
  • Once logged in, create a new app by clicking on the create app button
  • Pick a unique name for the app, select a region, and click create app.
  • On the next page select the settings tab and scroll down to Config Vars. If there are any files that should be hidden like credentials and API keys they should be added here. In this project, there are credentials that need to be protected. To do this I have created a config var and added CREDS as the key and the content of the creds.json file as a value.
  • Scroll down to Buildpacks. The buildpacks will install further dependencies that are not included in the requirements.txt. For this project, there are two buildpacks required - Python and Nodejs.
  • From the tab above select the deploy section.
  • The deployment method for this project is GitHub. Once selected, confirm that we want to connect to GitHub, search for the repository name and click connect to connect the Heroku app to our GitHub code.
  • Scroll further down to the deploy section where automatic deploys can be enabled, which means that the app will update every time code is pushed to GitHub. Click deploy and wait for the app to be built. Once this is done, a message should appear letting us know that the app was successfully deployed with a view button to see the app.

This application was deployed Here

Creating a fork

  1. Navigate to the repository
  2. In the top-right corner of the page click on the fork button and select Create a fork.
  3. Change the name of the fork and add a description
  4. Choose to copy only the main branch or all branches to the new fork.
  5. Click Create a Fork. A repository should appear in your GitHub

Cloning Repository

  1. Navigate to the repository
  2. Click on the Code button on top of the repository and copy the link.
  3. Open Git Bash and change the working directory to the location where we want the cloned directory.
  4. Type git clone and then paste the link.
  5. Press Enter to create our local clone.

Credits

Media

Code

  • Learned how to use the typewriter effect within the terminal from Stack Overflow
  • The ASCII art was inspired by this project and then modified to the application's needs
  • Learned how to use Regular Expressions Here and Here
  • Learned how to use Google auth and gspread from the Love Sandwiches walkthrough project

Acknowledgements

A huge Thank You to my mentor Ronan McClelland for all the brilliant advice and resources and to the Slack Community for their feedback and support

Comments

The idea for this project came from my previous job where we used a custom-build system to manage stock, job orders, engineer details, and various other tasks. This project was developed solely from my concept and without any assistance from tutorials. I am very happy with the end product, which is a completely operational application that can be used in a real-world setting. It was a great learning experience and I am looking forward to the next project.

About

Python Application for managing serialized inventory portfolio project 3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published