basvdl97 / PQChoiceAssistant

PQChoiceAssistant Project for TNO
0 stars 0 forks source link

Ga naar: NL README

Project Specification

Pre-requisites

What to do right after cloning?

  1. Navigate into the root directory of the project.
  2. Run npm i or npm install
    • This installs the node_modules required for the project:
      • VueJS
      • Client-side PDF generation tool

How to run for development?

  1. Navigate into the root directory of the project.
  2. Run npm run dev
  3. In the terminal, click the URL/address that shows up to open the served PQChoiceAssistant
    • This is a development server
    • It uses HMR (Hot Module Replacement), meaning if you save a file, the page is automatically updated with the new code.

How to deploy to gh-pages?

  1. Navigate into the root directory of the project.
  2. Make sure you are on the main branch
    • Use git checkout main to switch to the main branch.
    • Use git branch to check which branch you are on.
    • Use git stash and then git checkout main in case you have uncommitted changes.
  3. Run the following commands by copying and pasting them into your terminal (including the echo so that there is a newline after the git subtree ... command to run it):
npm run build

git add .
git commit -m "update"
git push

git add dist -f
git commit -m "adding dist"
git subtree push --prefix dist origin gh-pages

echo done

How to adjust the scoring matrix & see the effect locally?

  1. Navigate into the root directory of the project.

  2. Go to the scoring directory.

    • There you can find the scoring matrix xlsx file.
  3. Edit it to your desire.

  4. Go back to the project root directory.

  5. Run python update_scoring.py.

    • This sets up a venv to not mess with your local packages.
    • It also cleans up the venv
  6. After the script has ran, the last text in the terminal tells you if everything ran succesfull, or if any errors happened during the process.

    • Success message: All steps completed successfully!
    • Failure message: \<Any other message>
  7. (extra) It might be required to re-run the npm run dev command in order to see the changes.