Assignment 7 - Meteoric Design, Implementation, and Test

Apply low-level design rules to implement and test your application.

Code resources

Submitting code or other solutions from anywhere other than your own brains is cheating.

  • Can you research how to use a particular function or library such as pytest? Yes.
  • Can you get code that solves all or part of your homework? No.
  • When in doubt, ask. I will not be upset if you ask.

Refer to the full details in the Syllabus on Canvas.

Setup

  1. Click this link: https://classroom.github.com/a/VLhFcyMu
    • The first teammate: Create a name like “alice-bob” using your first names.
    • The second (and third) teammate: Join the team your partner made.
  2. Accept the assignment.
  3. Click the link to your team repo on the confirmation page.
  4. git clone the repository to your computer, and open the directory in PyCharm.
  5. Configure pytest:
    • Click the bottom right of PyCharm where your Python version is listed. Select Add New Interpreter -> Add Local Interpreter, then hit Okay on the pop-up.
    • Open a new Integrated Terminal window in PyCharm.
    • Run pip install pytest pytest-cov

Introduction and Problem Statement

You will complete a program to analyze the NASA Meteorite Landings dataset: https://data.nasa.gov/dataset/meteorite-landings-api. You will work with your partner(s) to design, implement, and test your solution.

You may only collaborate with your partner(s). All partners must contribute equally to the assignment. Each person is responsible for implementing and testing part of the solution.

Read the Problem Statement: PDF or web. Paper hand-outs will be provided in class.

Part A) Design

In class, discuss the organization of your code with your partner(s). Discuss the Problem Statement, and then think of a sensible design in terms of the functions and optionally the modules (files) you will create.

Follow the 5 low level design rules:

  1. Avoid magic literals.
  2. Functions should have a single responsibility.
  3. DRY (Don’t Repeat Yourself) and the Rule of Three.
  4. Handle errors at the lowest sensible level, and re-raise/re-throw them otherwise.
  5. Raise specific errors and define your own if needed.

There are many ways to solve this problem while adhering to the design rules. You may evolve your design during Implementation and Test.

Your focus at this stage (prior to writing code) should be on the Single Responsibility Principle. By the end of class, show the instructor:

  • Function signatures you have stubbed (only written the def line) in meteoric.py.
  • Docstrings that (i) explain each function, and (ii) specify which partner is responsible for implementing and testing the function.

Part B) Implementation & Test

This part is completed as homework. Coordinate your work via Slack, email, or text, and contribute your work to your team’s GitHub repo.

Implementation requirements

  1. Implement a solution to the Problem Statement in meteoric.py.
  2. Each person must work in a branch in git, then merge into main when appropriate. I will only look at the main branch when grading. Review the content from Assignment 6 on proper Git workflow.
  3. Put your names at the top of meteoric.py in the module docstring.
  4. You may create classes and files and use imported libraries, but these things are not necessary.
  5. Your solution must adhere to the 5 rules of low-level program design.
  6. You are free to modify the provided code, including load_data() code.
  7. You will need to implement the haversine formula. You may use code from the web, but include the link to the source website in a code comment.
  8. Add docstrings following our conventions to any functions, classes, and files you create.
  9. The code must adhere to the PEP8 coding conventions discussed in class.

Testing requirements

  1. Add test cases to test_meteoric.py to verify your new code.
  2. You must achieve 90% branch coverage in all source files except for the main() function.
  3. If you create additional source files, you must also create a corresponding test_*.py unit test.
  4. All test cases must run from the CLI with pytest.
  5. Use pytest --cov --cov-branch --cov-report=html to generate a branch coverage HTML report in your project directory.
    • note: the htmlcov/ and .coverage files generated by pytest are ignored by Git and will not appear in your repos. This is intentional.

Rubric

  • (5pts) PEP8 coding conventions followed
  • (5pts) Docstring conventions followed for modules (files), classes (if any), and functions.
  • (25pts) User commands are correctly implemented, including exception handling of user input errors.
  • (10pts) Adherence to our 6 low level design rules.
  • (15pts) Multiple test cases with proper test structure for your source code. pytest branch coverage HTML report demonstrating ≥90% branch coverage of all source code except for main().

Submission due Nov 17

Commit and push your code to GitHub following the prescribed workflow when working with git from Assignment 6.

  • Each person must work in a branch in git, then merge into main when appropriate.
  • Make sure to push your branches to GitHub.
  • I will only look at the main branch when grading, so your branches must be properly merged into main.

You do not submit anything to Canvas.


Last modified November 13, 2025.