API Documentation¶
Client¶
-
class
openreview.Client(baseurl=None, username=None, password=None, token=None)[source]¶ - Parameters
baseurl (str, optional) – URL to the host, example: https://openreview.net (should be replaced by ‘host’ name). If none is provided, it defaults to the environment variable OPENREVIEW_BASEURL
username (str, optional) – OpenReview username. If none is provided, it defaults to the environment variable OPENREVIEW_USERNAME
password (str, optional) – OpenReview password. If none is provided, it defaults to the environment variable OPENREVIEW_PASSWORD
token (str, optional) – Session token. This token can be provided instead of the username and password if the user had already logged in
-
activate_user(token, content)[source]¶ Activates a newly registered user
- Parameters
- Returns
Dictionary containing user information and the authentication token
- Return type
Example:
>>> res = client.activate_user('new@user.com', { 'names': [ { 'first': 'New', 'last': 'User', 'username': '~New_User1' } ], 'emails': ['new@user.com'], 'preferredEmail': 'new@user.com' })
-
delete_edges(invitation, label=None, head=None, tail=None)[source]¶ Deletes edges by a combination of invitation id and one or more of the optional filters.
- Parameters
- Returns
a {status = ‘ok’} in case of a successful deletion and an OpenReview exception otherwise
- Return type
-
delete_profile_reference(reference_id)[source]¶ Deletes the Profile Reference specified by reference_id.
-
get_edge(id)[source]¶ Get a single Edge by id if available
- Parameters
id (str) – id of the Edge
return: Edge object with its information :rtype: Edge
-
get_edges(id=None, invitation=None, head=None, tail=None, label=None, limit=None, offset=None)[source]¶ Returns a list of Edge objects based on the filters provided.
- Parameters
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
-
get_edges_count(id=None, invitation=None, head=None, tail=None, label=None)[source]¶ Returns a list of Edge objects based on the filters provided.
- Parameters
id – a Edge ID. If provided, returns Edge whose ID matches the given ID.
invitation – an Invitation ID. If provided, returns Edges whose “invitation” field is this Invitation ID.
head – Profile ID of the Profile that is connected to the Note ID in tail
tail – Note ID of the Note that is connected to the Profile ID in head
label – Label ID of the match
-
get_group(id)[source]¶ Get a single Group by id if available
- Parameters
id (str) – id of the group
- Returns
Dictionary with the group information
- Return type
Example:
>>> group = client.get_group('your-email@domain.com')
-
get_grouped_edges(invitation=None, head=None, tail=None, label=None, groupby='head', select='tail', limit=None, offset=None)[source]¶ Returns a list of JSON objects where each one represents a group of edges. For example calling this method with default arguments will give back a list of groups where each group is of the form: {id: {head: paper-1} values: [ {tail: user-1}, {tail: user-2} ]} Note: The limit applies to the number of groups returned. It does not apply to the number of edges within the groups.
- Parameters
invitation –
groupby –
select –
limit –
offset –
- Returns
-
get_groups(id=None, regex=None, member=None, signatory=None, limit=None, offset=None)[source]¶ Gets list of Group objects based on the filters provided. The Groups that will be returned match all the criteria passed in the parameters.
- Parameters
id (str, optional) – id of the Group
regex (str, optional) – Regex that matches several Group ids
member (str, optional) – Groups that contain this member
signatory (str, optional) – Groups that contain this signatory
limit (int, optional) – Maximum amount of Groups that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Groups will be returned
offset (int, optional) – Indicates the position to start retrieving Groups. For example, if there are 10 Groups and you want to obtain the last 3, then the offset would need to be 7.
- Returns
List of Groups
- Return type
-
get_invitation(id)[source]¶ Get a single invitation by id if available
- Parameters
id (str) – id of the invitation
- Returns
Invitation matching the passed id
- Return type
-
get_invitations(id=None, invitee=None, replytoNote=None, replyForum=None, signature=None, note=None, regex=None, tags=None, limit=None, offset=None, minduedate=None, duedate=None, pastdue=None, replyto=None, details=None, expired=None)[source]¶ Gets list of Invitation objects based on the filters provided. The Invitations that will be returned match all the criteria passed in the parameters.
- Parameters
id (str, optional) – id of the Invitation
invitee (str, optional) – Invitations that contain this invitee
replytoNote (str, optional) – Invitations that contain this replytoNote
replyForum (str, optional) – Invitations that contain this replyForum
signature (optional) – Invitations that contain this signature
note (str, optional) – Invitations that contain this note
regex (str, optional) – Invitation ids that match this regex
tags (Tag, optional) – Invitations that contain these tags
limit (int, optional) – Maximum amount of Invitations that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Invitations will be returned
offset (int, optional) – Indicates the position to start retrieving Invitations. For example, if there are 10 Invitations and you want to obtain the last 3, then the offset would need to be 7.
minduedate (int, optional) – Invitations that have at least this value as due date
duedate (int, optional) – Invitations that contain this due date
pastdue (bool, optional) – Invitaions that are past due
replyto (optional) – Invitations that contain this replyto
details (dict, optional) – TODO: What is a valid value for this field?
expired (bool, optional) – If true, retrieves the Invitations that have expired, otherwise, the ones that have not expired
- Returns
List of Invitations
- Return type
-
get_messages(to=None, subject=None, offset=None, limit=None)[source]¶ Only for Super User. Retrieves all the messages sent to a list of usernames or emails and/or a particular e-mail subject
-
get_notes(id=None, paperhash=None, forum=None, original=None, invitation=None, replyto=None, tauthor=None, signature=None, writer=None, trash=None, number=None, content=None, limit=None, offset=None, mintcdate=None, details=None, sort=None)[source]¶ Gets list of Note objects based on the filters provided. The Notes that will be returned match all the criteria passed in the parameters.
- Parameters
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – A “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – A Note ID. If provided, returns Notes whose forum matches the given ID.
original (str, optional) – A Note ID. If provided, returns Notes whose original matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID.
tauthor (str, optional) – A Group ID. If provided, returns Notes whose tauthor field (“true author”) matches the given ID, or is a transitive member of the Group represented by the given ID.
signature (str, optional) – A Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
writer (str, optional) – A Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
details (optional) – TODO: What is a valid value for this field?
sort (str, optional) – Sorts the output by field depending on the string passed. Possible values: number, cdate, ddate, tcdate, tmdate, replyCount (Invitation id needed in the invitation field).
- Returns
List of Notes
- Return type
-
get_pdf(id, is_reference=False)[source]¶ Gets the binary content of a pdf using the provided note/reference id If the pdf is not found then this returns an error message with “status”:404.
Use the note id when trying to get the latest pdf version and reference id when trying to get a previous version of the pdf
- Parameters
- Returns
The binary content of a pdf
- Return type
Example:
>>> f = get_pdf(id='Place Note-ID here') >>> with open('output.pdf','wb') as op: op.write(f)
-
get_process_logs(id=None, invitation=None)[source]¶ Only for Super User. Retrieves the logs of the process function executed by an Invitation
-
get_profiles(email_or_id_list=None, id=None, email=None, first=None, middle=None, last=None)[source]¶ Gets a list of profiles
- Parameters
- Returns
List of profiles
- Return type
Deprecated since version 0.9.20: Use search_profiles instead
-
get_references(referent=None, invitation=None, content=None, mintcdate=None, limit=None, offset=None, original=False, trash=None)[source]¶ Gets a list of revisions for a note. The revisions that will be returned match all the criteria passed in the parameters.
Refer to the section of Mental Models and then click on Blind Submissions for more information.
- Parameters
referent (str, optional) – A Note ID. If provided, returns references whose “referent” value is this Note ID.
invitation (str, optional) – An Invitation ID. If provided, returns references whose “invitation” field is this Invitation ID.
mintcdate (int, optional) – Represents an Epoch time timestamp, in milliseconds. If provided, returns references whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
original (bool, optional) – If True then get_references will additionally return the references to the original note.
- Returns
List of revisions
- Return type
Gets a list of Tag objects based on the filters provided. The Tags that will be returned match all the criteria passed in the parameters.
- Parameters
id (str, optional) – A Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – A Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – An Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns
List of tags
- Return type
-
get_tildeusername(first, last, middle=None)[source]¶ Gets next possible tilde user name corresponding to the specified first, middle and last name
-
post_direct_message(subject, recipients, message, sender=None)[source]¶ Posts a message to the recipients and consequently sends them emails
-
post_edges(edges)[source]¶ Posts the list of Edges. Returns a list Edge objects updated with their ids.
-
post_group(group, overwrite=True)[source]¶ Posts the group. If the group is unsigned, signs it using the client’s default signature.
-
post_invitation(invitation)[source]¶ Posts the invitation. If the invitation is unsigned, signs it using the client’s default signature.
- Parameters
invitation (Invitation) – Invitation to be posted
- Returns
The posted Invitation
- Return type
-
post_message(subject, recipients, message, ignoreRecipients=None, sender=None)[source]¶ Posts a message to the recipients and consequently sends them emails
-
post_note(note)[source]¶ Posts the note. If the note is unsigned, signs it using the client’s default signature.
-
post_tag(tag)[source]¶ Posts the tag. If the tag is unsigned, signs it using the client’s default signature.
- Parameters
tag (Tag) – Tag to be posted
- Return Tag
The posted Tag
-
put_pdf(fname)[source]¶ Uploads a pdf to the openreview server
- Parameters
fname (str) – Path to the pdf
- Returns
A relative URL for the uploaded pdf
- Return type
Deprecated since version 1.0.3: Use put_attachment instead
-
register_user(email=None, first=None, last=None, middle='', password=None)[source]¶ Registers a new user
- Parameters
- Returns
Dictionary containing the new user information including his id, username, email(s), readers, writers, etc.
- Return type
-
search_notes(term, content='all', group='all', source='all', limit=None, offset=None)[source]¶ Searches notes based on term, content, group and source as the criteria. Unlike
get_notes(), this method uses Elasticsearch to retrieve the Notes- Parameters
term (str) – Term used to look for the Notes
content (str, optional) – Specifies whether to look in all the content, authors, or keywords. Valid inputs: ‘all’, ‘authors’, ‘keywords’
group (str, optional) – Specifies under which Group to look. E.g. ‘all’, ‘ICLR’, ‘UAI’, etc.
source (str, optional) – Whether to look in papers, replies or all
limit (int, optional) – Maximum amount of Notes that this method will return. The limit parameter can range between 0 and 1000 inclusive. If a bigger number is provided, only 1000 Notes will be returned
offset (int, optional) – Indicates the position to start retrieving Notes. For example, if there are 10 Notes and you want to obtain the last 3, then the offset would need to be 7.
- Returns
List of notes
- Return type
-
search_profiles(emails=None, ids=None, term=None, first=None, middle=None, last=None)[source]¶ Gets a list of profiles using either their ids or corresponding emails
- Parameters
emails (list, optional) – List of emails registered in OpenReview
ids (list, optional) – List of OpenReview username ids
term (str, optional) – Substring in the username or e-mail to be searched
first (str, optional) – First name of user
middle (str, optional) – Middle name of user
last (str, optional) – Last name of user
- Returns
List of profiles
- Return type
-
class
openreview.Group(id, readers, writers, signatories, signatures, cdate=None, ddate=None, members=None, nonreaders=None, web=None, details=None)[source]¶ When a user is created, it is automatically assigned to certain groups that give him different privileges. A username is also a group, therefore, groups can be members of other groups.
- Parameters
id (str) – id of the Group
readers (list[str]) – List of readers in the Group, each reader is a Group id
writers (list[str]) – List of writers in the Group, each writer is a Group id
signatories (list[str]) – List of signatories in the Group, each writer is a Group id
signatures (list[str]) – List of signatures in the Group, each signature is a Group id
cdate (int, optional) – Creation date of the Group
ddate (int, optional) – Deletion date of the Group
members (list[str], optional) – List of members in the Group, each member is a Group id
nonreaders (list[str], optional) – List of nonreaders in the Group, each nonreader is a Group id
web (optional) – Path to a file that contains the webfield
details (optional) –
-
add_member(member)[source]¶ Adds a member to the group. This is done only on the object not in OpenReview. Another method like
post()is needed for the change to show in OpenReview
-
add_webfield(web)[source]¶ Adds a webfield to the group
- Parameters
web (str) – Path to the file that contains the webfield
-
classmethod
from_json(g)[source]¶ Creates a Group object from a dictionary that contains keys values equivalent to the name of the instance variables of the Group class
-
post(client)[source]¶ Posts a group to OpenReview
- Parameters
client (Client) – Client that will post the Group
-
class
openreview.Invitation(id, readers=None, writers=None, invitees=None, signatures=None, reply=None, super=None, noninvitees=None, nonreaders=None, web=None, process=None, process_string=None, duedate=None, expdate=None, cdate=None, ddate=None, tcdate=None, tmdate=None, multiReply=None, taskCompletionCount=None, transform=None, details=None)[source]¶ - Parameters
id (str) – Invitation id
readers (list[str], optional) – List of readers in the Invitation, each reader is a Group id
writers (list[str], optional) – List of writers in the Invitation, each writer is a Group id
invitees (list[str], optional) – List of invitees in the Invitation, each invitee is a Group id
signatures (list[str], optional) – List of signatures in the Invitation, each signature is a Group id
reply (dict, optional) – Template of the Note that will be created
super (str, optional) – Parent Invitation id
noninvitees (list[str], optional) – List of noninvitees in the Invitation, each noninvitee is a Group id
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
web (str, optional) – Path to a file containing a webfield
process (str, optional) – Path to a file containing the process function
process_string (str, optional) – String containin the process function
duedate (int, optional) – Due date
expdate (int, optional) – Expiration date
cdate (int, optional) – Creation date
ddate (int, optional) – Deletion date
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
multiReply (bool, optional) – If true, allows for multiple Notes created from this Invitation (e.g. comments in a forum), otherwise, only one Note may be created (e.g. paper submission)
taskCompletionCount (int, optional) – Keeps count of the number of times the Invitation has been used
transform (str, optional) – Path to a file that contains the transform function
details (dict, optional) –
-
classmethod
from_json(i)[source]¶ Creates an Invitation object from a dictionary that contains keys values equivalent to the name of the instance variables of the Invitation class
- Parameters
i (dict) – Dictionary containing key-value pairs, where the keys values are equivalent to the name of the instance variables in the Invitation class
- Returns
Invitation whose instance variables contain the values from the dictionary
- Return type
-
class
openreview.Note(invitation, readers, writers, signatures, content, id=None, original=None, number=None, cdate=None, tcdate=None, tmdate=None, ddate=None, forum=None, referent=None, replyto=None, nonreaders=None, details=None, tauthor=None)[source]¶ - Parameters
invitation (str) – Invitation id
readers (list[str]) – List of readers in the Invitation, each reader is a Group id
writers (list[str]) – List of writers in the Invitation, each writer is a Group id
signatures (list[str]) – List of signatures in the Invitation, each signature is a Group id
content (dict) – Content of the Note
id (str, optional) – Note id
original (str, optional) – If this Note is a blind copy of a Note, then this contains the id of that Note
number (int, optional) – Note number. E.g. when the Note is a paper submission, this value is the paper number
cdate (int, optional) – Creation date
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
ddate (int, optional) – Deletion date
forum (str, optional) – Forum id
referent (str, optional) – If this Note is used as a ref, this field points to the Profile
replyto (str, optional) – A Note ID. If provided, returns Notes whose replyto field matches the given ID
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
details (dict, optional) –
tauthor (str, optional) – True author
-
class
openreview.Tag(tag, invitation, readers, signatures, id=None, cdate=None, tcdate=None, ddate=None, forum=None, replyto=None, nonreaders=None)[source]¶ - Parameters
tag (str) – Content of the tag
invitation (str) – Invitation id
readers (list[str]) – List of readers in the Invitation, each reader is a Group id
signatures (list[str]) – List of signatures in the Invitation, each signature is a Group id
id (str, optional) – Tag id
cdate (int, optional) – Creation date
tcdate (int, optional) – True creation date
ddate (int, optional) – Deletion date
forum (str, optional) – Forum id
nonreaders (list[str], optional) – List of nonreaders in the Invitation, each nonreader is a Group id
-
class
openreview.Profile(id=None, active=None, password=None, number=None, tcdate=None, tmdate=None, referent=None, packaging=None, invitation=None, readers=None, nonreaders=None, signatures=None, writers=None, content=None, metaContent=None, tauthor=None)[source]¶ - Parameters
id (str, optional) – Profile id
tcdate (int, optional) – True creation date
tmdate (int, optional) – Modification date
referent (str, optional) – If this is a ref, it contains the Profile id that it points to
packaging (dict, optional) – Contains previous versions of this Profile
invitation (str, optional) – Invitation id
readers (str, optional) – List of readers in the Invitation, each reader is a Group id
nonreaders (str, optional) – List of nonreaders in the Invitation, each nonreader is a Group id
signatures (str, optional) – List of signatures in the Invitation, each signature is a Group id
writers (str, optional) – List of writers in the Invitation, each writer is a Group id
content (dict, optional) – Dictionary containing the information of the Profile
metaContent (dict, optional) – Contains information of the entities that have changed the Profile
active (bool, optional) – If true, the Profile is active in OpenReview
password (bool, optional) – If true, the Profile has a password, otherwise, it was automatically created and the person that it belongs to has not set a password yet
tauthor (str, optional) – True author
Tools¶
-
openreview.tools.add_assignment(client, paper_number, conference, reviewer, parent_group_params={}, individual_group_params={}, parent_label='Reviewers', individual_label='AnonReviewer', use_profile=True)[source]¶ Assigns a reviewer to a paper. Also adds the given user to the parent and individual groups defined by the paper number, conference, and labels “individual groups” are groups with a single member; e.g. conference.org/Paper1/AnonReviewer1 “parent group” is the group that contains the individual groups; e.g. conference.org/Paper1/Reviewers
- Parameters
client (Client) – Client used to add the assignment
paper_number (int) – the number of the paper to assign
conference (str) – the ID of the conference being assigned
reviewer (str) – may be an email address or a tilde ID that wants to be assigned to the paper
parent_group_params (dict, optional) – optional parameter that overrides the default
individual_group_params (dict, optional) – optional parameter that overrides the default
parent_label (str, optional) – String used to identify the parent Group
individual_label (str, optional) – String assigned to identify an individual Group
use_profile (bool, optional) – If true, retrieves the profile of the reviewer, otherwise, uses the passed reviewer
- Returns
Tuple containing the passed reviewer in the zeroth position and a list of Group ids in the first position
- Return type
-
openreview.tools.assign(client, paper_number, conference, parent_group_params={}, individual_group_params={}, reviewer_to_add=None, reviewer_to_remove=None, parent_label='Reviewers', individual_label='AnonReviewer', use_profile=True)[source]¶ Either assigns or unassigns a reviewer to a paper. TODO: Is this function really necessary?
“individual groups” are groups with a single member; e.g. conference.org/Paper1/AnonReviewer1 “parent group” is the group that contains the individual groups; e.g. conference.org/Paper1/Reviewers
- Parameters
client (Client) – Client used to assign or unassign a reviewer to a paper
paper_number (int) – the number of the paper to assign
conference (str) – the ID of the conference being assigned
parent_group_params (dict, optional) – optional parameter that overrides the default
individual_group_params (dict, optional) – optional parameter that overrides the default
reviewer_to_add (str, optional) – may be an email address or a tilde ID; adds the given user to the parent and individual groups defined by the paper number, conference, and labels
reviewer_to_remove (str, optional) – same as @reviewer_to_add, but removes the user
parent_label (str, optional) – String used to identify the parent Group
individual_label (str, optional) – String assigned to identify an individual Group
use_profile (bool, optional) – If true, retrieves the profile of the reviewer, otherwise, uses the passed reviewer
- Returns
Tuple containing the passed reviewer in the zeroth position and a list of Group ids in the first position
- Return type
It’s important to remove any users first, so that we can do direct replacement of one user with another.
For example: passing in a reviewer to remove AND a reviewer to add should replace the first user with the second.
Deprecated since version 0.9.5.
-
openreview.tools.build_groups(conference_group_id, default_params=None)[source]¶ Given a group ID, returns a list of empty groups that correspond to the given group’s subpaths
(e.g. Test.com, Test.com/TestConference, Test.com/TestConference/2018)
- Parameters
- Returns
List of the created Groups sorted from general to particular
- Return type
Example:
>>> [group.id for group in build_groups('ICML.cc/2019/Conference')] [u'ICML.cc', u'ICML.cc/2019', u'ICML.cc/2019/Conference']
-
openreview.tools.create_profile(client, email, first, last, middle=None, allow_duplicates=False)[source]¶ Given email, first name, last name, and middle name (optional), creates a new profile.
- Parameters
client (Client) – User that will create the Profile
email (str) – Preferred e-mail in the Profile
first (str) – First name of the user
last (str) – Last name of the user
middle (str, optional) – Middle name of the user
allow_duplicates (bool, optional) – If a profile with the same name exists, and allow_duplicates is False, an exception is raised. If a profile with the same name exists and allow_duplicates is True, a profile is created with the next largest number (e.g. if ~Michael_Spector1 exists, ~Michael_Spector2 will be created)
- Returns
The created Profile
- Return type
-
openreview.tools.datetime_millis(dt)[source]¶ Converts a datetime to milliseconds.
- Parameters
dt (datetime) – A date that want to be converted to milliseconds
- Returns
The time from Jan 1, 1970 to the passed date in milliseconds
- Return type
-
openreview.tools.fill_template(template, paper)[source]¶ Fills an openreview “template” with the corresponding values from an
Noteobject. Templates are dicts that match the schema of any OpenReview object class .Example:
>>> group_template = { 'id': 'Conf.org/2019/Paper<number>', 'members': ['Conf.org/2019/Paper<number>/Reviewers'] }
- Parameters
- Returns
The openreview “template” with the corresponding values from the paper passed as parameter
- Return type
-
openreview.tools.get_bibtex(note, venue_fullname, year, url_forum=None, accepted=False, anonymous=True, names_reversed=False, baseurl='https://openreview.net')[source]¶ Generates a bibtex field for a given Note.
- Parameters
note (Note) – Note from which the bibtex is generated
venue_fullname (str) – Full name of the venue to be placed in the book title field
year (str) – Note year
url_forum (str, optional) – Forum id, if none is provided, it is obtained from the note parameter: note.forum
accepted (bool, optional) – Used to indicate whether or not the paper was ultimately accepted
anonymous (bool, optional) – Used to indicate whether or not the paper’s authors should be revealed
names_reversed (bool, optional) – If true, it indicates that the last name is written before the first name
baseurl (str, optional) – Base url where the bibtex is from. Default https://openreview.net
- Returns
Note bibtex
- Return type
-
openreview.tools.get_conflicts(author_profiles, user_profile)[source]¶ Finds conflicts between the passed user Profile and the author Profiles passed as arguments
-
openreview.tools.get_invitation(client, id)[source]¶ Get a single Invitation by id if available
- Parameters
- Returns
Invitation that matches the passed id or None if it does not exist or it is expired
- Return type
-
openreview.tools.get_paperhash(first_author, title)[source]¶ Returns the paperhash of a paper, given the title and first author.
- Parameters
- Returns
paperhash, see example
- Return type
Example:
>>> get_paperhash('David Soergel', 'Open Scholarship and Peer Review: a Time for Experimentation') u'soergel|open_scholarship_and_peer_review_a_time_for_experimentation'
-
openreview.tools.get_profile(client, value)[source]¶ Get a single profile (a note) by id, if available
-
openreview.tools.get_profile_info(profile)[source]¶ Gets all the domains, emails, relations associated with a Profile
-
openreview.tools.get_reviewer_groups(client, paper_number, conference, group_params, parent_label, individual_label)[source]¶ This is only intended to be used as a local helper function for
tools.add_assignment()- Parameters
client (Client) – Client used to get the Groups
paper_number (int) – the number of the paper to assign
conference (str) – the ID of the conference being assigned
group_params (dict) – optional parameter that overrides the default
parent_label (str) – String assgined to identify the parent Group
individual_label (str) – String assigned to identify a individual Group
- Returns
List containing the parent Group, list of individual groups, and list of unassigned individual groups
- Return type
-
openreview.tools.get_submission_invitations(client, open_only=False)[source]¶ Returns a list of invitation ids visible to the client according to the value of parameter “open_only”.
- Parameters
- Returns
List of Invitation ids
- Return type
Example Usage:
>>> get_submission_invitations(c,True) [u'machineintelligence.cc/MIC/2018/Conference/-/Submission', u'machineintelligence.cc/MIC/2018/Abstract/-/Submission', u'ISMIR.net/2018/WoRMS/-/Submission', u'OpenReview.net/Anonymous_Preprint/-/Submission']
-
class
openreview.tools.iterget(get_function, **params)[source]¶ This class can create an iterator from a getter method that returns a list. Below all the iterators that can be created from a getter method:
openreview.Client.get_tags()–>tools.iterget_tags()openreview.Client.get_notes()–>tools.iterget_notes()openreview.Client.get_references()–>tools.iterget_references()openreview.Client.get_invitations()–>tools.iterget_invitations()openreview.Client.get_groups()–>tools.iterget_groups()- Parameters
get_function (function) – Any of the aforementioned methods
params (dict) – Dictionary containing parameters for the corresponding method. Refer to the passed method documentation for details
-
openreview.tools.iterget_grouped_edges(client, invitation=None, groupby='head', select='id,tail,label,weight', logger=None)[source]¶ Helper function for retrieving and parsing all edges in bulk
-
openreview.tools.iterget_groups(client, id=None, regex=None, member=None, host=None, signatory=None)[source]¶ Returns an iterator over groups filtered by the provided parameters ignoring API limit.
- Parameters
client (Client) – Client used to get the Groups
id (str, optional) – a Note ID. If provided, returns groups whose “id” value is this Group ID.
regex (str, optional) – a regular expression string to match Group IDs. If provided, returns groups whose “id” value matches the given regex.
member (str, optional) – Essentially, members field contains Group Ids that are members of this Group object. If provided, returns groups whose “members” field contains the given string.
host (str, optional) –
signatory (str, optional) – a Group ID. If provided, returns Groups whose signatory field contains the given Group ID.
- Returns
Iterator over Groups filtered by the provided parameters
- Return type
-
openreview.tools.iterget_invitations(client, id=None, invitee=None, regex=None, tags=None, minduedate=None, duedate=None, pastdue=None, replytoNote=None, replyForum=None, signature=None, note=None, replyto=None, details=None, expired=None)[source]¶ Returns an iterator over invitations, filtered by the provided parameters, ignoring API limit.
- Parameters
client (Client) – Client used to get the Invitations
id (str, optional) – an Invitation ID. If provided, returns invitations whose “id” value is this Invitation ID.
invitee (str, optional) – Essentially, invitees field in an Invitation object contains Group Ids being invited using the invitation. If provided, returns invitations whose “invitee” field contains the given string.
regex (str, optional) – a regular expression string to match Invitation IDs. If provided, returns invitations whose “id” value matches the given regex.
tags (list[str], optional) – If provided, returns Invitations whose Tags field contains the given Tag IDs.
minduedate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Invitations whose duedate is at least equal to the value of minduedate.
duedate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Invitations whose duedate field matches the given duedate.
pastdue (bool, optional) –
replytoNote (str, optional) – a Note ID. If provided, returns Invitations whose replytoNote field contains the given Note ID.
replyForum (str, optional) – a forum ID. If provided, returns Invitations whose forum field contains the given forum ID.
signature (str, optional) – a Group ID. If provided, returns Invitations whose signature field contains the given Group ID.
note (str, optional) – a Note ID. If provided, returns Invitations whose note field contains the given Note ID.
replyto (str, optional) – a Note ID. If provided, returns Invitations whose replyto field matches the given Note ID.
details (str, optional) –
expired (bool, optional) – get also expired invitions, by default returns ‘active’ invitations.
- Returns
Iterator over Invitations filtered by the provided parameters
- Return type
-
openreview.tools.iterget_notes(client, id=None, paperhash=None, forum=None, invitation=None, replyto=None, tauthor=None, signature=None, writer=None, trash=None, number=None, mintcdate=None, content=None, details=None, sort=None)[source]¶ Returns an iterator over Notes filtered by the provided parameters ignoring API limit.
- Parameters
client (Client) – Client used to get the Notes
id (str, optional) – a Note ID. If provided, returns Notes whose ID matches the given ID.
paperhash (str, optional) – a “paperhash” for a note. If provided, returns Notes whose paperhash matches this argument. (A paperhash is a human-interpretable string built from the Note’s title and list of authors to uniquely identify the Note)
forum (str, optional) – a Note ID. If provided, returns Notes whose forum matches the given ID.
invitation (str, optional) – an Invitation ID. If provided, returns Notes whose “invitation” field is this Invitation ID.
replyto (str, optional) – a Note ID. If provided, returns Notes whose replyto field matches the given ID.
tauthor (str, optional) – a Group ID. If provided, returns Notes whose tauthor field (“true author”) matches the given ID, or is a transitive member of the Group represented by the given ID.
signature (str, optional) – a Group ID. If provided, returns Notes whose signatures field contains the given Group ID.
writer (str, optional) – a Group ID. If provided, returns Notes whose writers field contains the given Group ID.
trash (bool, optional) – If True, includes Notes that have been deleted (i.e. the ddate field is less than the current date)
number (int, optional) – If present, includes Notes whose number field equals the given integer.
mintcdate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns Notes whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
content (dict, optional) – If present, includes Notes whose each key is present in the content field and it is equals the given value.
details (str, optional) – TODO: What is a valid value for this field?
- Returns
Iterator over Notes filtered by the provided parameters
- Return type
-
openreview.tools.iterget_references(client, referent=None, invitation=None, mintcdate=None)[source]¶ Returns an iterator over references filtered by the provided parameters ignoring API limit.
- Parameters
client (Client) – Client used to get the references
referent (str, optional) – a Note ID. If provided, returns references whose “referent” value is this Note ID.
invitation (str, optional) – an Invitation ID. If provided, returns references whose “invitation” field is this Invitation ID.
mintcdate (int, optional) – Represents an Epoch time timestamp in milliseconds. If provided, returns references whose “true creation date” (tcdate) is at least equal to the value of mintcdate.
- Returns
Iterator over references filtered by the provided parameters
- Return type
Returns an iterator over Tags ignoring API limit.
Example:
>>> iterget_tags(client, invitation='MyConference.org/-/Bid_Tags')
- Parameters
client (Client) – Client used to get the Tags
id (str, optional) – a Tag ID. If provided, returns Tags whose ID matches the given ID.
forum (str, optional) – a Note ID. If provided, returns Tags whose forum matches the given ID.
invitation (str, optional) – an Invitation ID. If provided, returns Tags whose “invitation” field is this Invitation ID.
- Returns
Iterator over Tags filtered by the provided parameters
- Return type
-
openreview.tools.next_individual_suffix(unassigned_individual_groups, individual_groups, individual_label)[source]¶ Gets an individual group’s suffix (e.g. AnonReviewer1). The suffix will be the next available empty group or will be the suffix of the largest indexed group +1
- Parameters
unassigned_individual_groups (list[Group]) – a list of individual groups with no members
individual_groups (list[Group]) – the full list of individual groups (groups with a single member: e.g. conference.org/Paper1/AnonReviewer1), empty or not
individual_label (str) – the “label” of the group: e.g. “AnonReviewer”
- Returns
An individual group’s suffix (e.g. AnonReviewer1)
- Return type
-
openreview.tools.overwrite_pdf(client, note_id, file_path)[source]¶ Overwrite all the references of a note with the new pdf file. If the note has an original note then update original references
-
openreview.tools.parallel_exec(values, func, processes=None)[source]¶ Returns a list of results given for each func value execution. It shows a progress bar to know the progress of the task.
- Parameters
- Returns
A list of results given for each func value execution
- Return type
-
openreview.tools.post_group_parents(client, group, overwrite_parents=False)[source]¶ This function calls
tools.build_groups()using the id of the group parameter. Each group generated from group.id is posted by callingopenreview.Client.post_group()- Parameters
- Returns
List of posted Groups
- Return type
Deprecated since version 0.9.20.
-
openreview.tools.post_submission_groups(client, conference_id, submission_invite, chairs)[source]¶ Create paper group, authors group, reviewers group, review non-readers group for all notes returned by the submission_invite.
-
openreview.tools.recruit_reviewer(client, user, first, hash_seed, recruit_reviewers_id, recruit_message, recruit_message_subj, reviewers_invited_id, verbose=True, baseurl='')[source]¶ Recruit a reviewer. Sends an email to the reviewer with a link to accept or reject the recruitment invitation.
- Parameters
client (Client) – Client used to send the e-mail
user (str) – User to whom the e-mail will be sent
first (str) – First name of the person to whom e-mail will be sent
hash_seed (int) – a random number for seeding the hash.
recruit_message (str) – a formattable string containing the following string variables: (name, accept_url, decline_url)
recruit_message_subj (str) – subject line for the recruitment email
reviewers_invited_id (str) – group ID for the “Reviewers Invited” group, often used to keep track of which reviewers have already been emailed. str
verbose (bool, optional) – Shows response of
openreview.Client.post_message()and shows the body of the message sentbaseurl (str, optional) – Use this baseUrl instead of client.baseurl to create recruitment links
-
openreview.tools.remove_assignment(client, paper_number, conference, reviewer, parent_group_params={}, parent_label='Reviewers', individual_label='AnonReviewer')[source]¶ - Un-assigns a reviewer from a paper.Removes the given user from the parent group, and any assigned individual groups.“individual groups” are groups with a single member;e.g. conference.org/Paper1/AnonReviewer1“parent group” is the group that contains the individual groups;e.g. conference.org/Paper1/Reviewers
- Parameters
client (Client) – Client used to remove the assignment
paper_number (int) – the number of the paper to assign
conference (str) – the ID of the conference being assigned
reviewer (str) – same as @reviewer_to_add, but removes the user
parent_group_params (dict, optional) – optional parameter that overrides the default
parent_label (str, optional) – String used to identify the parent Group
individual_label (str, optional) – String assigned to identify an individual Group
use_profile (bool, optional) – If true, retrieves the profile of the reviewer, otherwise, uses the passed reviewer
- Returns
Tuple containing the passed reviewer in the zeroth position and a list of Group ids in the first position
- Return type
-
openreview.tools.replace_members_with_ids(client, group)[source]¶ Given a Group object, iterates through the Group’s members and, for any member represented by an email address, attempts to find a profile associated with that email address. If a profile is found, replaces the email with the profile id.
-
openreview.tools.subdomains(domain)[source]¶ Given an email address, returns a list with the domains and subdomains.
- Parameters
domain (str) – e-mail address or domain of the e-mail address
- Returns
List of domains and subdomains
- Return type
Example:
>>> subdomains('johnsmith@iesl.cs.umass.edu') [u'iesl.cs.umass.edu', u'cs.umass.edu', u'umass.edu']
-
openreview.tools.timestamp_GMT(year, month, day, hour=0, minute=0, second=0)[source]¶ Given year, month, day, and (optionally) hour, minute, second in GMT time zone: returns the number of milliseconds between this date and Epoch Time (Jan 1, 1970).
- Parameters
- Returns
Number of milliseconds between the passed date and Epoch Time (Jan 1, 1970)
- Return type
>>> timestamp_GMT(1990, 12, 20, hour=12, minute=30, second=24) 661696224000