Run these command line in terminal at the root directory
pip install poetry
poetry config virtualenvs.in-project true
poetry install --with dev
poetry run pre-commit install
poetry run pre-commit autoupdate
To make both task itself and its test workable, I put the following code to every file's head to avoid ImportError
import os
import sys
sys.path.append(os.path.abspath("."))
- Mac OS user
- run
chmod +x ./linter_check.sh
at the root directory to solvepermission denied
error - run
./linter_check.sh
at root directory, it will execute bothmypy
andpylint
- run
- Windows user
- run
./linter_check.ps1
- run
- Mac OS user
- run
chmod +x ./tests.sh
at the root directory to solvepermission denied
error - run
./tests.sh
at root directory to run all the unit tests
- run
- Windows user
- run
./tests.ps1
- run