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)¶
Proxy class to facilitate access to the call for papers settings.
- property announcement¶
- property assignees¶
- can_access_judging_area(user)¶
- can_access_reviewing_area(user)¶
- can_submit_proceedings(user)¶
Check if the user can theoretically submit papers.
This does not check if the user actually has any contributions for which they can submit a paper. To check if a user can submit a paper for a specific contribution, use
Contribution.can_submit_proceedings
instead.
- close()¶
- property content_review_questions¶
- content_reviewer_deadline¶
- content_reviewer_deadline_enforced¶
- property content_reviewers¶
- content_reviewing_enabled¶
- end_dt¶
- get_questions_for_review_type(review_type)¶
- get_reviewing_state(reviewing_type)¶
- property has_ended¶
- property has_started¶
- hide_accepted¶
- is_authorized_submitter(user)¶
Check if the user can submit papers even when the CfP is closed.
- property is_content_reviewing_possible¶
- is_judge(user)¶
- property is_layout_reviewing_possible¶
- is_manager(user)¶
- property is_open¶
- is_reviewer(user, role=None)¶
- is_staff(user)¶
- judge_deadline¶
- judge_deadline_enforced¶
- property judges¶
- property layout_review_questions¶
- layout_reviewer_deadline¶
- layout_reviewer_deadline_enforced¶
- property layout_reviewers¶
- layout_reviewing_enabled¶
- property managers¶
- open()¶
- property rating_range¶
- schedule(start_dt, end_dt)¶
- set_reviewing_state(reviewing_type, enable)¶
- start_dt¶
- property user_competences¶
- class indico.modules.events.papers.models.comments.PaperReviewComment(**kwargs)¶
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)¶
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)¶
- query: IndicoBaseQuery¶
A SQLAlchemy query for a model. Equivalent to
db.session.query(Model)
. Can be customized per-model by overridingquery_class
.Warning
The query interface is considered legacy in SQLAlchemy. Prefer using
session.execute(select())
instead.
- user¶
- user_id¶
- class indico.modules.events.papers.models.files.PaperFile(*args, **kwargs)¶
- add_file_date_column = False¶
Whether to track the creation time. This is required when using versioning!
- 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.
- property 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)¶
Proxy class to facilitate access to all paper-related properties.
- accepted_revision¶
- call_for_proposals_attr = 'cfp'¶
Attribute to retrieve the object with access to the reviewing settings
- 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()¶
- property is_in_final_state¶
- property 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'¶
A unique identifier to handle rendering differences between proposal types
- proxied_attr = 'contribution'¶
- reset_state()¶
- revision_count¶
- revisions¶
- revisions_enabled = True¶
Whether there is support for multiple revisions per proposal or just one
- property state¶
- title¶
- verbose_title¶
- class indico.modules.events.papers.models.review_questions.PaperReviewQuestion(**kwargs)¶
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'¶
name of backref from event to questions
- event_id¶
- property 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)¶
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
PaperReviewQuestion
- question_id¶
- review¶
- review_class¶
alias of
PaperReview
- review_id¶
- value¶
- class indico.modules.events.papers.models.reviews.PaperAction(value)¶
An enumeration.
- accept = 1¶
- reject = 2¶
- to_be_corrected = 3¶
- class indico.modules.events.papers.models.reviews.PaperCommentVisibility(value)¶
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)¶
A timeline item for the non final judgments.
- property created_dt¶
- timeline_item_type = 'judgment'¶
- class indico.modules.events.papers.models.reviews.PaperReview(**kwargs)¶
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'¶
Object used to group reviews together
- 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}¶
- proposed_action¶
- render_mode = 2¶
- revision¶
- revision_attr = 'revision'¶
The revision object that the review refers to
- revision_id¶
- property score¶
- type¶
- user¶
- user_id¶
- property visibility¶
- class indico.modules.events.papers.models.reviews.PaperReviewType(value)¶
An enumeration.
- content = 2¶
- layout = 1¶
- class indico.modules.events.papers.models.reviews.PaperTypeProxy(group)¶
- 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)¶
- 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¶
- property 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.
- property number¶
- property paper¶
- possible_render_modes = {RenderMode.markdown}¶
- proposal_attr = 'paper'¶
The attribute of the revision used to fetch the proposal object.
- render_mode = 2¶
- property spotlight_file¶
- state¶
- submitted_dt¶
- submitter¶
- submitter_id¶
- property timeline¶
- class indico.modules.events.papers.models.revisions.PaperRevisionState(value)¶
An enumeration.
- accepted = 2¶
- rejected = 3¶
- submitted = 1¶
- to_be_corrected = 4¶
- class indico.modules.events.papers.models.templates.PaperTemplate(**kwargs)¶
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¶
Whether to track the creation time. This is required when using versioning!
- 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)¶
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)¶
Retrieve 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)¶
- attr = 'event'¶
- class indico.modules.events.settings.EventSettingsProxy(module, defaults=None, strict=True, acls=None, converters=None)¶
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
- property 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¶
- property defaults¶
- get_themes_for(event_type)¶
- property settings¶
- property themes¶
- indico.modules.events.settings.event_or_id(f)¶