Skip to content

McGill-ECSE321-Fall2019/project-group-10

Repository files navigation

Welcome to the ECSE 321 Group 10 GitHub repository!

Team Members:

Taylor Lynn Curtis
Alex Grunwald
Chelsea Myers-Colet
Yoan Poulmarc'k
Anas Shahid

Important

For deliverable 4, there are 4 important branches that all have different pieces of the project for simplicity of testing.
  1. master : this branch contains the completed website application for marking
  2. android : this branch contains the completed android application for marking
  3. face_recog : this branch contains our facial recog extra feature and should only be used to test this feature
  4. createObjectsREST : this branch can be used to facilitate the creation of test objects for Android as described below

Scope of Project:


The goal of our project is to create the student perspective of a tutoring application. This will be accessible via an app on any Android device. The application will allow students to select a course and view all available tutors, their hourly rates, availabilities and reviews from other students.

Overview Table

Below can be found the role of each member and the number of hours spent on each sprint.
NAME ROLE SPRINT1 SPRINT2 SPRINT3 SPRINT4
Alex Gruenwald Technical(ly) Intern 19 53 20 25
Chelsea M-C Documentation Manager 20 50 40 30
Taylor Lynn Curtis Software Consulting Lead 19 58 27 22
Anas Shahid Software Developer 11 49 40 20
Yoan Poulmarc'k Software Architecture Lead 17 51 10 2

Tasks By Deliverable

Sprint 1

  • Alex: Responsible for UML Lab modelling and generating of model code. Proofreading expert.
  • Chelsea: Responsible for meeting minutes and writing persistence tests.
  • Taylor: Responsible for dependency injections and writing JPA Tag code.
  • Anas: Responsible for writing tests and fixing bugs.
  • Yoan: Set up database and connected other applications together.

Sprint 2

  • Alex: Business methods, restful services and unit tests for R13, R14, and R15.
  • Chelsea:
    • Responsible for meeting minutes and creating templates for the wiki pages
    • Business methods, restful services and unit tests for R2, R3, and R4.
  • Taylor: Business methods, restful services and unit tests for R5, R7, and R8.
  • Anas: Business methods, restful services and unit tests for R10, R11, and R12.
  • Yoan: Business methods, restful services and unit tests for R1, R6, and R9.

Sprint 3

  • Alex:
    • Review page frontend
    • Linking review page to backend services
  • Chelsea:
    • Responsible for meeting minutes and creating templates for the wiki pages and general documentation upkeep
    • Initial University, Course, Course offering and Tutor selection page for web frontend
    • Linking login, startup, sign up, home, selection and tutor pages to backend services
  • Taylor:
    • Fix sessions backend, and other backend issues that cause errors in the frontend
    • Linking travis CI to frontend
    • Linking Heroku frontend, setting up npm dev build and managing auto deploy
  • Anas:
    • Startup, login, sign up, home, selection and tutor page frontend (visually pleasing versions)
  • Yoan:
    • Created Heroku frontend application
    • Responsible for debugging file system/structural errors
    • Set up automated email notifications (check spam)

Sprint 4

  • Alex:
    • Human detection algorithm integration
    • Android backend integration
  • Chelsea:
    • Responsible for meeting minutes and general documentation upkeep as well as user web and Android documentation
    • Android backend integration and comments
  • Taylor:
    • Code cleanup and comments for Android
  • Anas:
    • Android views
    • Android backend integration
  • Yoan:
    • Fixing heroku backend deploy


To see our meeting minutes, including key design decisions and architecture framework, head over to our wiki page and select any page titled with a date:
    

Extra Features


  1. Machine learning face recognition for signing up. See below for ML setup.
  2. Email notification upon session creation. See below for email setup.

Instructions for testing Machine Learning algorithm


  1. The machine learning extension is only added to the face_recog branch as we did not want the software to interfere with basic front end testing for the reviewer. This branch should only be used to test the algorithm.
  2. Before starting, make sure you have opencv installed on your computer. If it is not, use this on your command line to install
    pip install opencv-python
  3. You may also use brew if that is already downloaded using this command:
    brew install opencv
  4. If you receive an error relating to cv2 not being installed or not found, you can use conda for installation. Click here for details on how to run the command.
  5. If you do not have pip installed, click here for instructions on how to download it for MacOS and how to set path.
  6. Make your way into the face_recog branch by running -> git checkout face_recog on the cmdline. Here you will find one additional folder called -> facial_recognition where all scripts are held.
  7. To provide a quick explanation how it works:
    1. To start the script, make your way into the facial_recognition folder. Here, you will have to run the script runScript.py (very original name) with the command -> python runScript.py. Python must be installed in order for you to run this. If it is not installed, click here for instructions.
    2. A prompt will be shown asking to access your computer.
    3. The algorithm will use your camera to take a picture of you to check to see if you are a human.
    4. You need to make sure you have set your computer's cameras permission to allow terminal access. To do so in mac, go into your system preferences > security and privacy > privacy. In the left tab select 'Camera'. Find terminal in the right tab and make sure it is checked for permissions. If it is checked, you can run the script.
    5. If you are using a windows system, find the link here for more information on terminal permissions for accessing your camera.
    6. DO NOT SMILE FOR THE PICTURE.
    7. Once the picture is taken, an algorithm runs on the image taken and attempts to find all objects in the picture including all people.
    8. Once complete, a file called -> prediction.txt will be generated. In this file will be written everything the algorithm detected.
  8. Once this is done, in the front end, after making your way to the home screen, click on sign up. (Make sure you run -> npm run dev in the face_recog branch).
  9. The algorithm is meant to detect individuals who are signing up to make sure they are human.
  10. The button -> confirm identity, will run the script in the future (issues with running pythons script form java). If you press the button now (after running the script), a restful api call will be sent to the service class and will read from the prediction.txt file and see what objects were detected.
  11. If you are more than 65% human, you will be detected and you will be able to sign up for an account once all information is added.

Instructions for testing and setting up email on Eclipse


  1. If the email class poses erorrs on Eclipse do the following on the git repo on command line:
  2. gradle cleanEclipse
  3. gradle Eclipse
  4. gradle build -x test
  5. Once running the commands as seen above, the email is ready to be used.
  6. The email will only be sent to a registered tutor upon session creation. If you would like to test it, change one line in the code, run the program by running the tesObjects test to set up mock varaibles as seen below, and then create a session.
    1. First, we must change the email location. Make your way into the file JavaEmail.java with this path -> /Project-Backend/src/test/java/ca/mcgill/ecse321/project/service/TestObjects.java
    2. Open the file and make your way to line 51. This is where the tutor email is set. Replace the dummy email with your own, save the file, rerun the spring server and then run the testObject test as seen in the instructions below.
    3. You have now created a tutor with your email. Run the appliction Frontend as instructed below. Sign in with username: cmc and password: dogs (quick access opposed to making a new account), click on create session and choose the tutor who's email you just changed. Confirm session creation and you should receive an email from project-group-10.

Instructions for setting up Android and Heroku


  1. Run the Spring backend by going to https://project-backend-10.herokuapp.com.
  2. Run the Android application using a Pixel 2 emulator.
  3. To test Android with test objects using the Spring Boot application, follow steps below in "Instructions for setting up objects to test the frontend web service". Do this only after running the Spring backend on Heroku but before running the Android emulator. To check the creation, go to the /students endpoint which should display a student with the username "cmc" and password "dogs" which can be used to log in. This also creates a session and a tutor will one availability for creating another session
  4. To do all this on command line after opening the Heroku backend website:
    1. Navigate to the git repository and proceed into the Project-Backend folder
    2. Switch branches: git checkout CreateObjectsREST
    3. Run gradle to generate the snapshot file: gralde build -xtest
    4. Run the Spring backend: java -jar ./build/libs/Project-Backend-0.0.1-SNAPSHOT.jar
    5. Open a new terminal into the same directory.
    6. Create the objects using a POST command: curl -X POST http://localhost:8080/createobjects/
    7. Check that objects were created by going to the students endpoint on Heroku: https://project-backend-10.herokuapp.com/students
    8. Stop running spring in terminal: Ctrl+C
    9. Switch to the android branch: git checkout android
    10. Now you can open Android studio and interact with the app on a Pixel 2

Instructions for setting up objects to test the frontend web service


  1. Run the Spring backend.
  2. Run the class TestObjects.java in src/test/java/ca/mcgill/ecse321/project/service as a JUnit test with the purpose string set to "create".
  3. This will create test objects which can be used to interact with the frontend.

Setting up frontend

  1. Make your way into the Frontend directory -> cd ./project-group-10/Project-Frontend
  2. Run "npm install"
  3. Once the installation is complete, run "npm run dev" in the frontend directory.
  4. Your default internet browser will load with the introduction page. Use Chrome for the best visual.
  5. To log in, you can use the username "cmc" with password "dogs".

Instructions for setting RESTful APIs and running Spring


  1. To start testing the RESTfula apis, we must first begin running of Spring.
  2. First, open up your SpringToolSuiteIDE and open your designated workspace.
  3. Import the required project.
  4. Make your way into the project-group-10/Project-Backend/src/main/java/ca/mcgill/ecse321/project/ProjectApplication.java
  5. Start running the Spring application "Spring Boot App". Once it is loaded, you can begin running the restful tests.
  6. We have chosen to test our RESTful api tests using Postman.
  7. Once in the wiki page, follow the steps for setting up the mock database to actually test the PUT and GET queries / statements.
  8. Click on here to access this page.

Instructions for setting up the tests


  1. Once you have successfully cloned the repository, make your way into the project folder.
  2. In the terminal, enter the "Project-Backend" folder by typing in - cd Project-Backend/
  3. Once in the folder, type and enter - "gradle build".
  4. This should automatically start running and testing all tests written in the test directory.
  5. To run gradle without tests: "gradle -xtest"

Heroku Setup


  1. All the Heroku information is set in the "resource" directory, in the "application.properties" folder.
  2. The Heroku database information can be found here.
  3. The password and username information is not disclosed in the readme for privacy reasons.

About

project-group-10 created by GitHub Classroom

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published