mxcubecore.HardwareObjects.mockup.ISPyBClientMockup#
A client for ISPyB Webservices.
Classes
|
Web-service client for ISPyB. |
- class mxcubecore.HardwareObjects.mockup.ISPyBClientMockup.ISPyBClientMockup(name)[source]#
Bases:
ProposalTypeISPyBLims
Web-service client for ISPyB.
- getProposal(proposal_code, proposal_number)#
Returns the tuple (Proposal, Person, Laboratory, Session, Status). Containing the data from the corresponding tables in the database the status of the database operations are returned in Status.
- get_proposal(proposal_code, proposal_number)[source]#
Returns the tuple (Proposal, Person, Laboratory, Session, Status). Containing the data from the corresponding tables in the database the status of the database operations are returned in Status.
- get_proposals_by_user(user_name)[source]#
Returns a list with proposal dictionaries for login_id
- Proposal dictionary structure:
- {
“Proposal”: proposal, “Person”: , “Laboratory”:, “Session”:,
}
- get_samples(lims_name)[source]#
Returns a list of sample dictionaries for the current user from lims_name
Structure of sample dictionary: {
“containerCode”: str, “containerSampleChangerLocation”: int, “crystalId”: int, “crystalSpaceGroup”: str, “diffractionPlan”: {
“diffractionPlanId”: int
},
“proteinAcronym”: “str, “sampleId”: int, “sampleLocation”: int, “sampleName”: str
}
- isInhouseUser(proposal_code, proposal_number)[source]#
Returns True if the proposal is considered to be a in-house user.
- login(user_name: str, password: str, is_local_host: bool) LimsSessionManager [source]#
Login to LIMS, returns a list of Session objects for login_id
- Parameters:
- Return type:
- storeBeamLineSetup(session_id, bl_config)#
Stores the beamline setup dict <bl_config>.
- storeDataCollection(mx_collection, bl_config=None)#
Stores the data collection mx_collection, and the beamline setup if provided.
- storeImage(image_dict)#
Stores the image (image parameters) <image_dict>
- Parameters:
image_dict (dict) – A dictionary with image pramaters.
- Returns:
None
- store_data_collection(mx_collection, bl_config=None)[source]#
Stores the data collection mx_collection, and the beamline setup if provided.
- store_image(image_dict)[source]#
Stores the image (image parameters) <image_dict>
- Parameters:
image_dict (dict) – A dictionary with image pramaters.
- Returns:
None
- store_robot_action(robot_action_dict)[source]#
Stores the robot action dictionary.
Structure of robot_action_dictionary: {
“actionType”:str, “containerLocation”: str, “dewarLocation”:str, “message”:str, “sampleBarcode”:str, “sessionId”:int, “sampleId”:int. “startTime”:str, “endTime”:str, “xtalSnapshotAfter:str”, “xtalSnapshotBefore:str”,
}
- Parameters:
robot_action_dict – robot action dictionary as defined above
- translate(code, what)[source]#
Given a proposal code, returns the correct code to use in the GUI, or what to send to LDAP, user office database, or the ISPyB database.
- updateBLSample(bl_sample)#
Creates or stos a BLSample entry.
- Parameters:
sample_dict (dict) – A dictionary with the properties for the entry.
# NBNB update doc string
- updateDataCollection(mx_collection, wait=False)#
Updates the datacollction mx_collection, this requires that the collectionId attribute is set and exists in the database.
- Parameters:
mx_collection (dict) – The dictionary with collections parameters.
- Returns:
None