-
Notifications
You must be signed in to change notification settings - Fork 1
Home
Christian Bora edited this page Jun 25, 2015
·
10 revisions
Welcome to the recast-database wiki!
As a recast user,
- I want to be able to list all requests associated to a given analysis
def requests_for_analysis(analysis):
return db.session.query(ScanRequest).filter(ScanRequest.id == analysis.id).all()
- I want to be able to list the model parameters and their values for a given request
def parameters_for_scan_request(scan_request):
return db.session.query(Parameters).filter(Parameters.scan_request == scan_request).all()
- I want to be able to view all analyses and order them by their descriptions
def analyses_order_by_description():
return db.session.query(Analysis).order_by(Analysis.description_of_original_analysis).all()
- I want to be able to view all requests and order them by id
def requests_order_by_id():
return db.session.query(ScanRequest).order_by(ScanRequest.id).all()
- I want to be able to view all analyses I have submitted
def analysis_for_user(user):
return db.session.query(Analysis).filter(Analysis.user == user).all()
- I want to be able to view all analyses submitted by other users
#So all the other analyses but mine
def analysis_for_users(user):
return db.session.query(Analysis).filter(Analysis.user != user).all()
- I want to be able to view a description and published articles associated with an analysis
def description_for_analysis(analysis):
return analysis.description_of_original_analysis
- I want to be able to view a description of a given model
def description_for_model(model):
return model.description_of_model
- I want to be able to submit and receive notifications associated to a given request
#query all notifications
def all_notifications():
return db.session.query(RequestNotification).all()
- I want to be able to easily re-submit a request
* -> add a request to the db? or backend stuff I suppose
- I want to be able to update my email and personal information
def update_email(user):
new_user = db.session.query(User).filter(User == user).one()
new_user.email = "[email protected]"
db.session.add(new_user)
db.session.commit()
- I want to be able to receive notifications
# here we will query a notification associated to a scan request
def notifications_for_scan_request(request):
return db.session.session.query(RequestNotification).filter(RequestNotification.scan_request == request)
- I want to be able to get a result for a given request
# in other words given a scan request get the response
def scan_response_for_scan_request(scan_request):
return db.session.query(ScanResponse).(ScanResponse.scan_request == scan_request).one()
- I want to be able to get results in a reasonable amount of time
....
- I want to be able to view the results with all related attributes
def all_basic_response():
return db.session.query(BasicResponse).all()
- I want to be able to search for all analyses using the ATLAS detector
def analysis_for_ATLAS():
return db.session.query(Analysis).filter(Analysis.description_of_original_analysis.like('%ATLAS%')).all()
- I want to be able to search for all recast requests involving the ATLAS detector
def request_for_ATLAS():
return db.session.query(Request).filter(Request.description_of_model.like('%ATLAS%')).all()
- I want to be able to search for all analyses performed by a specific researcher or group
def analysis_for_user(user):
db.session.query(Analysis).filter(Analysis.user == user).all()
- I want to be able to search for all recast requests initiated by a specific researcher or group
def request_for_user(user):
db.session.query(ScanRequest).filter(ScanRequest.user == user).all()
- I want to be able to search for all analyses that do not use the ATLAS detector
def analysis_not_for_ATLAS():
return db.session.query(Analysis).filter(~Analysis.description_of_analysis.like('%ATLAS%')).all()
- I want to be able to search for all recast requests that do not specify using the ATLAS detector
def request_not_for_ATLAS():
returndb.session.query(ScanRequest).filter(~ScanRequest.description_of_model.like('%ATLAS%')).all()
- I want to be able to search for all analyses that are/were performed at 7 TeV
#where will find this information if 7 or 8 or 13 Tev -- do we have a dedicated field for that?
def analysis_for_7Tev():
return db.session.query(Analysis).filter(Analysis.description_of_original_analysis.like('%7 TeV%')).all()
- I want to be able to search for all recast requests that specify 7 TeV
def request_for_7TeV():
return db.session.query(ScanRequest).filter(ScanRequest.description_of_model.like('%7 Tev%')).all()
- I want to sign up for a new login to be able to make a new recast request
# (The schema is not handling this right?)
- I want to make a scan over some parameter points for some model and make point request for each point
- I want to extend the set of parameter points in a scan
# so add more parameter points associated to a scan request
- I want to iterate over the points in the scan
- I want to find all scan requests for a particular model
def scan_request_for_model(model):
return db.session.query(ScanRequest).filter(ScanRequest.model == model).all()
- I want to know the status of each request
Should we add a status variable in the ScanRequest table?
As a subscriber,
- I want to be notified when new requests have been submitted or processed