Paper¶
Todo
Docstrings (module, models, operations, utilities, settings)
The papers
module handles the Indico’s Paper Peer Reviewing workflow.
The “inputs” of this module are the conference papers, which will be uploaded
by the corresponding authors/submitters.
Models¶
-
class
indico.modules.events.papers.models.call_for_papers.
CallForPapers
(event)¶ Bases:
object
Proxy class to facilitate access to the call for papers settings.
-
announcement
¶
-
assignees
¶
-
can_access_judging_area
(user)¶
-
can_access_reviewing_area
(user)¶
-
close
()¶
-
content_review_questions
¶
-
content_reviewer_deadline
¶
-
content_reviewer_deadline_enforced
¶
-
content_reviewers
¶
-
content_reviewing_enabled
¶
-
end_dt
¶
-
get_questions_for_review_type
(review_type)¶
-
get_reviewing_state
(reviewing_type)¶
-
has_ended
¶
-
has_started
¶
-
is_judge
(user)¶
-
is_manager
(user)¶
-
is_open
¶
-
is_reviewer
(user, role=None)¶
-
is_staff
(user)¶
-
judge_deadline
¶
-
judges
¶
-
layout_review_questions
¶
-
layout_reviewer_deadline
¶
-
layout_reviewer_deadline_enforced
¶
-
layout_reviewers
¶
-
layout_reviewing_enabled
¶
-
managers
¶
-
open
()¶
-
rating_range
¶
-
schedule
(start_dt, end_dt)¶
-
set_reviewing_state
(reviewing_type, enable)¶
-
start_dt
¶
-
user_competences
¶
-
-
class
indico.modules.events.papers.models.comments.
PaperReviewComment
(**kwargs)¶ Bases:
indico.modules.events.models.reviews.ProposalCommentMixin
,indico.core.db.sqlalchemy.review_comments.ReviewCommentMixin
,sqlalchemy.orm.decl_api.Model
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
can_edit
(user)¶
-
can_view
(user)¶
-
created_dt
¶
-
id
¶
-
is_deleted
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
modified_by
¶
-
modified_by_id
¶
-
modified_dt
¶
-
paper_revision
¶
-
render_mode
= 2¶
-
revision_id
¶
-
user
¶
-
user_backref_name
= 'review_comments'¶
-
user_id
¶
-
user_modified_backref_name
= 'modified_review_comments'¶
-
visibility
¶
-
-
class
indico.modules.events.papers.models.competences.
PaperCompetence
(**kwargs)¶ Bases:
sqlalchemy.orm.decl_api.Model
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
competences
¶
-
event
¶
-
event_id
¶
-
id
¶
-
classmethod
merge_users
(target, source)¶
-
user
¶
-
user_id
¶
-
-
class
indico.modules.events.papers.models.files.
PaperFile
(*args, **kwargs)¶ Bases:
indico.core.storage.models.StoredFileMixin
,sqlalchemy.orm.decl_api.Model
-
add_file_date_column
= False¶
-
content_type
¶ The MIME type of the file.
-
created_dt
= None¶
-
extension
¶ The extension of the file.
-
filename
¶ The name of the file.
-
id
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
md5
¶ An MD5 hash of the file.
Automatically assigned when save() is called.
-
paper
¶
-
paper_revision
¶
-
revision_id
¶
-
size
¶ The size of the file (in bytes).
Automatically assigned when save() is called.
-
storage_backend
¶
-
storage_file_id
¶
-
-
class
indico.modules.events.papers.models.papers.
Paper
(contribution)¶ Bases:
indico.modules.events.models.reviews.ProposalMixin
Proxy class to facilitate access to all paper-related properties.
-
accepted_revision
¶
-
call_for_proposals_attr
= 'cfp'¶
-
can_comment
(user, check_state=False)¶
-
can_judge
(user, check_state=False)¶
-
can_manage
(user)¶
-
can_review
(user, check_state=False)¶
-
can_submit
(user)¶
-
event
¶
-
files
¶
-
get_last_revision
()¶
-
get_revisions
()¶
-
is_in_final_state
¶
-
judgment_comment
¶
-
last_revision
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
proposal_type
= 'paper'¶
-
proxied_attr
= 'contribution'¶
-
reset_state
()¶
-
revision_count
¶
-
revisions
¶
-
revisions_enabled
= True¶
-
state
¶
-
title
¶
-
verbose_title
¶
-
-
class
indico.modules.events.papers.models.review_questions.
PaperReviewQuestion
(**kwargs)¶ Bases:
indico.core.db.sqlalchemy.review_questions.ReviewQuestionMixin
,sqlalchemy.orm.decl_api.Model
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
description
¶
-
event
¶
-
event_backref_name
= 'paper_review_questions'¶
-
event_id
¶
-
field
¶
-
field_data
¶
-
field_type
¶
-
id
¶
-
is_deleted
¶
-
is_required
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
position
¶
-
title
¶
-
type
¶
-
-
class
indico.modules.events.papers.models.review_ratings.
PaperReviewRating
(**kwargs)¶ Bases:
indico.core.db.sqlalchemy.review_ratings.ReviewRatingMixin
,sqlalchemy.orm.decl_api.Model
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
id
¶
-
question
¶
-
question_class
¶ alias of
indico.modules.events.papers.models.review_questions.PaperReviewQuestion
-
question_id
¶
-
review
¶
-
review_class
¶ alias of
indico.modules.events.papers.models.reviews.PaperReview
-
review_id
¶
-
value
¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperAction
¶ Bases:
indico.util.enum.RichIntEnum
An enumeration.
-
accept
= 1¶
-
reject
= 2¶
-
to_be_corrected
= 3¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperCommentVisibility
¶ Bases:
indico.util.enum.RichIntEnum
Most to least restrictive visibility for paper comments.
-
contributors
= 3¶
-
judges
= 1¶
-
reviewers
= 2¶
-
users
= 4¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperJudgmentProxy
(paper)¶ Bases:
object
A timeline item for the non final judgments.
-
created_dt
¶
-
timeline_item_type
= 'judgment'¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperReview
(**kwargs)¶ Bases:
indico.modules.events.models.reviews.ProposalReviewMixin
,indico.core.db.sqlalchemy.descriptions.RenderModeMixin
,sqlalchemy.orm.decl_api.Model
A paper review, emitted by a layout or content reviewer.
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
TIMELINE_TYPE
= 'review'¶
-
can_edit
(user, check_state=False)¶
-
can_view
(user)¶
-
comment
¶
-
created_dt
¶
-
default_render_mode
= 2¶
-
group_attr
= 'type'¶
-
group_proxy_cls
¶ alias of
PaperTypeProxy
-
id
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
modified_dt
¶
-
possible_render_modes
= {<RenderMode.markdown: 2>}¶
-
proposed_action
¶
-
render_mode
= 2¶
-
revision
¶
-
revision_attr
= 'revision'¶
-
revision_id
¶
-
score
¶
-
type
¶
-
user
¶
-
user_id
¶
-
visibility
¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperReviewType
¶ Bases:
indico.util.enum.RichIntEnum
An enumeration.
-
content
= 2¶
-
layout
= 1¶
-
-
class
indico.modules.events.papers.models.reviews.
PaperTypeProxy
(group)¶ Bases:
indico.modules.events.models.reviews.ProposalGroupProxy
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
-
class
indico.modules.events.papers.models.revisions.
PaperRevision
(*args, **kwargs)¶ Bases:
indico.modules.events.models.reviews.ProposalRevisionMixin
,indico.core.db.sqlalchemy.descriptions.RenderModeMixin
,sqlalchemy.orm.decl_api.Model
-
default_render_mode
= 2¶
-
get_reviewed_for_groups
(user, include_reviewed=False)¶
-
get_reviews
(group=None, user=None)¶
-
get_spotlight_file
()¶
-
get_timeline
(user=None)¶
-
has_user_reviewed
(user, review_type=None)¶
-
id
¶
-
is_last_revision
¶
-
judge
¶
-
judge_id
¶
-
judgment_comment
¶
-
judgment_dt
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
number
¶
-
paper
¶
-
possible_render_modes
= {<RenderMode.markdown: 2>}¶
-
proposal_attr
= 'paper'¶
-
render_mode
= 2¶
-
spotlight_file
¶
-
state
¶
-
submitted_dt
¶
-
submitter
¶
-
submitter_id
¶
-
timeline
¶
-
-
class
indico.modules.events.papers.models.revisions.
PaperRevisionState
¶ Bases:
indico.util.enum.RichIntEnum
An enumeration.
-
accepted
= 2¶
-
rejected
= 3¶
-
submitted
= 1¶
-
to_be_corrected
= 4¶
-
-
class
indico.modules.events.papers.models.templates.
PaperTemplate
(**kwargs)¶ Bases:
indico.core.storage.models.StoredFileMixin
,sqlalchemy.orm.decl_api.Model
A simple constructor that allows initialization from kwargs.
Sets attributes on the constructed instance using the names and values in
kwargs
.Only keys that are present as attributes of the instance’s class are allowed. These could be, for example, any mapped columns or relationships.
-
add_file_date_column
= False¶
-
content_type
¶ The MIME type of the file.
-
created_dt
= None¶
-
description
¶
-
event
¶
-
event_id
¶
-
extension
¶ The extension of the file.
-
filename
¶ The name of the file.
-
id
¶
-
locator
¶ Define a smart locator property.
This behaves pretty much like a normal read-only property and the decorated function should return a dict containing the necessary data to build a URL for the object.
This decorator should usually be applied to a method named
locator
as this name is required for get_locator to find it automatically when just passing the object.If you need more than one locator, you can define it like this:
@locator_property def locator(self): return {...} @locator.other def locator(self): return {...}
The
other
locator can then be accessed by passingobj.locator.other
to the code expecting an object with a locator.
-
md5
¶ An MD5 hash of the file.
Automatically assigned when save() is called.
-
name
¶
-
size
¶ The size of the file (in bytes).
Automatically assigned when save() is called.
-
storage_backend
¶
-
storage_file_id
¶
-
Operations¶
-
indico.modules.events.papers.operations.
close_cfp
(event)¶
-
indico.modules.events.papers.operations.
create_comment
(paper, text, visibility, user)¶
-
indico.modules.events.papers.operations.
create_competences
(event, user, competences)¶
-
indico.modules.events.papers.operations.
create_paper_revision
(paper, submitter, files)¶
-
indico.modules.events.papers.operations.
create_paper_template
(event, data)¶
-
indico.modules.events.papers.operations.
create_review
(paper, review_type, user, review_data, questions_data)¶
-
indico.modules.events.papers.operations.
delete_comment
(comment)¶
-
indico.modules.events.papers.operations.
delete_paper_template
(template)¶
-
indico.modules.events.papers.operations.
judge_paper
(paper, judgment, comment, judge)¶
-
indico.modules.events.papers.operations.
open_cfp
(event)¶
-
indico.modules.events.papers.operations.
reset_paper_state
(paper)¶
-
indico.modules.events.papers.operations.
schedule_cfp
(event, start_dt, end_dt)¶
-
indico.modules.events.papers.operations.
set_deadline
(event, role, deadline, enforce=True)¶
-
indico.modules.events.papers.operations.
set_reviewing_state
(event, reviewing_type, enable)¶
-
indico.modules.events.papers.operations.
update_comment
(comment, text=None, visibility=None)¶
-
indico.modules.events.papers.operations.
update_competences
(user_competences, competences)¶
-
indico.modules.events.papers.operations.
update_paper_template
(template, data)¶
-
indico.modules.events.papers.operations.
update_review
(review, review_data, questions_data)¶
-
indico.modules.events.papers.operations.
update_reviewing_roles
(event, users, contributions, role, assign)¶
-
indico.modules.events.papers.operations.
update_team_members
(event, managers, judges, content_reviewers=None, layout_reviewers=None)¶
Utilities¶
-
indico.modules.events.papers.util.
get_contributions_with_paper_submitted_by_user
(event, user)¶
-
indico.modules.events.papers.util.
get_events_with_paper_roles
(user, dt=None)¶ Get the IDs and PR roles of events where the user has any kind of paper reviewing privileges.
Parameters: - user – A User
- dt – Only include events taking place on/after that date
Returns: A dict mapping event IDs to a set of roles
-
indico.modules.events.papers.util.
get_user_contributions_to_review
(event, user)¶ Get the list of contributions where user has paper to review.
-
indico.modules.events.papers.util.
get_user_reviewed_contributions
(event, user)¶ Get the list of contributions where user already reviewed paper.
-
indico.modules.events.papers.util.
get_user_submittable_contributions
(event, user)¶
-
indico.modules.events.papers.util.
has_contributions_with_user_paper_submission_rights
(event, user)¶
-
indico.modules.events.papers.util.
is_type_reviewing_possible
(cfp, review_type)¶
Settings¶
-
class
indico.modules.events.settings.
EventACLProxy
(proxy)¶ Bases:
indico.core.settings.proxy.ACLProxyBase
Proxy class for event-specific ACL settings.
-
add_principal
(event, name, principal)¶ Add a principal to an ACL.
Parameters: - event – Event (or its ID)
- name – Setting name
- principal – A
User
or aGroupProxy
-
contains_user
(event, name, user)¶ Check if a user is in an ACL.
To pass this check, the user can either be in the ACL itself or in a group in the ACL.
Parameters: - event – Event (or its ID)
- name – Setting name
- user – A
User
-
get
(event, name)¶ Retrieves an ACL setting
Parameters: - event – Event (or its ID)
- name – Setting name
-
merge_users
(target, source)¶ Replace all ACL user entries for source with target.
-
remove_principal
(event, name, principal)¶ Remove a principal from an ACL.
Parameters: - event – Event (or its ID)
- name – Setting name
- principal – A
User
or aGroupProxy
-
set
(event, name, acl)¶ Replace an ACL with a new one.
Parameters: - event – Event (or its ID)
- name – Setting name
- acl – A set containing principals (users/groups)
-
-
class
indico.modules.events.settings.
EventSettingProperty
(proxy, name, default=<object object>, attr=None)¶ Bases:
indico.core.settings.proxy.SettingProperty
-
attr
= 'event'¶
-
-
class
indico.modules.events.settings.
EventSettingsProxy
(module, defaults=None, strict=True, acls=None, converters=None)¶ Bases:
indico.core.settings.proxy.SettingsProxyBase
Proxy class to access event-specific settings for a certain module.
-
acl_proxy_class
¶ alias of
EventACLProxy
-
delete
(event, *names)¶ Delete settings.
Parameters: - event – Event (or its ID)
- names – One or more names of settings to delete
-
delete_all
(event)¶ Delete all settings.
Parameters: event – Event (or its ID)
-
get
(event, name, default=<object object>)¶ Retrieve the value of a single setting.
Parameters: - event – Event (or its ID)
- name – Setting name
- default – Default value in case the setting does not exist
Returns: The settings’s value or the default value
-
get_all
(event, no_defaults=False)¶ Retrieve all settings.
Parameters: - event – Event (or its ID)
- no_defaults – Only return existing settings and ignore defaults.
Returns: Dict containing the settings
-
query
¶ Return a query object filtering by the proxy’s module.
-
set
(event, name, value)¶ Set a single setting.
Parameters: - event – Event (or its ID)
- name – Setting name
- value – Setting value; must be JSON-serializable
-
set_multi
(event, items)¶ Set multiple settings at once.
Parameters: - event – Event (or its ID)
- items – Dict containing the new settings
-
-
class
indico.modules.events.settings.
ThemeSettingsProxy
¶ Bases:
object
-
defaults
¶
-
get_themes_for
(event_type)¶
-
settings
¶
-
themes
¶
-
-
indico.modules.events.settings.
event_or_id
(f)¶