module: proposal

Data for one General User Proposal

class Assign_GUP.proposal.AGUP_Proposal_Data(xmlParentNode=None, xmlFile=None)[source]

Bases: object

A single General User Proposal

addTopic(topic, value=None)[source]

declare a new topic and give it an initial value (default value=0.0)

topic must not exist or KeyError exception will be raised

addTopics(topics_list)[source]

declare several new topics and give them all default values

each topic must not exist or KeyError exception will be raised

getAssignedReviewers()[source]

return a list of assigned reviewers for this proposal

getExcludedReviewers(reviewers)[source]

return a list of excluded reviewers for this proposal

Parameters:reviewers (obj) – list of all available reviewers
getKey(key)[source]

get the item from self.db identified by key

getSubjects()[source]

return the list of subjects as specified in the Proposal

getTopic(topic)[source]

return the value of the named topic

getTopicList()[source]

return a list of all topics

hasTopic(topic)[source]

does the named topic exist?

importXml(proposal_node)[source]

Fill the class variables with values from the XML node

Parameters:proposal_node – lxml node of the Proposal
removeTopic(key)[source]

remove the named topic

removeTopics(key_list)[source]

remove several topics at once

setAssignedReviewer(reviewer, role=None)[source]

assign a reviewer to this proposal as primary (role=1) or secondary (role=2) or None (unassigned)

setTopic(topic, value=None)[source]

set value of an existing topic

topic must exist or KeyError exception will be raised

writeXmlNode(specified_node)[source]

write this Proposal’s data to a specified node in the XML document

Parameters:specified_node (obj) – XML node to contain this data