-
Install Python >= 3.11
-
Install Postgresql DB Engine
-
Install python pip
-
Add Python, scripts to PATH
-
Windows
{Python_dir}\Python311\Scripts\ {Python_dir}\Python311\ -
Unix ( mac / linux )
No need to add anything
-
-
Project Python Venv
-
Windows
not tested yet (you can skip this, or do it on your own) -
Unix ( mac / linux )
- create an empty directory (we'll call it db_home)
mkdir db_home cd db_home mkdir db_venv python3 -m venv db_venv
-
-
Clone the repository
git clone https://github.com/ibraheemalayan/COMP333-DB-Project.git . -
Install required modules
source db_venv/bin/activate pip3 install -r requirements/development_requirements.txtcd src -
redirect domains to 127.0.0.1
-
Windows
-
open a powershell console as administrator and run:
Add-Content -Path 'C:\Windows\System32\drivers\etc\hosts' -Value '127.0.0.1 www.silal-payments.com' Add-Content -Path 'C:\Windows\System32\drivers\etc\hosts' -Value '127.0.0.1 management.silal-payments.com' Add-Content -Path 'C:\Windows\System32\drivers\etc\hosts' -Value '127.0.0.1 delivery.silal-payments.com'
-
clear dns cache
ipconfig /flushdns
-
-
Mac OS (unix)
Note: if lookups against hosts file are slow, see this answer
-
open a terminal run:
sudo zsh -c "echo -e '::1\twww.silal-payments.com' >> /etc/hosts" sudo zsh -c "echo -e '::1\tdelivery.silal-payments.com' >> /etc/hosts" sudo zsh -c "echo -e '::1\tmanagement.silal-payments.com' >> /etc/hosts"
-
clear dns cache
sudo dscacheutil -flushcache; sudo killall -HUP mDNSResponder
-
-
Linux
-
open a terminal run:
sudo su echo -e '127.0.0.1\twww.silal-payments.com' >> /etc/hosts
-
no need to flush DNS
-
-
To enhance IDE performance, disable all extentions then enable only globally required extentions for VSCode ( CoPilot, Themes, Git ... ) and enable other extentions for this workspace only.
- Python, find the installation guide here
- flask-snippets, find the plugin here
- Pylance, find the plugin here
- Python Indent, find the plugin here
- Bash Debug, find the plugin here
- Bash Beautify, find the plugin here
- Commit Message Editor, find the plugin here
- Github Markdown Preivew, find the plugin here
- GitHub Pull Requests and Issues, find the plugin here
- Gitmoji, find the plugin here
- IntelliCode, find the plugin here
- YAML, find the plugin here
- Todo Tree, find the plugin here
- Material Icon Theme, find the plugin here
- Copilot, find the plugin here
In order to collaborate to the remote repository you have to finish the following setup:
- enable format on save in VSCode
- install precommit https://pre-commit.com/#install
- run the following in the project root
pre-commit install pre-commit install --hook-type commit-msg --hook-type pre-push
those commands will install the pre-commit hooks defined in the
.pre-commit-config.yamlfile for the local repo