Jacob Burianek, Tammy Chau, Isaiah Kroeker, Steven Ngo, Jenisa Nguyen
Here is a link to our original acceptance test document: https://docs.google.com/document/d/1Tvu6fH-OcDuaEhUeSDayKiv9yg5H1vwU9JO8CJpLHGg/edit?usp=sharing
The criteria in the document do not actually reflect our final acceptance tests, rather what we have in myapp/cypress/integration better indicates what the main features of our site are. Below is a screenshot of all our acceptance tests passing. Cypress last ran and updated: June 9, 2021, 23:16
Here is a link to our Cypress runs dashboard: https://dashboard.cypress.io/projects/2drixm/runs
Due to the time crunch and the nature of how cookies do not work with our deployed Heroku site (non-verified account), the acceptance tests can only be done locally and therefore are not yet automated. We did at least start the steps if to do so, as seen with our Cypress dashboard being set up.
You should have the following python packages: pytest, coverage (plus all other packages required by the backend). You should also be in a python virtual environment (venv).
Commands to get coverage measurements of our backend:
cd myapp/backend
coverage run --source=. -m pytest backend_test.py backend.py
coverage report -m
Here is a sample of a coverage report: Coverage last ran and updated: June 8, 2021, 17:52
We do have at least 50% coverage of backend.py, which includes our primary data processing and backend-contained logic, and the rest are mostly code that deal with external interfaces (i.e., requests library, MongoDB). For example, our entire User class is mostly MongoDB accessing/interfacing.
All of these start in myapp folder.
Run commands:
npm install
npm audit fix
1. Create virtual environment. How To
2. Activate virtual environment. (Same link as above)
3. Run following command:
[pip/pip3] install -r requirements.txt
To use ESLint on a file:
npx eslint <filename>
To use pylint on a file:
python -m pylint <filename>
Running Backend (This is only in development when you are locally running):
cd backend
[export/set] FLASK_APP=backend.py
[export/set] FLASK_ENV=development
[python/python3] -m flask run
Running Frontend:
npm start
Our team uses ESLint for our JavaScript code. Documentation found here.
1. Install ESLint using npm
npm install eslint --save-dev
2. Set up a config file
npx eslint --init
npx eslint file.js
or npx eslint ./directory
Our team uses PyLint for our Python code. Documentation found here.
pip3 install pylint
or pip install pylint
depending on the user's development set up.
python3 -m pylint file.py
or python -m pylint file.py
depending on the user's development set up.
https://docs.google.com/document/d/1C4KBDniZPT1sQi7r3yUmNqxwI4CXx2FawUzMEpAc-MM/edit