Paper Tracking¶
When a scholarly paper is submitted to a journal for publication, it typically undergoes a peer review process: the paper is assigned to several anonymous reviewers who provide feedback about the paper, which the editor uses to decide whether to publish the paper or not. Nowadays, most peer reviews are managed using a software system that keeps track of the paper submissions, the reviews, etc. (popular systems include EasyChair, OpenConf, Microsoft CMT, etc.).
We will consider how to model such a system using an object-oriented
approach. We will have three Python classes: Journal
,
Paper
, and Review
. During a run of our program,
there will always be a single Journal
object, and this object
may have multiple Paper
objects associated with it. In turn,
a Paper
object can have with multiple Review
objects
associated with it. (Note: a given Review
object will be
associated with exactly one Paper
object).
We provide you with a basic implementation of these objects. You must perform two tasks:
Task 1: Your first task is to implement the following method in Journal
:
def get_papers_above(self, score)
This method must return a list containing the Paper
objects that
have an average review score of score
or higher. When
implementing this method, you may not modify any of the code we
give you, with one exception: you may add one, and only one,
additional method to Paper
.
You can find the skeleton code for this problem in pp/journal.py
.
This code includes some test code that you can run with the Linux
command:
$ python3 journal.py
Task 2: As you can see in the provided code, the identity of a
reviewer is stored simply as a string attribute in the Review
class. There would be a number of advantages to modelling reviewers as
a separate Reviewer
class instead. For example, we could model the
reviewer’s areas of interest, and use that to better match reviewers
to papers to review.
In this task, you will write the definition of a Reviewer
class.
Your implementation must must meet the following requirements:
- A reviewer has a name, a university affiliation, and a list of areas of interest. A single area of interest can be modelled as a string, just like the areas of specialization in the Paper class.
- The areas of interest should be provided when a Reviewer object is created, but it must also be possible to add and remove areas of interest.
- Given a Paper object, we would like to know whether the reviewer is a good match for that paper. That is, we want to know whether the review has at least one area of interests that overlaps with the areas listed for the paper.
You will need to write test code that
- Constructs a Journal object,
- Constructs Reviewer objects,
- Constructs Paper objects,
- Adds reviews to papers,
- Checks whether a reviewer is a good matches for a few papers, and
- Add and remove areas from reviewers re-check whether they are good matches for a few papers.
This task will give you substantial practice with classes. It is more complex than we would ask on an exam.