Due: Thu, 20 Mar 2014, 10pm
80 pts, 8% of total grade.
Write a program to import and export validated XML of world crises using Element Tree.
For all projects, the minimum requirement for getting a non-zero grade is to write standard-compliant Python (2.7 or 3.2.3), to satisfy all of the requirements in the table below, including the precise naming of all the files, and to fill out the Google Form.
For this project, the additional minimum requirement for getting a non-zero grade is that you use Element Tree.
IMDB has two major kinds of relations: movies/shows and people. Movies/shows link to people and people link back to movies/shows.
WCDB will have three major kinds of relations: crises, organizations, and people, and again each will link to the others.
There will be three phases.
|I||Collect data on 10 crises, 10 organizations, and 10 people.
Five crises, organizations, and people, must be unique to your group. Identify common attributes of the data and insure that every data item has a value for that attribute or that the attribute is optional. Post them to Piazza.
|Create an XSD and an XML that validates.
It must make use of ID/IDREF to avoid duplication.
Design a naming convention for ID/IDREF.
Think carefully about the types and attributes of the elements.
Post the schema and instance to the public repository.
It is not required, but it is in everyone's self interest to come up with the same schema.
|Create an import/export facility from the XML into Element Tree and back.
The input is guaranteed to have validated XML.
Import/export the XML on only the ten crises, ten organizations, and ten people of the group.
|Create a set of unit tests.|
The relations must contain the following:
|Crisis||name, kind, location, date and time, human impact, economic impact, resources needed, ways to help, image URLs (e.g. Bing, Flickr, Google), video URLs (e.g. Bing, Google, Vimeo), map URLs (e.g. Google Maps), social network feed URLs (e.g. Facebook, Twitter), citations, external link URLs, organizations, people|
|Organization||name, kind, location, history, contact info, image URLs (e.g. Bing, Flickr, Google), video URLs (e.g. Bing, Google, Vimeo), map URLs (e.g. Google Maps), social network feed URLs (e.g. Facebook, Twitter), citations, external link URLs, crises, people|
|Person||name, kind, location, image URLs (e.g. Bing, Flickr, Google), video URLs (e.g. Bing, Google, Vimeo), map URLs (e.g. Google Maps), social network feed URLs (e.g. Facebook, Twitter), citations, external links, crises, organizations|
Pick a project leader for the group. A group member can only be project leader once.
Once the grader has graded the project, that will be the project grade.
The project leader will always receive the project grade.
The project leader can add or subtract up to 10 points to or from any member of the group in exchange for adding or subtracting the same amount of points from the other member(s) of the group.
For example, the leader could add 10 points to person A, and subtract 5 points from person B and person C.
The leader will report those adjustments in the Google form.
- Git Cheat Sheet
- Git Guide
- Git Guides
- Git Immersion
- Git Reference
- Google Python Style Guide
- Try GitHub
|1||5 pts||A private Git repository at GitHub, named cs327e-wcdb, with the grader invited as collaborator and 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. Meaningful commit messages identifying the corresponding issue in the issue tracker (below). See here.
|2||5 pts||A GitHub issue tracker with an issue for each of the requirements in this table and at least 10 more issues, one for each bug or feature, both open and closed with a good description and a label.
Use milestones: wcdb1, wcdb2, and wcdb3.
|3||15 pts||An average of at least 3 unit tests for each function, in the files TestWCDB.py and TestWCDB.out, that tests corner cases and failure cases.
A clone of the public test repo with a copy of your unit tests in the files <group-name>-TestWCDB.py and <group-name>-TestWCDB.out.
|4||15 pts||At least 10 acceptance tests (separated by one blank line) with at least 500 lines total, in the files RunWCDB.in and RunWCDB.out, that tests corner cases and failure cases.
A copy of your acceptance tests in the files <group-name>-RunWCDB.in and <group-name>-RunWCDB.out in the public test repo.
|5||10 pts||A standard-compliant Python (2.7 or 3.2.3) program in the file WCDB.py, with assertions that check pre-conditions, post-conditions, argument validity, and return-value validity, that runs as fast as possible and uses as little memory as possible.||WCDB.py|
|6||20 pts||An XML schema and instance that validates with xmllint in the files <group-name>-WCDB.xml and <group-name>-WCDB.xsd.xml in the public test repo.||WCDB.xml
|7||10 pts||HTML documentation in the file WCDB.html, that documents the interfaces to your functions.
Inline comments if you need to explain the why of a particular implementation.
A consistent coding convention with good variable names, good indentation, blank lines, and blank spaces.
|9||A Google Form.|
|Name||GitHub ID||GitHub Test Repository||Google Form|
|Aizhuldyz Gabbassova||aizhuldyz||wcdb-tests||Google Form|
- Create a private Git repository at GitHub, named cs327e-wcdb.
- Use the same repo for all three phases.
- Add all of the requirements (above) to the issue tracker at GitHub.
- Clone your private WCDB repo onto your local directory.
- Invite the grader to your private WCDB repo.
- Confirm that the grader has invited you back to the public test repo.
- Clone the public test repo onto your local directory. It is critical that you clone the public test repo into a different directory than the one you're using for your private WCDB repo.
- Copy the WCDB files from the clone of the public class repo to the clone of the private WCDB repo.
- Write unit tests in TestWCDB.py until you have an average of 3 tests for each function, confirm the expected failures, and add, commit, and push to the private WCDB repo.
- Create the XSD and the XML with ID/IDREFS.
- Validate the XML with xmllint.
- Reach consensus on the XSD.
- Implement and debug the simplest possible solution in WCDB.py until all tests pass and add, commit, and push to the private WCDB repo.
- Gather the required data on crises, organizations, and people.
- Copy your unit tests, your acceptance tests, and your XSD/XML to your clone of the public test repo, rename the files, do a git pull to synchronize your clone, and then add, commit and push to the public test repo.
- Run pydoc on WCDB.py.
- Fill in the Google Form.
- It is your responsibility to protect your code from the rest of the students in the class. If your code gets out, you are as guilty as the recipient of academic dishonesty.
Provide your git SHA in the Google Form.
Obtain your git SHA with
git rev-parse HEAD
Make sure you have the following files: