/ASWETEAMPROJECT

ASWE Fall 2021 Group Project

Primary LanguageHTML

ASWETEAMPROJECT

ASWE Fall 2021 Group Project

Summary of service:

Our service is an API that can be used to judge courses and professors. Our API scrapes reviews from an existing website, in our case culpaarchive.com, and loads these reviews into a database. (Note: culpaarchive.com went down in the past few days, but it’s reviews are loaded into our database). From there, our service conducts different forms of analysis and summary of student reviews. Highlight features include evaluating a professor based on how positive their reviews are or to suggest the highest rated professor that teaches a specified course, but there are many different endpoints for our service that conduct several different types of analysis (summarized later). Our web scraper, database generator, and backend evaluation algorithms are located in scraper.py, db.py, and evaluation.py, respectively. Analysis.py is a helper file to evaluation.py. This API can be tested when running client.py. Client.py allows a user to test the aforementioned features and view our analysis and summary of student reviews. Client.py also has functionality that allows a user to query our database and build a schedule based on the types of classes they like. These classes can be filtered by parameters such as subject matter and difficulty.

Our files do not include third party code.

How to build and run client:

The client is entirely contained in client.py. A database csv is generated by running db.py, however this takes a long time. As such, we suggest cloning our repository and to have the database csv (culpa.csv) and the aforementioned files in the same directory before testing the client. Dependencies imported at the top of scraper.py, db.py, and evaluation.py must be pip installed, but continuous integration can also take care of this. First, run evaluation.py to fire up the local host. While this is running, run client.py in a separate terminal to run the client. Then you will be brought to the client’s home page where you will be prompted with different commands to interact with our API.

Continuous integration, coverage, bug finder, and style checker:

Our CI leverages GitHub workflow and actions. GitHub actions are defined in the .github/workflows folder yaml file. To find CI reports, first go to our repository at https://github.com/caslocascio/ASWETEAMPROJECT. Then click on the actions tab. Each workflow run shows a build including installation of dependencies, bug and style checking using flake8, testing using pytest, and test coverage (each as a dropdown). As requested, we achieved above 85% coverage. Coverage can also be viewed in the htmlcov folder.

Summary of endpoints:

‘/’ is the entry point for the service and outputs a hello message letting the accesser know they are using the right service.

‘/professor’ requires a professor name in the request URL and outputs a single review for the desired professor.

‘/summary’ a 3 phrase summary of a professor’s reviews.

‘/easy’ requires a professor name in the request URL and outputs a message with the number of occurrences found in the reviews regarding topics like lenient grading and recommendation.

‘/final’ requires a course title in the request URL and outputs a message with the number of occurrences found in the reviews regarding topics like take home final and final paper. ‘/extensions’ requires a professor name in the request URL and outputs a message with the number of occurrences found in the reviews regarding extensions.

‘/difficulty’ requires a course title in the request URL and outputs a message with the number of occurrences found in the reviews regarding topics harsh grading and hard.

‘/total_reviews’ requires a professor name in the request URL and outputs a message with the total number of reviews for a professor.

‘/classes’ returns a list of classes for a desired category of classes.

‘/review_ages/ ’ returns the number of old and new reviews based upon a professor name and threshold date.

‘/sentiment’ returns the sentiment analysis of a professor or a course. This is a summary of how many student reviews are positive, negative, neutral, subjective, or objective.

‘/recommendProfessor’ takes in a course name, finds all professors that have taught that course, conducts sentiment analysis, and returns the professor with the most positive reviews overall as a recommendation to take for the course.