Type Definition Modules

hedwig.type.base

class hedwig.type.base.CollectionByCall

Mix-in for collections of items with a call_id attribute.

subset_by_call(call_id)

Create a subset containing entries for the given call.

class hedwig.type.base.CollectionByFacility

Mix-in for collections of items with a facility_id attribute.

values_by_facility(facility_id)

Iterate values for the given facility identifier.

class hedwig.type.base.CollectionByProposal

Mix-in for collections of items with a proposal_id attribute.

get_proposal(proposal_id, default=())

Retrieve the (first found) entry for the given proposal.

subset_by_proposal(proposal_id)

Create a subset of the collection (of the same type) containing the entries which match the given proposal.

class hedwig.type.base.CollectionByReviewerRole

Mix-in for collections of items with a reviewer role attribute.

has_role(role)

Check if the collection has an entry in the given role.

values_by_role(role)

Get a list of the reviewers with the given role.

values_in_role_order(role_class, cttee_role=None)

Iterate over the values of the collection in the order of the reviewer roles.

Optionally return only committee roles (cttee_role = True) or non-committee roles (cttee_role = False).

Note: operates by looping over known roles. Any reviewers with invalid (or no longer recognized) roles will not be yielded.

class hedwig.type.base.CollectionByType

Mix-in for collections of items with a type attribute.

has_type(type_)

Check if the collection has an entry of the given type.

values_by_type(type_)

Iterate entries with the given type.

class hedwig.type.base.CollectionOrdered

Mix-in for collections with a sort_order attribute.

ensure_sort_order()

Ensure all records have a non-None sort_order entry.

Iterates through the entries in this collection finding the maximum sort_order used and all the entries without a sort order. Then those entries are assigned sort_order values above the previous maximum in the order in which they appear in the collection.

values_in_sorted_order()

Return values ordered by the sort_order attribute.

Normally we would already have sorted the collection in this order when constructing it. So this method is intended to be used while editing a collection which may have some incomplete information in it.

Entries with a sort_order attribute of None should be returned last.

class hedwig.type.base.CollectionSortable

Mix-in for collections with a sort_attr class attribute.

The sort_attr should be a sequence of (reverse, tuple) pairs where reverse indicates whether the sort should be reversed and tuple is a tuple containing attribute names. Sorting parameters are specified in top-down order, both in the attributes tuples and in the sequence as a whole.

sorted()

Return a similar type of collection with values in sorted order.

values_in_sorted_order()

Return values in a suitably sorted order.

This operates by placing the values in a list and applying each sort operation specified by sort_attr in reverse order.

class hedwig.type.base.EnumAllowUser

Mix-in for enum-style classes where the _info dictionary has names and an allow_user boolean field.

Note

If combined with EnumBasic, this mix-in should be listed first in the order of base classes so that its is_valid method overrides that from EnumBasic.

classmethod is_valid(value, is_system=False)

Determines whether the given value is allowed.

By default only allows values for which allow_user is enabled. However with the is_system flag, allows any value.

classmethod get_options(is_system=False)

Get an OrderedDict of names by value.

By default only returns values for which allow_user is enabled. However with the is_system flag, all values are returned.

class hedwig.type.base.EnumAvailable

Mix-in for enum-style classes where the _info dictionary has names and an available boolean field.

classmethod get_options(include_unavailable=False)
classmethod is_available(value)
class hedwig.type.base.EnumBasic

Mix-in for enum-style classes which have an _info dictionary.

classmethod is_valid(value)

Determine whether an enum value is valid.

It is assumed that the value is valid if appears in the _info dictionary.

classmethod get_info(value)

Return the entry in the _info dictionary for a given value.

classmethod get_name(value)

Get the name for an entry.

This is given by the name attribute of the value’s entry in the _info dictionary.

class hedwig.type.base.EnumCode

Mix-in for enum-style classes with an _info dictionary including a code attribute.

classmethod get_code(value)

Get the code for an entry.

classmethod by_code(code)

Attempt to find a value by its code.

class hedwig.type.base.EnumDisplayClass

Mix-in for enum-style classes with an _info dictionary including a display_class attribute.

classmethod get_display_class(value)

Get a CSS class which can be used to display a given value.

class hedwig.type.base.EnumLevel

Mix-in for enum-style classes with an _info dictionary including a level attribute.

classmethod events_of_level(level)

Return a list of events at or above the given level.

class hedwig.type.base.EnumShortName

Mix-in for enum-style classes with an _info dictionary including a short_name attribute.

classmethod get_short_name(value)

Get the abbreviated name for a value.

class hedwig.type.base.EnumURLPath

Mix-in for enum-style classes which have an _info dictionary containing items with an url_path attribute.

classmethod url_path(value)

Returns the URL path for a value.

If the URL path for the given value is None, an exception is raised.

classmethod get_url_paths()

Return a list of possible URL paths.

This creates a list of all of the paths which are not None.

classmethod by_url_path(url_path, default=())

Attempt to find a group by its URL path.

hedwig.type.collection

class hedwig.type.collection.ResultTable(table, columns, rows)
columns

Alias for field number 1

rows

Alias for field number 2

table

Alias for field number 0

class hedwig.type.collection.ResultCollection

Class used to store the results of a database search.

This is a subclass of OrderedDict, ususally indexed by the identifier of a row in the database.

get_single(default=())

Assuming that the collection contains a single value, return that value.

If the collection is empty, a NoSuchRecord exception is raised unless a value is given as the default, in which case it is returned.

If there are multiple values in the collection, a MultipleRecords exception is raised.

group_by(attr)

Group members of a collection by a given attribute.

Yields a series of (attribute value, collection subset) tuples where the collection subset is of the same class as the original collection. The attribute values (and their assocoated collection subsets) are yielded in the order in which they appear in the collection, but the collection need not be sorted by this attribute.

map_values(function=<function ResultCollection.<lambda>>, filter_key=<function ResultCollection.<lambda>>, filter_value=<function ResultCollection.<lambda>>)

Create a new collection by applying the given function to each value.

classmethod organize_collection(updated_records, added_records)

Constuct new record collection, of this class, from the list of updated_records (whose ids we should preserve) and the list of added_records (which should be assigned temporary ids beyond those of the updated_records).

added_records are assumed to have ids of at least 1, such that they can be added to the maximum record id found amongst the updated_records.

class hedwig.type.collection.AffiliationCollection

Class to hold th results of an affiliation search,

group_by_hidden()
validate(type_class, allow_type_none=False)

Validates a set of affiliation records.

Checks:

  • All affiliation types must be valid.

Raises:

UserError – if any problems are found

values_in_type_order(type_class)

Iterate over the values in the collection in order of the affiliation type.

class hedwig.type.collection.AnnotationCollection

Class to hold the results of a search for annotations.

class hedwig.type.collection.CalculationCollection

Class to hold the results of a search for calculations.

class hedwig.type.collection.CallCollection

Class to hold the results of a search for calls for proposals.

subset_separate(separate=True)

Return a subset of this collection based on the call “separate” flag.

Parameters:

separate – whether to return calls with the separate flag (True, default) or without it (False).

values_matching(state=None, queue_id=None, type_=None, hidden=None)

Iterate values matching the given criteria.

class hedwig.type.collection.CallMidCloseCollection

Class to hold the results of a search for call intermediate close dates.

class hedwig.type.collection.CallPreambleCollection

Class to hold the results of a search for call preambles.

get_type(type_, default=())
class hedwig.type.collection.EmailCollection

Class to hold a collection of email addresses.

get_primary()

Return the primary email address.

This is the first email address found with a true value of the primary attribute.

Raises:

NoSuchValue – if no primary adddress is found.

validate()

Attempts to validate a collection of email records.

Checks:

  • There is exactly one primary address.

  • No email addresses are duplicated.

Raises a UserError exception for any problems found.

class hedwig.type.collection.GroupMemberCollection

Class to hold a collection of review group members.

sort_attr = ((False, ('queue_name', 'queue_id', 'group_type', 'id')),)
has_entry(group_type=None, queue_id=None, person_id=None, facility_id=None)

Check whether the collection has an entry matching the given criteria.

values_by_group_type(group_type)

Get a list of the group members with the given role.

class hedwig.type.collection.MemberCollection

Class to hold a collection of proposal members.

get_pi(default=())

Retrive the record corresponding to the principal investigator (PI).

Returns:

the first member found with a true value for the pi attribute, or if no such member is found, the given default value.

Raises:

NoSuchValue – if no PI member is found and no default is given.

get_person(person_id)

Retrieve the record corresponding to the given person.

Raises:

NoSuchValue – if no member with this person_id is found.

get_reviewer(default=())

Retrieve the record corresponding to the designated peer reviewer.

get_students()

Get a list of student members.

This constructs a list of the members with the student attribute set to a true value.

has_person(person_id)

Check for an entry for a given person.

validate(editor_person_id)

Attempts to validate the members of a proposal.

Checks:

  • There is exactly one PI.

  • There is at least one editor.

  • The given person ID is an editor. (To prevent people removing their own editor permission.)

Raises a UserError exception for any problems found.

editor_person_id can be set to None to disable the person checks.

class hedwig.type.collection.MessageRecipientCollection
subset_by_message(message_id)

Create a subset of the collection (of the same type) containing the entries which match the given proposal.

class hedwig.type.collection.PrevProposalCollection

Class to represent a collection of previous proposals.

validate()

Attempt to validate the previous proposal collection.

Checks:

  • Each entry has a proposal code.

  • No entry has more than 6 publications.

  • No code or identifier is repeated.

Raises a UserError exception for any problems found.

get_continuation(default=())

Retrieve a record with the continuation flag set.

Raises:
subset_by_this_proposal(this_proposal_id)

Create a subset of the collection (of the same type) containing the entries which match the given proposal, using the “this_proposal_id” attribute (proposal to which this entry is attached) rather than “proposal_id” (old proposal being referenced).

class hedwig.type.collection.ProposalCollection

Class to contain results of a proposal search.

sort_attr = ((True, ('semester_start',)), (False, ('semester_name', 'queue_name', 'call_type', 'number')))
property n_reviews

The total number of reviews of proposals in the collection.

class hedwig.type.collection.ProposalCategoryCollection

Class to represent results of a search for propossal categories.

class hedwig.type.collection.ProposalTextCollection

Class to represent a collection of pieces of text for a proposal.

This is also used for PDF files attached to the proposals in place of text.

get_role(role, default=())

Retrieve the entry corresponding to the given role.

Raises:

NoSuchValue – if no entry with a role attribute matching the given value is found unless a default value is given, in which case that value is returned.

class hedwig.type.collection.ProposalFigureCollection

Class representing a collection of figures attached to a proposal.

values_by_role(role)

Return a list of values for the given role.

class hedwig.type.collection.RequestCollection

Class representing a collection of requests.

subset_by_state(state)

Create a subset of the collection (of the same type) containing the entries which match the given state.

class hedwig.type.collection.ReviewerCollection

Collection class for reviewers of a proposal, possibly also including their reviews.

get_overall_rating(rating_weight_function, with_std_dev)

Create weighted average of the ratings of completed reviews.

Parameters:
  • rating_weight_function – a function to be called for each review in the collection. It should return a pair of (rating, weight) where the review will be ignored if the rating or weight is None. The weight should be a fractional value from 0.0 to 1.0.

  • with_std_dev – requests calculation of the standard deviation.

Returns:

the overall rating (floating point number), unless the standard deviation is requested, when a pair retuned as (overall_rating, standard_deviation).

has_person(person_id, roles=None)

Check for an entry for a given person.

Returns True if entry is found matching the given person_id. Optionally also checks that the reviewer role attribute is in the given set of roles.

Returns False if no matching record is found.

values_by_person_id(person_id)

Get a list of the reviewers for the given person.

property n_with_note

The number of entries in the collection with a note attached.

class hedwig.type.collection.ReviewerAcceptanceCollection

Collection class for reviewer acceptance records.

is_accepted(proposal_id, person_id, role)
class hedwig.type.collection.ReviewDeadlineCollection

Class to hold the results of a search for review deadlines.

get_role(role, call_id=None, default=())
validate(role_class)

Attempts to validate the deadline collection.

class hedwig.type.collection.ReviewFigureCollection

Class representing a collection of figures attached to a review.

class hedwig.type.collection.SiteGroupMemberCollection

Class to hold a collection of site group members.

has_entry(site_group_type=None, person_id=None)

Check whether the collection has an entry matching the given criteria.

values_by_site_group_type(site_group_type)

Get a list of the group members with the given role.

class hedwig.type.collection.TargetCollection

Collection for target objects listed on a proposal.

to_formatted_collection()

Construct an instance of this class in which the target values (x, y, time, priority) are replaced with formatted strings.

classmethod from_formatted_collection(records, as_object_list=False)

Construct an instance of this class where, for every entry in the input collection, the x, y, time and priority values are parsed. (As decimal degrees (float), float and int respectively.)

Parameters:
  • records – input collection of formatted targets

  • as_object_list – if specified, return a list of TargetObject instances instead of a TargetCollection

to_object_list()

Returns a list of TargetObject instances representing members of the collection for which coordinates have been defined.

to_frac_time_list()

Returns a list of TargetFracTime instances based on the results of to_object_list.

total_time()

Returns the sum of the “time” value for each target in the collection for which this value isn’t undefined.

A total of 0.0 will be returned if no targets had defined times. (Or if the times add up to zero.)

class hedwig.type.collection.UserLogCollection
get_user(user_id, default=())

hedwig.type.enum

class hedwig.type.enum.BaseAffiliationType

Class representing types of affiliations.

STANDARD = 1
EXCLUDED = 2
SHARED = 3
class TypeInfo(name, tabulated)
name

Alias for field number 0

tabulated

Alias for field number 1

classmethod get_options()
classmethod get_tabulated_types()
classmethod is_tabulated(value)
class hedwig.type.enum.AnnotationType

Class representing types of annotations.

PROPOSAL_COPY = 1
PROPOSAL_CONTINUATION = 2
class TypeInfo(name)
name

Alias for field number 0

class hedwig.type.enum.CallState

Class representing states of a call for proposals.

Note that this state is not stored directly in the database – it is determined based on the open and close dates.

UNOPENED = 1
OPEN = 2
CLOSED = 3
class StateInfo(name, display_class)
display_class

Alias for field number 1

name

Alias for field number 0

class hedwig.type.enum.FormatType

Class representing possible formatting methods for pieces of text.

One of the enumerated values of this class should be stored with pieces of text in order for the system to know how to format them for display.

A subset of the formats are marked with the allow_user flag: these are the formats which the system should allow end users to select, e.g. in proposals or reviews.

PLAIN = 1
RST = 2
class FormatTypeInfo(name, allow_user)
allow_user

Alias for field number 1

name

Alias for field number 0

class hedwig.type.enum.Assessment

Class representing possible outcomes of a technical assessment.

FEASIBLE = 1
PROBLEM = 2
INFEASIBLE = 3
class AssessmentInfo(name, available)
available

Alias for field number 1

name

Alias for field number 0

class hedwig.type.enum.AttachmentState

Class representing possible processing states for proposal attachments.

While originally intended for proposal figures and PDF files, this is also used to represent the processing state of other items.

NEW = 1
PROCESSING = 2
READY = 3
ERROR = 4
DISCARD = 5
class AttachmentStateInfo(name, ready, error, allow_user, display_class)
allow_user

Alias for field number 3

display_class

Alias for field number 4

error

Alias for field number 2

name

Alias for field number 0

ready

Alias for field number 1

classmethod is_ready(state)

Determine whether a state represents succesfully completed processing.

classmethod is_error(state)

Determine whether a state represents unsuccessful processing.

classmethod unready_states(include_discard=True)

Return a list of states values which do not correspond to successfully completed processing.

class hedwig.type.enum.FileTypeInfo(name, mime, preview, allow_user)
allow_user

Alias for field number 3

mime

Alias for field number 1

name

Alias for field number 0

preview

Alias for field number 2

class hedwig.type.enum.FigureType

Class representing graphics formats handled by the system.

As for text FormatType values, only certain graphics formats are made available to users when uploading figures to their proposals.

PNG = 1
JPEG = 2
PDF = 3
PS = 4
SVG = 5
classmethod get_name(type_)

Get the name of the given type.

classmethod get_mime_type(type_)

Get the MIME type to be used for the given figure type.

classmethod needs_preview(type_)

Determine whether a figure type requires a preview image.

This indicates that, when processing a figure, we should store a preview image which will be shown on the proposal in place of the original figure, even if it was of a suitable size to be shown directly. This is used, for example, for types which the browser is not expected to be able to display, such as EPS.

classmethod from_mime_type(mime_type)

Determine a figure type based on the MIME type.

Raises a UserError if the MIME type is not recognised.

classmethod can_view_inline(type_)

Determine whether the type of figure is suitable for sending to the browser to view inline.

This refers to the Content-Disposition heading, rather than whether we wish to show the original figure directly in a proposal – see the needs_preview method for the latter.

Currently implemented as any “image/*” MIME type or PDF.

classmethod allowed_type_names()

Return list of allowed type names.

classmethod allowed_mime_types()

Return list of allowed MIME types.

class hedwig.type.enum.GroupType

Class representing groups of people related to the proposal review process.

CTTEE = 1
TECH = 2
COORD = 3
VIEWER = 4
HIDDEN_CALL = 5
PEER = -1
class GroupInfo(name, view_all_prop, private_moc, review_coord, review_view, feedback_view, allow_user, url_path)
allow_user

Alias for field number 6

feedback_view

Alias for field number 5

name

Alias for field number 0

private_moc

Alias for field number 2

review_coord

Alias for field number 3

review_view

Alias for field number 4

url_path

Alias for field number 7

view_all_prop

Alias for field number 1

classmethod view_all_groups()

Get a list of groups with the view_all_prop privilege.

classmethod private_moc_groups()

Get a list of groups with the private_moc privilege.

classmethod review_coord_groups()

Get a list of groups with the review_coord privilege.

classmethod review_view_groups()

Get a list of groups with the review_view privilege.

classmethod feedback_view_groups()

Get a list of groups with the feedback_view privilege.

class hedwig.type.enum.LogEventLevel

Class representing log event levels.

Note

These levels should be ordered with higher priority events having higher numerical values. (See e.g. the EnumLevel.events_of_level method.) As such they may change, and should therefore only be used in _info dictionaries of other classes, rather than being stored in the database.

MINOR = 1
INTERMEDIATE = 2
MAJOR = 3
class LevelInfo(name)
name

Alias for field number 0

classmethod get_options()
class hedwig.type.enum.MessageFormatType

Class representing possible formatting types for email messages.

PLAIN_FLOWED = 1
PLAIN = 2
class MessageFormatTypeInfo(name)
name

Alias for field number 0

class hedwig.type.enum.MessageState

Class representing possible status values for email messages.

Note that this state is not stored directly in the database – it is determined based on the send and sent timestamps.

UNSENT = 1
SENDING = 2
SENT = 3
DISCARD = 4
ERROR = 5
class StateInfo(name, resettable, allow_user, display_class)
allow_user

Alias for field number 2

display_class

Alias for field number 3

name

Alias for field number 0

resettable

Alias for field number 1

class hedwig.type.enum.MessageThreadType

Class representing different properties which could be used to group messages in a thread.

PROPOSAL_STATUS = 1
REVIEW_INVITATION = 2
PROPOSAL_REVIEW = 3
class TypeInfo(name, url_path)
name

Alias for field number 0

url_path

Alias for field number 1

class hedwig.type.enum.PermissionType

Class representing different permission levels which may be required to interact with a particular resource.

These are used as the permission argument to the “with” decorators in the hedwig.view.util module.

NONE = 1
VIEW = 2
EDIT = 3
UNIVERSAL_VIEW = 4
FEEDBACK = 10
class hedwig.type.enum.PersonLogEvent

Class representing different types of events which are stored in the person event log.

PROPOSAL_CREATE = 1
PROPOSAL_SUBMIT = 2
PROPOSAL_WITHDRAW = 3
PROPOSAL_REQUEST_COPY = 4
INSTITUTION_ADD = 101
INSTITUTION_EDIT = 102
MEMBER_ADD = 201
MEMBER_INVITE = 202
MEMBER_REINVITE = 203
class EventInfo(description, level)
description

Alias for field number 0

level

Alias for field number 1

class hedwig.type.enum.PersonTitle

Class containing a list of personal titles.

class TitleInfo(name, available)
available

Alias for field number 1

name

Alias for field number 0

class hedwig.type.enum.ProposalState

Class representing various states a proposal can be in.

The proposal state is used to control which operations are permitted for any given proposal. Note that the call closing process (hedwig.admin.proposal.close_call_proposals()), review closing processess (hedwig.admin.proposal.finalize_call_review()) and decision feedback sending process (hedwig.admin.proposal.send_call_proposal_feedback()) update the proposal state automatically.

Proposals transition between states as follows:

PREPARATION ----------------------------
    |                                   |
submission                              |
    |                                   |
    V      -- withdrawl ->              |
SUBMITTED                     WITHDRAWN |
    |      <- submission --       |     |
. . | . . . . . . . . . . . . . . | . . | . . . . call closing
    |                             |     |
    V                             V     V
REVIEW                           ABANDONED
    |
. . | . . . . . . . . . . . . . . . . . . . . . . review closing
    |
    V
FINAL_REVIEW -----------
    |                   |
. . | . . . . . . . . . | . . . . . . . . . . . . decision ready
    |                   |
    V                   V
ACCEPTED            REJECTED

Note

For calls with the “immediate_review” attribute set, submission of the proposal changes the state directly from PREPARATION to REVIEW.

RETRACTED is an additional state, equivalent to ABANDONED, which can be manually set via the administrative interface.

Similarly HELD_OPEN is a manually-set state equivalent to PREPARATION but which the poll process will not consider for call closure.

PREPARATION = 1
SUBMITTED = 2
WITHDRAWN = 3
REVIEW = 4
ABANDONED = 5
ACCEPTED = 6
REJECTED = 7
FINAL_REVIEW = 8
RETRACTED = 9
HELD_OPEN = 10
class StateInfo(short_name, name, edit, submitted, review, reviewed)
edit

Alias for field number 2

name

Alias for field number 1

review

Alias for field number 4

reviewed

Alias for field number 5

short_name

Alias for field number 0

submitted

Alias for field number 3

classmethod is_submitted(state)

Determine whether a proposal has been submitted.

classmethod is_reviewed(state)

Determine whether a proposal has been reviewed.

classmethod is_open(state)

Determine whether a proposal is in an open state.

(See note for open_states.)

classmethod can_edit(state)

Determine whether a proposal can be edited.

classmethod editable_states()

Return a list of states in which proposals can be edited.

classmethod submitted_states()

Return a list of states corresponding to submitted proposals.

classmethod review_states()

Return a list of states corresponding to the review process.’

classmethod reviewed_states()

Return a list of states corresponding to reviewed proposals.

classmethod open_states()

Return a list of states corresponding to proposals in open calls for proposals.

Note: we currently assume the state is “open” if it is editable, except for the special state HELD_OPEN, but this extra accessor method is provided in case this fact changes.

classmethod closed_states()

Return a list of states corresponding to proposal in closed calls.

(See note for open_states.)

classmethod by_name(name)

Attempt to find a state value by name.

Returns None if no match is found.

classmethod get_options()

Get states and names.

Return OrderedDict:

state names by state number

class hedwig.type.enum.PublicationType

Class representing different ways in which a publication can be identified.

Contains the following extra entries for each type:

placeholder

Text to show to the user as a pattern, in error messages and as a placeholder in form text boxes.

regex

A list of regular expressions – identifiers should match one of them.

prefix

A list of prefixes, in lower case, which might be used with the identifier. These, if present, should be stripped off automatically.

PLAIN = 1
DOI = 2
ADS = 3
ARXIV = 4
class PubTypeInfo(name, available, placeholder, regex, prefix)
available

Alias for field number 1

name

Alias for field number 0

placeholder

Alias for field number 2

prefix

Alias for field number 4

regex

Alias for field number 3

class hedwig.type.enum.RequestState

Class representing the state of a request.

EXPIRING = 101
EXPIRED = 102
EXPIRE_ERROR = 103
class RequestStateInfo(name, ready, error, allow_user, display_class, pre_ready, expired)
allow_user

Alias for field number 3

display_class

Alias for field number 4

error

Alias for field number 2

expired

Alias for field number 6

name

Alias for field number 0

pre_ready

Alias for field number 5

ready

Alias for field number 1

classmethod pre_ready_states()

Return a list of values correspond to states which occur before processing completes.

classmethod is_pre_ready(state)
classmethod is_expired(state)
classmethod is_resettable(state, state_new=None)

Determine whether a state should be resettable by an administrator.

If state_new is not given then this method returns True for any state which can be reset. Otherwise it returns True only if it would be appropriate to reset the state to the given new state.

classmethod unready_states(include_discard=True)

Return a list of states values which do not correspond to successfully completed processing.

This extends the super-class (AttachmentState) implementation also to exclude EXPIRED.

classmethod visible_states()

Return the list of states for requests which should be shown to requesters.

class hedwig.type.enum.BaseReviewerRole

Base for classes representing roles in which a person may provide a review for a proposal.

Each facility should provide a version of this class customized as required for that facility. Meanwhile this base class defines some basic roles which are used by general parts of the Hedwig system. An example is FEEDBACK, which is used when sending feedback to proposal members at the end of the review process.

TECH = 1
EXTERNAL = 2
CTTEE_PRIMARY = 3
CTTEE_SECONDARY = 4
CTTEE_OTHER = 5
FEEDBACK = 6
PEER = 7
class RoleInfo(name, unique, text, assessment, rating, weight, cttee, name_review, feedback_direct, feedback_indirect, note, invite, edit_rev, edit_fr, rating_hide, calc, figure, accept, display_class, url_path, help_page, review_group)
accept

Alias for field number 17

assessment

Alias for field number 3

calc

Alias for field number 15

cttee

Alias for field number 6

display_class

Alias for field number 18

edit_fr

Alias for field number 13

edit_rev

Alias for field number 12

feedback_direct

Alias for field number 8

feedback_indirect

Alias for field number 9

figure

Alias for field number 16

help_page

Alias for field number 20

invite

Alias for field number 11

name

Alias for field number 0

name_review

Alias for field number 7

note

Alias for field number 10

rating

Alias for field number 4

rating_hide

Alias for field number 14

review_group

Alias for field number 21

text

Alias for field number 2

unique

Alias for field number 1

url_path

Alias for field number 19

weight

Alias for field number 5

classmethod get_assigned_roles()

Get an OrderedDict of reviewer group types by role numbers.

classmethod get_calc_roles()

Get list of roles who can save calculations.

classmethod get_cttee_roles()

Get a list of roles corresponding to committee reviews.

classmethod get_editable_roles(state)

Get a list of roles which are editable in a specific state.

classmethod get_editable_states(role)

Get a list of the states in which a review is editable.

classmethod get_figure_roles()

Get list of roles who can save figures.

classmethod get_name_with_review(role)

Get the name of the role, possibly with the word “Review” added.

classmethod get_rating_viewable_states(role)

Get a list of states in which the rating is viewable.

classmethod get_review_group(role)

Get the review group for a reviewer role.

classmethod get_feedback_roles(include_indirect=True)

Get list of roles who can write the feedback review.

classmethod get_invited_roles()

Get list of roles for invited reviewers.

classmethod get_options()

Get an OrderedDict of role names by role numbers.

classmethod is_invited_review(role)

Indicate whether the given role is for invited reviews.

classmethod is_name_review(role)

Determine whether a role name should be followed by the word “Review”.

classmethod is_accepted_review(role)

Determine whether a reviews of a role must first be accepted.

classmethod is_assigned_review(role)

Indicated whether a reviewer role is assigned.

class hedwig.type.enum.ReviewState

Class representing states of a review.

The “available” flag indicates which states are offered as search criteria in the web interface. This excludes ADDABLE as review searches will not find reviews in this state.

NOT_DONE = 1
DONE = 2
ADDABLE = 3
PREPARATION = 4
REJECTED = 5
class StateInfo(name, display_class, available, present)
available

Alias for field number 2

display_class

Alias for field number 1

name

Alias for field number 0

present

Alias for field number 3

classmethod is_present(state)

Determine if a state corresponds to a review in the database.

class hedwig.type.enum.SemesterState

Class representing states of a semester.

Note that this state is not stored directly in the database – it is determined based on the start and end dates.

FUTURE = 1
CURRENT = 2
PAST = 3
class StateInfo(name, display_class)
display_class

Alias for field number 1

name

Alias for field number 0

class hedwig.type.enum.SiteGroupType

Class representing groups of people with site-wide administrative roles.

PROFILE_VIEWER = 1
class SiteGroupInfo(name, view_all_profile, allow_user, url_path)
allow_user

Alias for field number 2

name

Alias for field number 0

url_path

Alias for field number 3

view_all_profile

Alias for field number 1

classmethod view_all_profile_groups()

Get a list of groups with the view_all_profile privilege.

class hedwig.type.enum.BaseTextRole

Base for classes representing roles which a piece of text may have on a proposal.

It is recommended that facility-specific subclasses allocate higher identifier numbers for facility-specific roles, e.g. numbers above 100.

A role can specify the proposal_section in which the text will appear. In the case of roles with an url_path (for which editing routes will be estabilished), this allows checking of whether the role is relevant to a given type of proposal.

ABSTRACT = 1
TECHNICAL_CASE = 2
SCIENCE_CASE = 3
TOOL_NOTE = 4
CONTINUATION_REQUEST = 5
class RoleInfo(name, code, url_path, proposal_section)
code

Alias for field number 1

name

Alias for field number 0

proposal_section

Alias for field number 3

url_path

Alias for field number 2

class hedwig.type.enum.UserLogEvent

Class representing different types of events which are stored in the user account log.

CREATE = 1
CHANGE_NAME = 3
CHANGE_PASS = 4
GET_TOKEN = 5
USE_TOKEN = 6
USE_INVITE = 7
MERGED = 8
GET_EMAIL_TOKEN = 9
USE_EMAIL_TOKEN = 10
LOG_IN = 11
MERGED_INVITE = 12
class EventInfo(description, level)
description

Alias for field number 0

level

Alias for field number 1

class hedwig.type.enum.ProposalType

Class representing various types of proposal.

STANDARD = 1
CONTINUATION = 2
class TypeInfo(short_name, name, reviewer_roles_excluded)
name

Alias for field number 1

reviewer_roles_excluded

Alias for field number 2

short_name

Alias for field number 0

classmethod get_options()
classmethod get_excluded_roles(value)
class hedwig.type.enum.BaseCallType

Class representing types of calls for proposals.

The name_proposal attribute relates to how a call is named. If False then the name relates to the call (e.g. “standard call for proposals”) otherwise, if True, the name relates to the proposals (e.g. “call for urgent proposals”).

STANDARD = 1
IMMEDIATE = 2
TEST = 3
MULTICLOSE = 4
SUPPLEMENTAL = 5
class TypeInfo(code, name, available, url_path, immediate_review, name_proposal, mid_close, reviewer_roles, notify_group)
available

Alias for field number 2

code

Alias for field number 0

immediate_review

Alias for field number 4

mid_close

Alias for field number 6

name

Alias for field number 1

name_proposal

Alias for field number 5

notify_group

Alias for field number 8

reviewer_roles

Alias for field number 7

url_path

Alias for field number 3

classmethod has_immediate_review(value)
classmethod has_mid_close(value)
classmethod has_reviewer_role(value, role)
classmethod get_notify_group(value)

Get tuple of groups which should be notified about submissions to calls of this type.

classmethod get_full_call_name(value, plural=False)

Get the full name of a call for proposals.

This returns a full name such as “standard call for proposals” based on the call type name and name_proposal attribute.

hedwig.type.misc

class hedwig.type.misc.SectionedListSection(section, name, items)
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('section', 'name', 'items')
classmethod _make(iterable)

Make a new SectionedListSection object from a sequence or iterable

_replace(**kwds)

Return a new SectionedListSection object replacing specified fields with new values

items

Alias for field number 2

name

Alias for field number 1

section

Alias for field number 0

class hedwig.type.misc.ErrorCatcher(data)

Wrapper class to contain data and possibly exceptions.

This is designed to allow a function to return data plus an exception which it would have liked to have raised.

catch_()

Context manager which unwraps the data attribute and traps exceptions.

release()

Context manager which unwraps the data attribute, expecting the exception to be raised.

The managed block should call raise_() to raise any stored exception. If an exception was stored and this is not done, another exception is raised.

raise_()

Raises the first stored exception, if there are any, then clears the list of exceptions.

exception hedwig.type.misc.SkipSection

Exception class used to skip a section when using the SectionedList.accumulate_notes context manager.

class hedwig.type.misc.SectionedList(iterable=None, note_format=None)

List-like class where the list can be divided into labeled sections.

A sectioned list retains the order of its sections. There is always a default section (section = None) which comes first in the ordering.

Each section is given an idenifier (section) and optionally a name (section_name). These can be set explicitly using add_section() (which also establishes the section in the ordering) or automatically when items are added using append() or extend(). If a section becomes empty it retains its position in the ordering. However when removed using delete_section() the whole section is forgotten, including its ordering, unless it is the default section.

When initialized with an iterable, the items are added to the default section.

Note

This class includes indexing operations (__delitem__, __getitem__ and __setitem__) but these are inefficient and provided only for compatibility with standard lists. You can gain access to the interal lists for each section using by_section() and get_section() which would allow more efficient operations within each section.

accumulate_notes(section, section_name=None, include_empty=False, default_error_message='An unexpected error occurred.')

Context manager to accumulate notes into a section of the list, with error handling.

Yields an empty list, into which the block can write notes. Afterwards, if the list is no longer empty (or include_empty is specified), it is added to the given section of the list.

If an exception is trapped, a note is added to the list. This will be the message from the exception if it is an instance of UserError, or the default_error_message otherwise. The note_format method supplied to this class’s constructor will be used to convert the message to an object to store in the list if it was specified.

The special exception class SkipSection can be used to skip (further) processing of a section without adding an error note to the list.

as_dict(**kwargs)

Create a dictionary representation of this sectioned list.

This simply uses the section identifiers and lists returned by by_section() to construct a dictionary. Please see the notes for that method. Additional keyword arguments are passed to that method.

add_section(section, name=None)

Add a section to the list.

  • Adds the section key to the SectionedList if it is not already present, so that when the list is iterated, this section comes next in the ordering.

  • If a name is give, adds it to the dictionary of section display names.

Parameters:
  • section – the section identifier

  • name – the display name for the section

append(item, section=None, section_name=None)

Add an item to the list.

Parameters:
  • item – the item to be added

  • section – the section in which to place the item, or None to place it in the default section

  • section_name – if not None, a display name to be added to the names dictionary for the given section

prepend(item, section=None, section_name=None)

Add an item to the start of a section.

Parameters:
  • item – the item to be added

  • section – the section in which to place the item, or None to place it in the default section

  • section_name – if not None, a display name to be added to the names dictionary for the given section

_append_or_prepend(item, section, section_name, prepend)
by_section(include_empty=False)

Iterate over the list on a section-by-section basis.

For each section, yields a SectionedListSection namedtuple (section, name, items) where items is the list of items for that section.

Parameters:

include_empty – indicates whether empty sections should be included

Warning

the list of items is not copied so this gives a direct, mutable, view of the items in the section.

delete_section(section)

Delete the given section from the list.

Parameters:

section – the identifier of the section to remove

Raises:

KeyError – if the given section does not exist

extend(iterable, section=None, section_name=None, prepend=False)

Add an iterable of items to the list.

Parameters:
  • iterable – the items to be added

  • section – the section in which to place the items, or None to place them in the default section

  • section_name – if not None, a display name to be added to the names dictionary for the given section

  • prepend – if true, insert new items at the start of the section

get_section(section)

Get the list of items for the given section.

Parameters:

section – the identifier of the section to get

Raises:

KeyError – if the given section does not exist

Warning

the list of items is not copied so this gives a direct, mutable, view of the items in the section.

get_section_name(section)

Get the display name of the given section.

Parameters:

section – the identifier of the section to get the name of

Raises:

KeyError – if the given section does not exist

list_sections(include_empty=False)

Get a list of the sections in this list.

Parameters:

include_empty – indicates whether empty sections should be included

Returns:

list of section identifiers

get_item_where(predicate, default=())

Find and return the first item where the given function returns True.

delete_item_where(predicate, section=(), count=None)

Delete items for which the given function returns True.

replace_item_where(predicate, mapping, section=(), count=None)

Replace items where the given predicate function is True with the result of applying the function mapping to that value.

If the function returns None then the item is removed from the list.

Parameters:
  • predicate – test function to apply to each entry

  • mapping – mapping function to apply to each entry

  • section – section to manipulate, or () for all sections

  • count – maximum number of entries to manipulate, or None for no limit

Returns:

the number of entries affected

_find_by_index(index)

Find the section and index within the section for the given overall list index.

Parameters:

index – index within the entire list

Returns:

(section list, index) tuple

Raises:

IndexError – if the index is out of range

hedwig.type.simple

class hedwig.type.simple.Affiliation(weight)
weight

Alias for field number 0

class hedwig.type.simple.Annotation
class hedwig.type.simple.AuthTokenInfo(id, user_id, expiry, remote_addr, remote_agent, user_name, person_id, person_name)
expiry

Alias for field number 2

id

Alias for field number 0

person_id

Alias for field number 6

person_name

Alias for field number 7

remote_addr

Alias for field number 3

remote_agent

Alias for field number 4

user_id

Alias for field number 1

user_name

Alias for field number 5

class hedwig.type.simple.CalculatorInfo(id, code, name, calculator, modes, view_functions)
calculator

Alias for field number 3

code

Alias for field number 1

id

Alias for field number 0

modes

Alias for field number 4

name

Alias for field number 2

view_functions

Alias for field number 5

class hedwig.type.simple.CalculatorMode(code, name)
code

Alias for field number 0

name

Alias for field number 1

class hedwig.type.simple.CalculatorResult(output, extra)
extra

Alias for field number 1

output

Alias for field number 0

class hedwig.type.simple.CalculatorValue(code, name, abbr, format, unit)
abbr

Alias for field number 2

code

Alias for field number 0

format

Alias for field number 3

name

Alias for field number 1

unit

Alias for field number 4

class hedwig.type.simple.Calculation
class hedwig.type.simple.Call(state, facility_id, semester_name, queue_name, queue_description, queue_description_format, proposal_count)
facility_id

Alias for field number 1

proposal_count

Alias for field number 6

queue_description

Alias for field number 4

queue_description_format

Alias for field number 5

queue_name

Alias for field number 3

semester_name

Alias for field number 2

state

Alias for field number 0

class hedwig.type.simple.CallMidClose
class hedwig.type.simple.CallPreamble
class hedwig.type.simple.Category
class hedwig.type.simple.CoMemberInfo(id, editor, co_member_person_id, co_member_institution_id)
co_member_institution_id

Alias for field number 3

co_member_person_id

Alias for field number 2

editor

Alias for field number 1

id

Alias for field number 0

class hedwig.type.simple.CurrentUser(user, person, is_admin, auth_token_id, options)
auth_token_id

Alias for field number 3

is_admin

Alias for field number 2

options

Alias for field number 4

person

Alias for field number 1

user

Alias for field number 0

class hedwig.type.simple.DateAndTime(date, time)
date

Alias for field number 0

time

Alias for field number 1

class hedwig.type.simple.Email
class hedwig.type.simple.FacilityInfo(id, code, name, view)
code

Alias for field number 1

id

Alias for field number 0

name

Alias for field number 2

view

Alias for field number 3

class hedwig.type.simple.FacilityObsInfo(geo_x, geo_y, geo_z, time_start, time_duration, el_min)
el_min

Alias for field number 5

geo_x

Alias for field number 0

geo_y

Alias for field number 1

geo_z

Alias for field number 2

time_duration

Alias for field number 4

time_start

Alias for field number 3

class hedwig.type.simple.GroupMember(person_name, person_public, person_registered, institution_id, institution_name, institution_department, institution_organization, institution_country, institution_name_abbr, institution_department_abbr, institution_organization_abbr, queue_code, queue_name, facility_id)
facility_id

Alias for field number 13

institution_country

Alias for field number 7

institution_department

Alias for field number 5

institution_department_abbr

Alias for field number 9

institution_id

Alias for field number 3

institution_name

Alias for field number 4

institution_name_abbr

Alias for field number 8

institution_organization

Alias for field number 6

institution_organization_abbr

Alias for field number 10

person_name

Alias for field number 0

person_public

Alias for field number 1

person_registered

Alias for field number 2

queue_code

Alias for field number 11

queue_name

Alias for field number 12

class hedwig.type.simple.Institution
class hedwig.type.simple.InstitutionInfo(id, name, department, organization, country, name_abbr, department_abbr, organization_abbr)
country

Alias for field number 4

department

Alias for field number 2

department_abbr

Alias for field number 6

id

Alias for field number 0

name

Alias for field number 1

name_abbr

Alias for field number 5

organization

Alias for field number 3

organization_abbr

Alias for field number 7

class hedwig.type.simple.InstitutionLog(prev, person_name, institution_name)
institution_name

Alias for field number 2

person_name

Alias for field number 1

prev

Alias for field number 0

text

Alias for field number 0

url

Alias for field number 1

class hedwig.type.simple.Member(person_name, person_public, person_registered, user_id, affiliation_name, resolved_institution_id, institution_name, institution_department, institution_organization, institution_country, institution_name_abbr, institution_department_abbr, institution_organization_abbr)
affiliation_name

Alias for field number 4

institution_country

Alias for field number 9

institution_department

Alias for field number 7

institution_department_abbr

Alias for field number 11

institution_name

Alias for field number 6

institution_name_abbr

Alias for field number 10

institution_organization

Alias for field number 8

institution_organization_abbr

Alias for field number 12

person_name

Alias for field number 0

person_public

Alias for field number 1

person_registered

Alias for field number 2

resolved_institution_id

Alias for field number 5

user_id

Alias for field number 3

class hedwig.type.simple.MemberInfo(id, pi, editor, observer, person_id)
editor

Alias for field number 2

id

Alias for field number 0

observer

Alias for field number 3

person_id

Alias for field number 4

pi

Alias for field number 1

class hedwig.type.simple.MemberInstitution(id, institution_id)
id

Alias for field number 0

institution_id

Alias for field number 1

class hedwig.type.simple.MemberPIInfo(person_id, person_name, person_public, user_id, affiliation_name)
affiliation_name

Alias for field number 4

person_id

Alias for field number 0

person_name

Alias for field number 1

person_public

Alias for field number 2

user_id

Alias for field number 3

class hedwig.type.simple.Message(recipients, thread_identifiers)
recipients

Alias for field number 0

thread_identifiers

Alias for field number 1

class hedwig.type.simple.MessageRecipient(person_name, email_public)
email_public

Alias for field number 1

person_name

Alias for field number 0

class hedwig.type.simple.MOCInfo
class hedwig.type.simple.Note(text, format)
format

Alias for field number 1

text

Alias for field number 0

class hedwig.type.simple.OAuthCode
get_redirect_uri()
get_scope()
get_nonce()
get_auth_time()
class hedwig.type.simple.OAuthToken
get_client_id()
get_scope()
get_expires_in()
get_expires_at()
class hedwig.type.simple.Person(email, institution, proposals, reviews)
email

Alias for field number 0

institution

Alias for field number 1

proposals

Alias for field number 2

reviews

Alias for field number 3

class hedwig.type.simple.PersonInfo(institution_name, institution_department, institution_organization, institution_country, institution_name_abbr, institution_department_abbr, institution_organization_abbr)
institution_country

Alias for field number 3

institution_department

Alias for field number 1

institution_department_abbr

Alias for field number 5

institution_name

Alias for field number 0

institution_name_abbr

Alias for field number 4

institution_organization

Alias for field number 2

institution_organization_abbr

Alias for field number 6

class hedwig.type.simple.PersonLog
class hedwig.type.simple.PrevProposal(proposal_state, proposal_type, proposal_call_id, proposal_call_type, proposal_semester_id, proposal_queue_id, publications)
proposal_call_id

Alias for field number 2

proposal_call_type

Alias for field number 3

proposal_queue_id

Alias for field number 5

proposal_semester_id

Alias for field number 4

proposal_state

Alias for field number 0

proposal_type

Alias for field number 1

publications

Alias for field number 6

class hedwig.type.simple.PrevProposalPub(proposal_id)
proposal_id

Alias for field number 0

class hedwig.type.simple.Proposal(semester_id, semester_name, semester_code, semester_start, semester_end, queue_id, queue_name, queue_code, call_type, call_separate, call_hidden, facility_id, abst_word_lim, tech_word_lim, tech_fig_lim, tech_page_lim, sci_word_lim, sci_fig_lim, sci_page_lim, capt_word_lim, expl_word_lim, date_close, multi_semester, cnrq_word_lim, cnrq_fig_lim, cnrq_page_lim, has_decision, decision_accept, decision_exempt, decision_ready, decision_note, decision_note_format, member, members, reviewer, reviewers, categories)
abst_word_lim

Alias for field number 12

call_hidden

Alias for field number 10

call_separate

Alias for field number 9

call_type

Alias for field number 8

capt_word_lim

Alias for field number 19

categories

Alias for field number 36

cnrq_fig_lim

Alias for field number 24

cnrq_page_lim

Alias for field number 25

cnrq_word_lim

Alias for field number 23

date_close

Alias for field number 21

decision_accept

Alias for field number 27

decision_exempt

Alias for field number 28

decision_note

Alias for field number 30

decision_note_format

Alias for field number 31

decision_ready

Alias for field number 29

expl_word_lim

Alias for field number 20

facility_id

Alias for field number 11

has_decision

Alias for field number 26

member

Alias for field number 32

members

Alias for field number 33

multi_semester

Alias for field number 22

queue_code

Alias for field number 7

queue_id

Alias for field number 5

queue_name

Alias for field number 6

reviewer

Alias for field number 34

reviewers

Alias for field number 35

sci_fig_lim

Alias for field number 17

sci_page_lim

Alias for field number 18

sci_word_lim

Alias for field number 16

semester_code

Alias for field number 2

semester_end

Alias for field number 4

semester_id

Alias for field number 0

semester_name

Alias for field number 1

semester_start

Alias for field number 3

tech_fig_lim

Alias for field number 14

tech_page_lim

Alias for field number 15

tech_word_lim

Alias for field number 13

class hedwig.type.simple.ProposalWithCode(semester_id, semester_name, semester_code, semester_start, semester_end, queue_id, queue_name, queue_code, call_type, call_separate, call_hidden, facility_id, abst_word_lim, tech_word_lim, tech_fig_lim, tech_page_lim, sci_word_lim, sci_fig_lim, sci_page_lim, capt_word_lim, expl_word_lim, date_close, multi_semester, cnrq_word_lim, cnrq_fig_lim, cnrq_page_lim, has_decision, decision_accept, decision_exempt, decision_ready, decision_note, decision_note_format, member, members, reviewer, reviewers, categories, code)
abst_word_lim

Alias for field number 12

call_hidden

Alias for field number 10

call_separate

Alias for field number 9

call_type

Alias for field number 8

capt_word_lim

Alias for field number 19

categories

Alias for field number 36

cnrq_fig_lim

Alias for field number 24

cnrq_page_lim

Alias for field number 25

cnrq_word_lim

Alias for field number 23

code

Alias for field number 37

date_close

Alias for field number 21

decision_accept

Alias for field number 27

decision_exempt

Alias for field number 28

decision_note

Alias for field number 30

decision_note_format

Alias for field number 31

decision_ready

Alias for field number 29

expl_word_lim

Alias for field number 20

facility_id

Alias for field number 11

has_decision

Alias for field number 26

member

Alias for field number 32

members

Alias for field number 33

multi_semester

Alias for field number 22

queue_code

Alias for field number 7

queue_id

Alias for field number 5

queue_name

Alias for field number 6

reviewer

Alias for field number 34

reviewers

Alias for field number 35

sci_fig_lim

Alias for field number 17

sci_page_lim

Alias for field number 18

sci_word_lim

Alias for field number 16

semester_code

Alias for field number 2

semester_end

Alias for field number 4

semester_id

Alias for field number 0

semester_name

Alias for field number 1

semester_start

Alias for field number 3

tech_fig_lim

Alias for field number 14

tech_page_lim

Alias for field number 15

tech_word_lim

Alias for field number 13

class hedwig.type.simple.ProposalCategory(category_name)
category_name

Alias for field number 0

class hedwig.type.simple.ProposalFigure(data, type, filename)
data

Alias for field number 0

filename

Alias for field number 2

type

Alias for field number 1

class hedwig.type.simple.ProposalFigureInfo(uploader_name, has_preview)
has_preview

Alias for field number 1

uploader_name

Alias for field number 0

class hedwig.type.simple.ProposalFigureThumbPreview(thumbnail, preview)
preview

Alias for field number 1

thumbnail

Alias for field number 0

class hedwig.type.simple.ProposalPDFInfo(uploader_name)
uploader_name

Alias for field number 0

class hedwig.type.simple.ProposalText(editor_name)
editor_name

Alias for field number 0

class hedwig.type.simple.RequestPropCopy(requester_name)
requester_name

Alias for field number 0

class hedwig.type.simple.RequestPropPDF(requester_name)
requester_name

Alias for field number 0

class hedwig.type.simple.Reviewer(person_name, person_public, person_registered, user_id, institution_id, institution_name, institution_department, institution_organization, institution_country, institution_name_abbr, institution_department_abbr, institution_organization_abbr, invitation_token, invitation_expiry, review_extra, acceptance_accepted, acceptance_text, acceptance_format, acceptance_date, note, note_format)
acceptance_accepted

Alias for field number 15

acceptance_date

Alias for field number 18

acceptance_format

Alias for field number 17

acceptance_text

Alias for field number 16

institution_country

Alias for field number 8

institution_department

Alias for field number 6

institution_department_abbr

Alias for field number 10

institution_id

Alias for field number 4

institution_name

Alias for field number 5

institution_name_abbr

Alias for field number 9

institution_organization

Alias for field number 7

institution_organization_abbr

Alias for field number 11

invitation_expiry

Alias for field number 13

invitation_token

Alias for field number 12

note

Alias for field number 19

note_format

Alias for field number 20

person_name

Alias for field number 0

person_public

Alias for field number 1

person_registered

Alias for field number 2

review_extra

Alias for field number 14

user_id

Alias for field number 3

class hedwig.type.simple.ReviewerAcceptance
class hedwig.type.simple.ReviewerInfo(id, role, review_state, person_id, proposal_id, accepted)
accepted

Alias for field number 5

id

Alias for field number 0

person_id

Alias for field number 3

proposal_id

Alias for field number 4

review_state

Alias for field number 2

role

Alias for field number 1

class hedwig.type.simple.ReviewCalculation
class hedwig.type.simple.ReviewDeadline
class hedwig.type.simple.ReviewFigureInfo(uploader_name, has_preview)
has_preview

Alias for field number 1

uploader_name

Alias for field number 0

class hedwig.type.simple.RouteInfo(template, rule, endpoint, func, options)
endpoint

Alias for field number 2

func

Alias for field number 3

options

Alias for field number 4

rule

Alias for field number 1

template

Alias for field number 0

class hedwig.type.simple.Semester
class hedwig.type.simple.SemesterInfo(id, facility_id, name, code, date_start, date_end, state)
code

Alias for field number 3

date_end

Alias for field number 5

date_start

Alias for field number 4

facility_id

Alias for field number 1

id

Alias for field number 0

name

Alias for field number 2

state

Alias for field number 6

class hedwig.type.simple.SiteGroupMember(person_name, person_public, person_registered, institution_id, institution_name, institution_department, institution_organization, institution_country, institution_name_abbr, institution_department_abbr, institution_organization_abbr)
institution_country

Alias for field number 7

institution_department

Alias for field number 5

institution_department_abbr

Alias for field number 9

institution_id

Alias for field number 3

institution_name

Alias for field number 4

institution_name_abbr

Alias for field number 8

institution_organization

Alias for field number 6

institution_organization_abbr

Alias for field number 10

person_name

Alias for field number 0

person_public

Alias for field number 1

person_registered

Alias for field number 2

class hedwig.type.simple.Target
class hedwig.type.simple.TargetFracTime(coord, frac_time)
coord

Alias for field number 0

frac_time

Alias for field number 1

class hedwig.type.simple.TargetObject(name, system, coord, time)
coord

Alias for field number 2

name

Alias for field number 0

system

Alias for field number 1

time

Alias for field number 3

class hedwig.type.simple.TargetToolInfo(id, code, name, tool)
code

Alias for field number 1

id

Alias for field number 0

name

Alias for field number 2

tool

Alias for field number 3

class hedwig.type.simple.TextCopyInfo(role, section, word_lim, fig_lim, capt_word_lim, page_lim)
capt_word_lim

Alias for field number 4

fig_lim

Alias for field number 3

page_lim

Alias for field number 5

role

Alias for field number 0

section

Alias for field number 1

word_lim

Alias for field number 2

class hedwig.type.simple.UserInfo(id, name, disabled)
disabled

Alias for field number 2

id

Alias for field number 0

name

Alias for field number 1

class hedwig.type.simple.UserLog
class hedwig.type.simple.Queue
hedwig.type.simple.QueueInfo

alias of Queue

class hedwig.type.simple.ValidationMessage(is_error, description, link_text, link_url)
description

Alias for field number 1

is_error

Alias for field number 0

Alias for field number 2

Alias for field number 3

hedwig.type.util

hedwig.type.util.null_tuple(type_)

Make a named tuple instance of the given type with all entries set to None.

hedwig.type.util.with_can_edit(obj, can_edit)

Add a can_edit field to a tuple and set it to the given value.

hedwig.type.util.with_can_view(obj, can_view)

Add a can_view field to a tuple and set it to the given value.

hedwig.type.util.with_can_view_edit(obj, can_view, can_edit)

Add can_view and can_edit fields to a tuple.

hedwig.type.util.with_can_view_edit_rating(obj, can_view, can_edit, can_view_rating)

Add can_view, can_edit and can_view_rating fields to a tuple.

hedwig.type.util.with_cache(obj, cache)

Add a cache field to a tuple and set it to the given value.

hedwig.type.util.with_deadline(obj, deadline)

Add a deadline field to a tuple.