Enhancing Book Discovery & Interaction with ML-Driven Recommendations
Do not work directly on main
or development
, instead make a <feature>-dev
or <name>-dev
branch with
git fetch origin
git checkout development
git pull origin development
Then run either git checkout -b <feature>-dev
or git checkout -b <name>-dev
.
Pull requests should first go through development
, then they will be merged to main
all together.
To run both the frontend and backend of the application, your system will need to have Python, Node.js, and npm installed.
cd .github/workflows
pip install -r requirements.txt
cd frontend
npm install react react-router-dom
cd backend
python -m main
cd backend
python .\book-rec-model.py
python -m backend.main
cd frontend
npm start
Run the following from the project directory.
source backend/book_recommender_env/bin/activate
Run the following to analyze the code for programming errors, bugs, stylistic errors and suspicious constructs.
flake8 .
black .
Run the following command to generate a coverage report for the Python backend tests.
pytest --cov=backend --cov-config=.coveragerc --cov-report=html:htmlcov tests/
Deployment will occur during sprint releases from the main
branch, and is done through vercel.
npm install -g vercel
vercel login
vercel
Any environment variables can be added to the Vercel through vercel env add <VARIABLE_NAME> <VALUE>
.
In the case of issues with nested React environments competing, run the following commands within frontend
.
Remove-Item -Recurse -Force .\node_modules
Remove-Item .\package-lock.json
npm cache clean --force
npm install
If this does not resolve the issue, try running these commands once again in the root folder.