A CLI program able to view, add, rename and delete products, couriers, orders from a list of dictionaries persisting the data.
Table of Contents
This CLI project began my journey of programming from a beginner level, polishing my skills along the way, getting a good grasp of the basics of Python and most importantly shining a light on unit testing a concept that was very new to me but made complete sense when brought to my attention.
My approach to this project took strong inspiration from the term clean code, I did everything in my effort to avoid "redundant code" whilst ensuring idempotency was achieved in all aspects. Following the user's input, a set of simple menus appear similar in functionality and appearance forming the backbone of the application. Effortless transition can be made to and from these menus with respect to the users commands. Alteration of the specs of the code on a weekly basis, imitated the working environment of collaborating with clients which brought about feelings of uncertainty as to how the final product would turn out. Many times over the course of the 6 weeks, time spent on implementing ideas were removed in their entirety however, the skills learned from the initial implentation were retained. In addition to learning new programming skills, certain practices were also acquired through refactoring and simplifying code. As seen in the roadmap section, the clients specifications were given. From here a pseudocode can be made and then used to create the final program.
With more time I'd like to implement week 5 and 6 of the clients spec but, with the current iteration of the program it would greatly benefit from implementing try-except blocks for when the user is asked to enter a value requiring a certain datatype.
Python 3.10.7
The implementation of the "courier menu" brought me great joy due to realising this functionality was a duplicate of the "product menu". By quickly realising this, I was able to modify my current "product_menu" function using f strings to use the words 'product' and 'courier' interchangeably while also providing the function with either a products list or a couriers list.
- Clone the repo
git clone [email protected]:Numan-M/Cafe.git
- Create a virtual environment
python3 -m venv venv source ./venv/bin/activate
- Install dependencies
pip install -r requirements.txt
-
- Display
-
- Add
-
- Rename
-
- Remove
-
- Display
-
- Add
-
- Rename
-
- Remove
-
- Display
-
- Add
-
- Update status
-
- Update all
-
- Cancel
-
Week 1
As a user I want to: create a product and add it to a list view all products STRETCH update or delete a product
-
Week 2
As a user I want to: create a product or order and add it to a list view all products or orders STRETCH I want to be able to update or delete a product or orde
-
Week 3
As a user I want to: create a product, courier, or order and add it to a list view all products, couriers, or orders update the status of an order persist my data (products and couriers) STRETCH update or delete a product, order, or courier
-
Week 4
To show that our code works, we will also need to write unit tests to prove that our app works correctly. As a user I want to: create a product, courier, or order dictionary and add it to a list view all products, couriers, or orders update the status of an order persist my data STRETCH update or delete a product, order, or courier BONUS list orders by status or courier
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Numan Mahmood - LinkedIn - [email protected]
Project Link: https://github.com/Numan-M/Cafe
- Patrick Cando
- Carlton Nunes Desouza
- Sheikh Osman
- Faaruq