Abstract

Todo

Docstrings (module, models, operations, utilities, settings)

Models

class indico.modules.events.abstracts.models.abstracts.Abstract(**kwargs)

Bases: indico.modules.events.models.reviews.ProposalMixin, indico.modules.events.models.reviews.ProposalRevisionMixin, indico.core.db.sqlalchemy.descriptions.DescriptionMixin, indico.modules.events.contributions.models.contributions.CustomFieldsMixin, indico.modules.events.models.persons.AuthorsSpeakersMixin, flask_sqlalchemy.Model

Represents an abstract that can be associated to a Contribution.

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.

accepted_contrib_type
accepted_contrib_type_id
accepted_track
accepted_track_id
call_for_proposals_attr = u'cfa'
can_access(user)
can_comment(user, check_state=False)
can_convene(user)
can_edit(user)
can_judge(user, check_state=False)
can_review(user, check_state=False)
can_see_reviews(user)
can_withdraw(user, check_state=False)
candidate_contrib_types
candidate_tracks
create_comment_endpoint = u'abstracts.comment_abstract'
create_judgment_endpoint = u'abstracts.judge_abstract'
create_review_endpoint = u'abstracts.review_abstract'
data_by_field
default_render_mode = 2
delete_comment_endpoint = u'abstracts.delete_abstract_comment'
duplicate_of
duplicate_of_id
edit_comment_endpoint = u'abstracts.edit_abstract_comment'
edit_review_endpoint = u'abstracts.edit_review'
edit_track_mode
event_id
event_new
field_values

Data stored in abstract/contribution fields

friendly_id
get_reviewed_for_groups(user, include_reviewed=False)
get_timeline(user=None)
get_track_question_scores()
get_track_reviewing_state(track)
get_track_score(track)
id
is_deleted
is_in_final_state
judge

User who judged the abstract

judge_id

ID of the user who judged the abstract

judgment_comment
judgment_dt
locator

Defines 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 passing obj.locator.other to the code expecting an object with a locator.

marshmallow_aliases = {u'_description': u'content'}
merged_into
merged_into_id
modified_by
modified_by_id
modified_dt

Persons associated with this abstract

possible_render_modes = set([<RenderMode.markdown: 2>])
proposal_type = u'abstract'
public_state
render_mode = 2
reset_state()
reviewed_for_tracks
reviewing_state
revisions_enabled = False
score
state
submission_comment
submitted_contrib_type
submitted_contrib_type_id
submitted_dt
submitted_for_tracks
submitter

User who submitted the abstract

submitter_id

ID of the user who submitted the abstract

title
user_owns(user)
verbose_title
class indico.modules.events.abstracts.models.abstracts.AbstractPublicState

Bases: indico.util.struct.enum.RichIntEnum

accepted = 3
awaiting = -1
duplicate = 6
merged = 5
rejected = 4
under_review = -2
withdrawn = 2
class indico.modules.events.abstracts.models.abstracts.AbstractReviewingState

Bases: indico.util.struct.enum.RichIntEnum

conflicting = 3
in_progress = 1
mixed = 5
negative = 4
not_started = 0
positive = 2
class indico.modules.events.abstracts.models.abstracts.AbstractState

Bases: indico.util.struct.enum.RichIntEnum

accepted = 3
duplicate = 6
merged = 5
rejected = 4
submitted = 1
withdrawn = 2
class indico.modules.events.abstracts.models.abstracts.EditTrackMode

Bases: int, indico.util.struct.enum.IndicoEnum

both = 1
none = 0
reviewed_for = 2
class indico.modules.events.abstracts.models.call_for_abstracts.CallForAbstracts(event)

Bases: object

Proxy class to facilitate access to the call for abstracts settings

allow_attachments
allow_comments
allow_contributors_in_comments
allow_convener_judgment
announcement
can_edit_abstracts(user)
can_submit_abstracts(user)
close()
end_dt
has_ended
has_started
is_open
judgment_instructions
modification_end_dt
modification_ended
open()
rating_range
reviewing_instructions
schedule(start_dt, end_dt, modification_end_dt)
start_dt
submission_instructions
class indico.modules.events.abstracts.models.comments.AbstractComment(**kwargs)

Bases: indico.modules.events.models.reviews.ProposalCommentMixin, indico.core.db.sqlalchemy.review_comments.ReviewCommentMixin, flask_sqlalchemy.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.

abstract
abstract_id
can_edit(user)
can_view(user)
created_dt
id
is_deleted
locator

Defines 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 passing obj.locator.other to the code expecting an object with a locator.

marshmallow_aliases = {u'_text': u'text'}
modified_by
modified_by_id
modified_dt
render_mode = 2
user
user_backref_name = u'abstract_comments'
user_id
user_modified_backref_name = u'modified_abstract_comments'
visibility
class indico.modules.events.abstracts.models.email_logs.AbstractEmailLogEntry(**kwargs)

Bases: flask_sqlalchemy.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.

abstract
abstract_id
body
classmethod create_from_email(email_data, email_tpl, user=None)

Create a new log entry from the data used to send an email

Parameters:
  • email_data – email data as returned from make_email
  • email_tpl – the abstract email template that created the email
  • user – the user who performed the action causing the notification
data
email_template
email_template_id
id
recipients
sent_dt
subject
user
user_id
class indico.modules.events.abstracts.models.email_templates.AbstractEmailTemplate(**kwargs)

Bases: flask_sqlalchemy.Model

Represents an email template for abstracts notifications.

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.

body

The body of the template

event_id
event_new
extra_cc_emails

List of extra email addresses to be added as CC in the email

id
include_authors

Whether to include authors’ email addresses as To for emails

include_coauthors

Whether to include co-authors’ email addresses as CC for emails

include_submitter

Whether to include the submitter’s email address as To for emails

locator

Defines 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 passing obj.locator.other to the code expecting an object with a locator.

position

The relative position of the template in the list of templates

reply_to_address

The address to use as Reply-To in the email

rules

Conditions need to be met to send the email

stop_on_match

Whether to stop checking the rest of the conditions when a match is found

subject

The subject of the email

title
class indico.modules.events.abstracts.models.fields.AbstractFieldValue(**kwargs)

Bases: indico.modules.events.contributions.models.fields.ContributionFieldValueBase

Store a field values related to abstracts.

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.

abstract_id
contribution_field
contribution_field_backref_name = u'abstract_values'
contribution_field_id
data
class indico.modules.events.abstracts.models.files.AbstractFile(**kwargs)

Bases: indico.core.storage.models.StoredFileMixin, flask_sqlalchemy.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.

abstract
abstract_id
add_file_date_column = False
content_type

The MIME type of the file

created_dt = None
filename

The name of the file

id
locator
md5

An MD5 hash of the file.

Automatically assigned when save() is called.

size

The size of the file (in bytes).

Automatically assigned when save() is called.

storage_backend
storage_file_id

Bases: indico.modules.events.models.persons.PersonLinkBase

Association between EventPerson and Abstract.

abstract_id
author_type
display_order
id
is_speaker
locator

Defines 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 passing obj.locator.other to the code expecting an object with a locator.

object_relationship_name = u'abstract'
person
person_id
class indico.modules.events.abstracts.models.review_questions.AbstractReviewQuestion(**kwargs)

Bases: indico.core.db.sqlalchemy.review_questions.ReviewQuestionMixin, flask_sqlalchemy.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.

event_backref_name = u'abstract_review_questions'
event_id
event_new
id
is_deleted
no_score
position
text
class indico.modules.events.abstracts.models.review_ratings.AbstractReviewRating(**kwargs)

Bases: indico.core.db.sqlalchemy.review_ratings.ReviewRatingMixin, flask_sqlalchemy.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 AbstractReviewQuestion

question_id
review
review_class

alias of AbstractReview

review_id
value
class indico.modules.events.abstracts.models.reviews.AbstractAction

Bases: indico.util.struct.enum.RichIntEnum

accept = 1
change_tracks = 3
mark_as_duplicate = 4
merge = 5
reject = 2
class indico.modules.events.abstracts.models.reviews.AbstractCommentVisibility

Bases: indico.util.struct.enum.RichIntEnum

Most to least restrictive visibility for abstract comments

contributors = 4
conveners = 2
judges = 1
reviewers = 3
users = 5
class indico.modules.events.abstracts.models.reviews.AbstractReview(**kwargs)

Bases: indico.modules.events.models.reviews.ProposalReviewMixin, indico.core.db.sqlalchemy.descriptions.RenderModeMixin, flask_sqlalchemy.Model

Represents an abstract review, emitted by a 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.

abstract
abstract_id
can_edit(user, check_state=False)
can_view(user)
comment
created_dt
default_render_mode = 2
group_attr = u'track'
id
locator

Defines 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 passing obj.locator.other to the code expecting an object with a locator.

marshmallow_aliases = {u'_comment': u'comment'}
modified_dt
possible_render_modes = set([<RenderMode.markdown: 2>])
proposed_action
proposed_contribution_type
proposed_contribution_type_id
proposed_tracks
render_mode = 2
revision_attr = u'abstract'
score
track
track_id
user
user_id
visibility

Operations

indico.modules.events.abstracts.operations.add_abstract_files(abstract, files, log_action=True)
indico.modules.events.abstracts.operations.close_cfa(event)
indico.modules.events.abstracts.operations.create_abstract(event, abstract_data, custom_fields_data=None, send_notifications=False)
indico.modules.events.abstracts.operations.create_abstract_comment(abstract, comment_data)
indico.modules.events.abstracts.operations.create_abstract_review(abstract, track, user, review_data, questions_data)
indico.modules.events.abstracts.operations.delete_abstract(abstract, delete_contrib=False)
indico.modules.events.abstracts.operations.delete_abstract_comment(comment)
indico.modules.events.abstracts.operations.delete_abstract_files(abstract, files)
indico.modules.events.abstracts.operations.judge_abstract(abstract, abstract_data, judgment, judge, contrib_session=None, merge_persons=False, send_notifications=False)
indico.modules.events.abstracts.operations.open_cfa(event)
indico.modules.events.abstracts.operations.reset_abstract_state(abstract)
indico.modules.events.abstracts.operations.schedule_cfa(event, start_dt, end_dt, modification_end_dt)
indico.modules.events.abstracts.operations.update_abstract(abstract, abstract_data, custom_fields_data=None)
indico.modules.events.abstracts.operations.update_abstract_comment(comment, comment_data)
indico.modules.events.abstracts.operations.update_abstract_review(review, review_data, questions_data)
indico.modules.events.abstracts.operations.update_reviewed_for_tracks(abstract, tracks)
indico.modules.events.abstracts.operations.withdraw_abstract(abstract)

Utilities

indico.modules.events.abstracts.util.build_default_email_template(event, tpl_type)

Build a default e-mail template based on a notification type provided by the user.

indico.modules.events.abstracts.util.clear_boa_cache(event)

Delete the cached book of abstract

indico.modules.events.abstracts.util.create_boa(event)

Create the book of abstracts if necessary

Returns:The path to the PDF file
indico.modules.events.abstracts.util.create_mock_abstract(*args, **kwargs)

Create a mock abstract that can be used in previews.

Brace for geek references.

indico.modules.events.abstracts.util.generate_spreadsheet_from_abstracts(abstracts, static_item_ids, dynamic_items)

Generates a spreadsheet data from a given abstract list.

Parameters:
  • abstracts – The list of abstracts to include in the file
  • static_item_ids – The abstract properties to be used as columns
  • dynamic_items – Contribution fields as extra columns
indico.modules.events.abstracts.util.get_events_with_abstract_persons(user, dt=None)

Return a dict of event ids and the abstract submission related roles the user has in that event.

Parameters:
  • user – A User
  • dt – Only include events taking place on/after that date
indico.modules.events.abstracts.util.get_events_with_abstract_reviewer_convener(user, dt=None)

Return a dict of event ids and the abstract reviewing related roles the user has in that event.

Parameters:
  • user – A User
  • dt – Only include events taking place on/after that date
indico.modules.events.abstracts.util.get_roles_for_event(event)

Return a dictionary of all abstract reviewing roles for this event.

Parameters:event – the actual event object.
Returns:A dictionary in the form {track: {role: [users]}}
indico.modules.events.abstracts.util.get_track_reviewer_abstract_counts(event, user)

Get the numbers of abstracts per track for a specific user.

Note that this does not take into account if the user is a reviewer for a track; it just checks whether the user has reviewed an abstract in a track or not.

Returns:A dict mapping tracks to dicts containing the counts.
indico.modules.events.abstracts.util.get_user_abstracts(event, user)

Get the list of abstracts where the user is a reviewer/convener

indico.modules.events.abstracts.util.get_user_tracks(event, user)

Get the list of tracks where the user is a reviewer/convener

indico.modules.events.abstracts.util.get_visible_reviewed_for_tracks(abstract, user)
indico.modules.events.abstracts.util.has_user_tracks(event, user)
indico.modules.events.abstracts.util.make_abstract_form(event, notification_option=False, management=False)

Extends the abstract WTForm to add the extra fields.

Each extra field will use a field named custom_ID.

Parameters:
  • event – The Event for which to create the abstract form.
  • notification_option – Whether to add a field to the form to disable triggering notifications for the abstract submission.

:param management Whether it’s a manager using the abstract form :return: An AbstractForm subclass.

Placeholders

class indico.modules.events.abstracts.placeholders.EventTitlePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The title of the event'
name = u'event_title'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.EventURLPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The URL of the event'
name = u'event_url'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.AbstractIDPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The ID of the abstract'
name = u'abstract_id'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.AbstractTitlePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The title of the abstract'
name = u'abstract_title'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.AbstractURLPlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu'The direct URL of the abstract'
name = u'abstract_url'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.AbstractTrackPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The name of the destination track'
name = u'abstract_track'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.AbstractSessionPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The name of the destination session'
name = u'abstract_session'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.PrimaryAuthorsPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The names of the primary authors (separated by commas)'
name = u'primary_authors'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.CoAuthorsPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The names of the co-authors (separated by commas)'
name = u'co_authors'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.SubmitterNamePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The full name of the submitter, no title'
name = u'submitter_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.SubmitterFirstNamePlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu'The first name of the submitter'
name = u'submitter_first_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.SubmitterLastNamePlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu'The last name of the submitter'
name = u'submitter_last_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.SubmitterTitlePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The title of the submitter (Dr., Prof., etc...)'
name = u'submitter_title'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.TargetAbstractIDPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The ID of the target abstract (merge)'
name = u'target_abstract_id'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.TargetAbstractTitlePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The title of the target abstract (merge)'
name = u'target_abstract_title'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.TargetSubmitterNamePlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu"The full name of the target abstract's submitter, no title (merge)"
name = u'target_submitter_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.TargetSubmitterFirstNamePlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu"The first name of the target abstract's submitter (merge)"
name = u'target_submitter_first_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.TargetSubmitterLastNamePlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu"The last name of the target abstract's submitter (merge)"
name = u'target_submitter_last_name'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.JudgmentCommentPlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'Comments written by event organizer (upon final decision)'
name = u'judgment_comment'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.ContributionTypePlaceholder

Bases: indico.util.placeholders.Placeholder

description = lu'The contribution type that is associated to the abstract'
name = u'contribution_type'
classmethod render(abstract)
class indico.modules.events.abstracts.placeholders.ContributionURLPlaceholder

Bases: indico.util.placeholders.Placeholder

advanced = True
description = lu'Contribution URL'
name = u'contribution_url'
classmethod render(abstract)

Settings

class indico.modules.events.abstracts.settings.BOACorrespondingAuthorType

Bases: indico.util.struct.enum.RichEnum

none = u'none'
speakers = u'speakers'
submitter = u'submitter'
class indico.modules.events.abstracts.settings.BOASortField

Bases: indico.util.struct.enum.RichEnum

abstract_title = u'title'
id = u'id'
schedule = u'schedule'
session_title = u'session_title'
speaker = u'speaker'