Skip to main content
SciNet
  • Home
  • All Courses
  • Calendar
  • Certificates
  • SciNet
    Main Site Documentation my.SciNet
  • CCDB
  • More
Close
Toggle search input
English
English Français
You are currently using guest access
Log in
SciNet
Home All Courses Calendar Certificates SciNet Collapse Expand
Main Site Documentation my.SciNet
CCDB
Expand all Collapse all
  1. Dashboard
  2. PHY1610 - Winter 2021
  3. 6. Peer review and unit testing

6. Peer review and unit testing

Completion requirements
Opened: Sunday, 28 February 2021, 12:00 AM
Due: Friday, 5 March 2021, 11:55 PM

In this assignment, you will be working with the anonymized code that was submitted by one of your fellow students for assignment 4. For simplicity, you will only see their I/O routine module.

You will "git clone" their code on the Teach cluster as follows:

 $ git clone /scinet/course/phy1610/submission/NUM
where NUM is a specific two-digit number that will be send to you by email. Note that while it would have been good to see their full repo with their previous commit messages, these are too hard to anonymize, so you'll see just one commit in this repo that added just their I/O code.

After cloning, your task is to:

  1. Write a short code review (3 pages max.) that addresses:

    • the code's structure, comments, documentation, logic, potential performance issues, readability and maintainability;
    • whether these functions could be used in your antsontable code (and if not, why?),
    • techniques in the code that you liked and might use in your own code.
    • suggestions for improvements (but do not implement them yourself),

    Use theScientific Software Development Lessonsdocument as a guide for what to look for.
    Keep your criticism constructive and try to strike a professional, colleagial tone.
    Add the review to the repo. The review can be in plain text, markdown, latex, or pdf.

  2. Next, write units test for this modules, with at least one unit test for every function defined in the header file(s). Do not start a different git repo, rather, work with the cloned one. For unit tests, use one of the following frameworks: catch2, Boost.Test, or googletest. All three are available as modules on the Teach cluster ("module load catch boost googletest", though boost requires gcc to be loaded). Catch2 is perhaps the simplest to get started with, but the lecture slides on software testing have examples for Boost.Test. Implement and run unit tests for all the functions defined in the I/O module interface. Do not use the same data as in the full antsontable code, rather, use some simpler small table to write out and read in.

    Use a makefile and git throughout your assignment, i.e.

    • Whenever you write a test, create a target for it in the Makefile, such that "make TARGETTEST" runs the test called TARGETTEST. Also create an overall "test" target that runs all of tests. Enable automation of running all the tests with the single command "make test".
    • We expect to see several meaningful git commits.
    • Do not commit any data that is produced!
    • Make sure to commit all necessary files to run the code and its tests.

Submit the git repo as in previous assignments, i.e., by using the git2zip command on the Teach cluster, and uploading the resulting zip file to the website. The due date for submission is Friday March 5, 2021, at 5:00 PM EST.

Contact site support
You are currently using guest access (Log in)
Data retention summary


All content on this website is made available under the Creative Commons Attribution 4.0 International licence, with the exception of all videos which are released under the Creative Commons Attribution-NoDerivatives 4.0 International licence.
Powered by Moodle