This is an example software for a pizzeria that takes customizable orders.
You will need the following general tools:
-
A Python interpreter installed. 3.9.13 is preffered.
-
A text editor: preferably Visual Studio Code
-
Extensions such as Python and Live Server
- Clone the repo
git clone https://github.com/luisprgr/python-pizza-planet.git
- Create a virtual environment in the root folder of the project
make create-venv
- Activate the virtual environment (In vscode if you select the virtual env for your project it will activate once you open a new console window)
For linux/MacOS users:
source venv/bin/activate
For windows users:
\path\to\env\Scripts\activate
- Install all necessary dependencies:
make install-requirements
- Start the database (Only needed for the first run):
make start-database
- Seed the database (Only needed for the first run):
make seed-database
- Run the project with:
make start-server
- Run the project with hot reload:
make start-hot-reload
- Clone git UI submodule
git submodule update --init
- Install Live Server extension if you don't have it from here on VSCode Quick Open (
Ctrl + P
)
ext install ritwickdey.LiveServer
-
To run the frontend, start
ui/index.html
file with Live Server (Right clickOpen with Live Server
) -
Important Note You have to open vscode in the root folder of the project.
-
To avoid CORS errors start the backend before the frontend, some browsers have CORS issues otherwise
- Run the test command
make run-tests
- Run the test command with coverage report
make test-coverage-report
- Run the linters command
make run-linters
- if you want to reformat the code using black run:
make format-code
- In case that you need to delete the database:
make delete-database
-
you will need to have:
- python 3.9.13 installed
- your aws credentials configured
- docker installed with rootless mode
-
install sam cli:
pip install aws-sam-cli
- build the lambda function:
sam build
- (to test the lambda function locally) run the lambda function:
sam local start-api
- deploy the lambda function:
sam deploy --guided