Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Mailman Presentation

Avatar for Ariel Ariel
April 06, 2023

Mailman Presentation

Presentation slides for Mailman project.

Avatar for Ariel

Ariel

April 06, 2023

Other Decks in Education

Transcript

  1. About Ariel Wang Senior, Biology Zuhayer Kalam Senior, Aerospace Eng

    Andrew Yang Junior, Computational Physics Najia Sherwani Senior, Chemical Eng Aram Baali Senior, Radio-Television- Film
  2. import unittest import main from models import database, Message, Sender,

    Category class Test (unittest.TestCase): #models def setUp(self): main.app.config["TESTING"] = True self.client = main.app.test_client() def testIndex(self): with self.client: response = self.client.get("/") self.assertEqual(response.status_code, 200) #database def test_insert_senders(self): with main.app.app_context(): s = Sender(name ="John Doe", message_count="20", total_size="1000", email="[email protected]", domain="domain.com") database.session.add(s) database.session.commit() exists = database.session.query(Sender).filter_by(email = "[email protected]").first() is not None self.assertTrue(exists) def test_read_senders(self): with main.app.app_context(): q = database.session.query(Sender).filter_by(email = "[email protected]").one() self.assertEqual(str(q.email), "[email protected]") self.assertEqual(str(q.name), "John Doe') self.assertEqual(str(q.domain), "domain.com") self.assertEqual(str(q.message_count), "20") self.assertEqual(str(q.total_size), "1000") #instances def testOneSender(self): with self.client: response = self.client.get("/oneSender/[email protected]") self.assertEqual(response.status_code, 200) Unit Tests
  3. Strengths & Goals • High-utility through large data set ◦

    Gmail API provides access to user’s email inbox (permission required) • Modularized authentication procedure ◦ Easier debugging • Structured data with normalized database design ◦ Efficient data storage ◦ Allows for quick retrieval • Efficient Sorting and Searching is very efficient and both can happen simultaneously (used SQLAlchemy functions in Flask Backend)
  4. Learnings • Authenticating with Google APIs ◦ Unlocks invaluable, large,

    custom datasets • Designing normalized databases ◦ Critical for efficient storage and retrieval • Unit-testing web applications • Implementing searching and sorting features
  5. Opportunities & Improvements • Have more useful data analytics (value)

    ◦ Data reported is simple, not highly impactful • Use nested SQL queries to eliminate redundant loops ◦ Currently relies on querying full database to conduct filtering within Python • Authentication path: Login & Logout • Communication • Node.js + Aesthetics • Address security risk (google thinks we are phishing) • If emails don’t have very robust data, website looked plain • Could load more emails and create data visualizations
  6. Our Confusions & Issues :) • Authentication flow interruption on

    Google Cloud ◦ Successful authentication on venv, while credentials are rejected on CGP deployment • GCP has errors but website will still run ◦ no emails were found sometimes • GCP takes 10-15 minutes to set up • Namecheap can’t have the name gmail • Reasons behind slow API calls ◦ 2 minutes for 500 emails (we have 80 right now) ◦ Only requesting headers/metadata
  7. Learnings • We can see players according to how many

    yellow and red cards they earned • We learned the founding dates of Premier League clubs • You can get information on soccer players and teams through an API
  8. Opportunities • Website coloring could be better • Sorting could

    use some improvement • Some data instances are blank and don’t seem necessary (Manchester City players with 0 games)
  9. Questions • There seem to be a very limited amount

    of players displayed per club instead of the full roster (players with 0 apps), what went into which players were selected?