Assignment 8 - Meteoric Maintenance
Introduction
Software maintenance is the term for updating software code to provide new functionality, change existing functionality, fix bugs, or implement a better design. Good software design makes maintaining long-lived code easier.
You will work with your partner(s) update your meteoric.py implementation. Start with code you submitted for Assignment 7. Review the collaboration, cheating, and personal proficiency section of the course syllabus.
Instructions
You must design, implement, and test your expanded solution. Review the changes in this section, then look at the rubric for what is expected.
You will continue to work in the same GitHub repository from the previous assignment with your partner.
a) Changing data
Researchers have been hard at work and added new information to the meteorite data. Download meteorite_landings_full.csv and add it to your directory.
New fields have been inserted for each meteorite:
name,id,nametype,recclass,mass (g),fall,year,reclat,reclong
Aachen,1,Valid,L5,21,Fell,1880,50.775,6.08333
Aarhus,2,Valid,H6,720,Fell,1951,56.18333,10.23333
Abee,6,Valid,EH4,107000,Fell,1952,54.21667,-113
Acapulco,10,Valid,Acapulcoite,1914,Fell,1976,16.88333,-99.9
Alter meteoric.py so that it loads data from meteorite_landings_full.csv. You no longer use the old meteorite_landings.csv.
The year and geopoint commands must continue to work. Update these commands to print the new fields of nametype, recclass, mass (g), and fall.
b) New commands
Your meteoric.py must support the following new commands in addition to year and geopoint:
class <string>: print all meteorites whoserecclassmatches the provided string. The match must be case insensitive:- a search for
h6will match all meteorites with typeH6orh6 - a search for
aCupuLCOITEwill matchAcapulcoite.
- a search for
- (Extra Credit)
heaviest <n>: print the top<n>heaviest meteorites according to theirmass (g). The list must be sorted so that the heaviest is printed first and the least heavy is printed last.<n>is an integer greater than 0. For exampleheaviest 5.- You need to implement the sorting logic, you cannot just hardcode a list of heaviest meteorites.
- (Extra Credit)
count-fall: print the number of meteorites for each unique value of thefallfield. The command ignores any arguments.- There are only two values in the data:
FellandFound, but your algorithm MUST account for the possibility that new values will be added, so you cannot hardcode these values in your algorithm. Example output:
Fell 1107 Found 44609 - There are only two values in the data:
Rubric
- (5pts) PEP8 coding conventions and Docstring conventions followed.
- (15pts)
classcommand implemented and old commands are updated to correctly use the expanded CSV file, including exception handling of user input errors. - (5pts) Adherence to our 5 low level design rules.
- (10pts)
pytestbranch coverage HTML report demonstrating 90% branch coverage of all source code except formain(). - (10pts each) Correct implementation and test of
heaviestand/orfallcommands.
Submission due Nov 23
Commit and push your code to GitHub following the prescribed workflow when working with git.
- Each person must work in a branch in git, then merge into
mainwhen appropriate. - Make sure to push your branches to GitHub.
- I will only look at the
mainbranch when grading, so your branches must be properly merged into main.
You do not submit anything to Canvas.