Welcome to Shrimp!Shrimp! Auto-Stock-Trading respository
Development Guide
Brief env setup Steps:
- Git clone repo (ssh git@github.com:TaiwanCodingShrimp/Auto_Stock_trading.git)
- Install pyenv on your computer (ref: Install and User guide for both windows/Mac ref: Install for Windows)---pyenv install 3.10 (PS. And dont forhet to shell)
- Install poetry on your computer (ref: install on windows ref:install on Mac/Windows & User guide)
- Run "poetry install" to install the project and dependencies in the dir (PS. remember to shell)
- Run "pre-commit install" to install pre-commit in hooks
[!NOTE]
Our dev python version is 3.10
This is quite interseting, you should read abot this ---> Why using poetry but not just pip and container?
More pyenv&poetry Guide
About pre-commit
ref: ref
step1. "pre-commit install" (should make sure you have shell your poetry env)
Step2. For usage. "pre-commit run --all-files"
Basic GitFlow
處理新的issue,務必要開一個針對這個issue的分支,不要直接對master修改 !!! (This is vital)
Brief Steps: (run in your terminal or cmd)
- git checkout master (switch your local branch to master)
- git pull (update your local master)
- git checkout -b "輸入你的branch名字" (open a new branch and switch to it)
- 開始你的更改
- git add
- git commit (記得run pre-commit) 如果有安裝好環境,跑commit就會執行了
- git push
- create your PR(Pull Request)
- Request code review !!!
- After aproved ,Do "Squash merge "
[!NOTE]
GitFlow is very important !!!! Do follow it !!!
Before merging PLEASE CHECK YOUR CODE THOROUGHLY !!!
For more git details: 連結1-> ref-多人協作
連結2-> ref-git基本操作
pre-commit兩個方式:
安裝好自動會在git commit觸發 或是 可以手動執行 pre-commit run --all-files