Project #2: IDB2
Due: Thu, 23 Mar 2023, 10pm
100 pts, 10% of total grade.
Specification
Phase Features II Collect more data, if needed. Create a set of models (using SQLAlchemy) to represent the data and that corresponds to the API of the data.
Think carefully about the types of the models and about the many-to-many relationships between people, organizations, crises.Replace the static HTML pages with dynamic HTML pages for all of the crises, organizations, and people.
The pages must be served by Google Cloud Platform (GCP) or Digital Ocean (DO) using Flask to embed the dynamic content into the HTML.Improve the splash page, if needed. Improve the navigation, if needed. Create a set of unit tests of the models
Add a way to run all of the unit tests on the About page.Improve the technical report.
For this phase make it at least 1,600 words.
Add documentation of the DB.The pages must contain the following:
Page Features Splash make it beautiful
with a way to navigate among the pagesAbout the group name
the group members
for each member:stats:
- name
- photo
- bio
- major responsibilities
- no. of commits
- no. of issues
- no. of unit tests
data:
- total no. of commits
- total no. of issues
- total no. of unit tests
- a link to the GitLab Issue Tracker
- a link to the GitLab Repo
- a link to the GitLab Wiki
tools:
- links to the data sources
- description of how each was scraped
tests:
- tools used
- a way to run the unit tests
Models for each model, a page that contains a
table of all of the instances of that model
with at least five columns of attributes of that model
with the ability to sort the table using any of the columns
in ascending or descending order and
with links to those instances
with many rows and paginationCrisis embedded images (e.g. Bing, Flickr, Google)
- name
- kind
- location
- date and time
- human impact
- economic impact
- resources needed
- ways to help
- citations
- external links
Optional: embedded videos (e.g. Bing, Google, Vimeo)
Optional: embedded maps (e.g. Google Maps)
Optional: embedded social network feeds (e.g. Facebook, Twitter)
links to organizations
links to peopleOrganization embedded images (e.g. Bing, Flickr, Google)
- name
- kind
- location
- history
- contact info
- citations
- external links
Optional:embedded videos (e.g. Bing, Google, Vimeo)
Optional:embedded maps (e.g. Google Maps)
Optional:embedded social network feeds (e.g. Facebook, Twitter)
links to crises
links to peoplePerson embedded images (e.g. Bing, Flickr, Google)
- name
- kind
- location
- citations
- external links
Optional:embedded videos (e.g. Bing, Google, Vimeo)
Optional:embedded maps (e.g. Google Maps)
Optional:embedded social network feeds (e.g. Facebook, Twitter)
links to crises
links to organizationsThe technical report (1,600 words) must contain the following:
Section Features Title The group name.
The group members.Introduction What is the problem?
What are the use cases?Design Data source (APIs)
DB modelsTools front-end
back-endHosting How do you set up the Google Cloud Platform (GCP) or Digital Ocean (DO) server? Other Proof-read your report. Get another group to read it. Read it aloud.
Create diagrams (if needed) with captions.
Create sections and subsections effectively.Cooperation Points
- The content of this project is worth 90 points. The remaining 10 points are Cooperation points.
- During the submission process, each student will independently submit an evaluation form seperately from the project submission.
- In this form, you will assign 10 points to each teammate based on their contribution to the project.
- Your cooperation score is the average of all cooperation points assigned to you by your teammates.
- You cannot give points to yourself.
- You are free to discuss the point assignments with your teammates and collectively plan a fair distribution. However, your final point assignments are up to you.
- If you do not submit your evaluation form, you will receive 0 cooperation points.
- If a student consistently receives a low cooperation score, this may result in a one lettergrade drop in the final course grade.
Requirements
- Estimate time to completion.
- Get a GitLab account at GitLab.
- Create a PUBLIC code repo at GitLab, named cs331e-idb.
- Add at least 10 issues from these requirements to the issue tracker at GitLab.
Add at least 5 more issues, one for each bug or feature, with a good description and a label.- Clone your PUBLIC code repo onto your local directory.
- Create a dev branch in git (see git branching and merging)
- Only merge with the master after a successful build on GitLab CI.
- Make at least 5 commits, one for each bug or feature.
If you cannot describe your changes in a sentence, you are not committing often enough.
Make meaningful commit messages identifying the corresponding issue in the issue tracker (see closing issues via commit messages).- Write unit tests in tests.py that test corner cases and failure cases until you have an average of 3 tests for each function/method, confirm the expected failures, and add, commit, and push to the public code repo.
- Implement and debug the simplest possible solution in models.py with assertions that check pre-conditions, post-conditions, argument validity, and return-value validity, until all tests pass, and add, commit, and push to the public code repo.
- Before continuing, confirm a successful build on GitLab CI.
- Run pydoc3 on models.py, which will create models.html [make models.html], that then documents the interfaces to your functions.
Create inline comments if you need to explain the why of a particular implementation.
Use a consistent coding convention with good variable names, good indentation, blank lines, and blank spaces (see Google Python Style Guide).- Create a log of your commits in IDB2.log [make IDB2.log].
- Obtain the git SHA with
git rev-parse HEAD- Fill in the Canvas form.
- One submission per group by the project leader: the leader of the project must fill in the Canvas form (don't forget to rename your submission as follows "YourGitLabUsername-Project2.json", where the YourGitLabUsername is the GitLab Username of the person who is doing the submission).
Submission
The following must be provided. If anything is missing it will not be graded. You will be informed within 24 hrs if it is incomplete, and you will have 24 hrs to resubmit it. You must e-mail the graders when you resubmit it, and you will receive a one-day late penalty. If the resubmission is still broken this process will repeat and you'll lose another one-day penalty.
- Your PUBLIC code repo, cs331e-idb, with graders invited as maintainers and with the following files, with these exact names:
- .gitignore
- .gitlab-ci.yml
- IDB2.log (output of git log with at least 10 commits)
- models.html (output of pydoc3)
- app/models.py (SQLAlchemy)
- app/tests.py (at least 3 unit tests)
- GitLab issue tracker with at least 30 issues.
- Canvas form, namely "Project2.json", with time estimate by the group Leader (don't forget to rename your submission as follows "YourGitLabUsername-Project2.json", where the YourGitLabUsername is the GitLab Username of the person who is doing the submission)..
- Canvas evaluation form, namely "Project2evalutaion.json", with Cooperation points by each group member including the leader.
Rubrics
- [10 pts] Quality of the repo.
- at least 10 commits
- git log
- [10 pts] Quality of the models.
- design
- [15 pts] Quality of the website.
- [3 pts] about page
- [4 pts] design, aesthetics
- [4 pts] links from models to models
- [4 pts] easy to navigate, no broken links
- [15 pts] Quality of the issues.
- at least 15 issues
- [10 pts] Quality of the unit tests.
- at least 3 unit tests
- [10 pts] Quality of the integration.
- GitLab CI log
- [10 pts] Quality of the documentation.
- pydoc3 output
- [10 pts] Quality of the technical report.
- 1,600 words, use cases, models, DB
- good sections, multiple pages, good headers, figures, and grammar
- [10 pts] Cooperation points.
Tools
- Bootstrap
- Coverage
- cProfile
- Flask
- Flask Admin
- Flask Blueprint
- Flask Images
- Flask SQLAlchemy
- Git
- Jinja
- JQ
- PEP 8
- pydoc
- Pylint
- Python Subprocess
- Google Cloud Platform (GCP)
- Digital Ocean (DO)
- Requests: HTTP for Humans
- Slack
- SQLAlchemy
- GitLab CI
- unittest
Lynda
UT has free access to Lynda.
Guides
- .gitignore
- API Documentation
- APIs
- Atlassian Git Tutorials
- Best Practices for RESTful APIs
- Designing a RESTful API with Python and Flask
- Egghead
- Flask Tutorial
- Git Branching and Merging
- Git Cheat Sheet
- Git Cheat Sheet
- Git Generating SSH Keys
- Git Guide
- Git Guides
- Git Immersion
- Git Pull Requests
- Git Reference
- Google Python Style Guide
- PostgreSQL Search
- Pro Git
- REST+JSON API Design
- Get Started with GitLab
- Writing Great Unit Tests: Best and Worst Practices
Graders
Name GitLab ID Aashish Gottipati agottipati9 Pranav Venkatesh Pranav-V