Code Monkey home page Code Monkey logo

exi's Introduction

ISPyB Project

  1. Installing
  2. Database creation and update
  3. Database schema

Installing

  1. Clone the ISPyB repository:

    git clone https://github.com/ispyb/ISPyB.git
    
  2. ISPyB needs the third-party libraries provided in the dependencies directory. These don't exist in a public repository, so install them to the local Maven repository so that Maven can find them:

    cd dependencies && mvn initialize
    
  3. Build ISPyB using Maven:

    mvn clean install
    

    By default, ISPyB builds for the GENERIC site and the development environment. These can be changed with the ispyb.site and ispyb.env system properties. For example, to build for the ESRF site and the test environment:

    mvn -Dispyb.site=ESRF -Dispyb.env=test clean install
    

    If the build succeeds, a summary message will be printed like this:

    [INFO] Reactor Summary:
    [INFO]
    [INFO] ispyb-parent ...................................... SUCCESS [0.251s]
    [INFO] ispyb-ejb3 ........................................ SUCCESS [10.243s]
    [INFO] ispyb-ws .......................................... SUCCESS [1.751s]
    [INFO] ispyb-ui .......................................... SUCCESS [7.212s]
    [INFO] ispyb-ear ......................................... SUCCESS [5.048s]
    [INFO] ispyb-bcr ......................................... SUCCESS [2.217s]
    [INFO] ispyb-bcr-ear ..................................... SUCCESS [1.806s]
    

Database creation and update

Run the following creation scripts from the ispyb-ejb module (note that this requires the pxadmin database user to exist and have full permissions):

  1. ispyb-ejb/db/scripts/pyconfig.sql: This corresponds to the menu options and contains both structure and data.

  2. ispyb-ejb/db/scripts/pydb.sql: This corresponds to the ISPyB metadata and contains only the database structure.

  3. ispyb-ejb/db/scripts/schemastatus.sql: This corresponds to the SchemaStatus table and contains both structure and data. The entries indicate which update scripts have been run.

  4. ispyb-ejb/db/scripts/ispybAutoprocAttachment.sql: This corresponds to the type and names of different autoPROC attachments.

The creation scripts are normally updated for each tag, but if you are using the master branch, you may have to run the update scripts in ispyb-ejb/db/scripts/ahead.

Check the entries in the SchemaStatus table to know which scripts to execute. The scripts already run for the current tag are in ispyb-ejb/db/scripts/passed.

Creating an update script

The first line must be:

insert into SchemaStatus (scriptName, schemaStatus) values ('2017_06_06_blabla.sql','ONGOING');

Then comes the actual updates of the script:

-- SQL statements here

And the last line must be:

update SchemaStatus set schemaStatus = 'DONE' where scriptName = '2017_06_06_blabla.sql';

The last line updates the SchemaStatus table to mark the script as having been run.

Database schema

A patch or commit that changes the database schema must be accompanied by a corresponding change to the schema file to keep it up to date. This file can be edited using MySQL Workbench (a free tool from MySQL).

exi's People

Contributors

antolinos avatar delageniere avatar hannes-petri-maxiv-lu-se avatar hormiai76 avatar ispyb avatar olofsvensson avatar sergiogf93 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

exi's Issues

Session panel for managers

Sessions should be better arranged in the main panel. It is also needed the possibility to look for a date, proposal code and number but also by title of the proposal

Display machine status on EXI

We could add something to display the machine status:

<!DOCTYPE html>
<html>
<style>
.tooltip {
    position: relative;
    display: inline-block;
    border-bottom: 1px dotted black;
}

.tooltip .tooltiptext {
    visibility: hidden;
   
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px 0;

    /* Position the tooltip */
    position: absolute;
    z-index: 1;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
}
</style>
<body style="text-align:center;">

<p>Move the mouse over the text below:</p>

<div class="tooltip">Hover over me
  <span class="tooltiptext">
  <img src='http://www.esrf.fr/esrf_status/gifs/img1.png'>
  <img src='http://www.esrf.fr/esrf_status/gifs/img2.png'>
  <img src='http://www.esrf.fr/esrf_status/gifs/img3.png'>
  </span>
</div>


</body>
</html>

New tab for Molecular Replacement

Molecular replacement is filling the phasing tables and we need a new tab at level of data collection group summary to display the results.
These results are the phasing results filtered by method = MR

PuckWidgetContainer

In the constructor of PuckWidgetContainer class args.puckType should not be integer but string to make easier to understand.
As well as args.x and args.y, if they are the margin then they should be called margin

Dewars from shipment whithout a session attached

It seems like the method with the url:

this.get('/{token}/proposal/{proposal}/dewar/list');

Doesn't return the dewars that belong to a shipment without a beamline attached.

Would it be possible to alse return these kind of dewars?

Refactorize autoprocessing parameters as a widget

This needs to be refactorized in a widge to keep the menu short and clean:
`MXManagerMenu.prototype.getManagerMenu = function() {
var _this = this;
function onItemCheck(item, checked) {
if (item.text == "Autoproc Scaling Statistics") {
var scatteringForm = new ScatteringForm({width : 650, height : 560});

		var window = Ext.create('Ext.window.Window', {
			title: "Plot autoprocessing values for last week",
			height : 560,
			width : 650,
			modal : true,
			layout : 'fit',
			items : [ scatteringForm.getPanel() ],
			buttons : [ {
					text : 'Plot',
					handler : function() {
						scatteringForm.plot();
					}
				}, {
					text : 'Cancel',
					handler : function() {
						window.close();
					}
				} ]
		}).show();

		var keys = ["ISA", "rPimWithinIPlusIMinus","anomalousMultiplicity","multiplicity","resolutionLimitLow","ccHalf",
		"strategySubWedgeOrigId","completeness","rMerge","anomalous","meanIOverSigI","ccAno","autoProcScalingId",
		"nTotalObservations","sigAno","rMeasWithinIPlusIMinus","anomalousCompleteness","resolutionLimitHigh",
		"fractionalPartialBias","rMeasAllIPlusIMinus","nTotalUniqueObservations","rPimAllIPlusIMinus"];

		var scatteringData = {title : "AutoprocIntegrator", keys : keys};

		scatteringForm.load(scatteringData);
	}
}

return Ext.create('Ext.menu.Menu', {
	items : [
				{
					text : 'Statistics',
					icon : '../images/icon/ic_insert_chart_black_36dp.png',
					menu : {       
							items: [
								{
									text: 'Autoproc Scaling Statistics',
									icon : '../images/icon/ic_insert_chart_black_36dp.png',
									handler: onItemCheck,
									disabled : false
								}
							]
						}
				}
		] 
});`

Lab contact creation

We need to be able to create new shipping addresses.

image

We try to do this by sending a json through the following method with the labContactId set to null:

EXI.getDataAdapter().proposal.labcontacts.saveLabContact

This does not creates an id for the created Lab contact though.

Manager Menu

There is the need to create a manager menu class.

SaveContainer

The method EXI.getDataAdapter({).proposal.shipping.saveContainer receives a json as a parameter with the container information but the containerType value is not updated.

Industrials users can not log in

Role of industrial users is: Industrial
EXI does not about Industrial only Users and Managers (+ localcontacts)

EXI should behave with an industrial as if it was an user

Allow beamline reset when unloading the sample changer in Prepare Experiment

When the button "Unload all" is clicked, the beamline should be set to null for each container:

image

It would be necessary that the method:

EXI.getDataAdapter().proposal.dewar.updateSampleLocation([containerId], [beamline], [sampleChangerLocation]);

Could receive an empty string or a null value at the beamline parameter to achieve this.

Sort autoprocessing

Group autoprocessing results by anomalous and non anoumaluos and sort by:

  1. Space group
  2. Lower rMerge

Improvements of data collection tab

I have a patch ready that makes the following improvements to the data collection tab:

  1. Swap of prefix and run number:
    image

  2. Add image template to directory popup:
    image

Shipping fields needs to be updated when a shipment is sent to ESRF

The method EXI.getDataAdapter().proposal.shipping.saveShipment
with the URL: /{token}/proposal/{proposal}/shipping/save'

Needs to update shippingStatus, deliveryAgentDeliveryDate, deliveryAgentShippingDate, and for each dewar in dewarVOs trackingNumberToSynchrotron.

Enable animated gifs for crystal snapshots

The MXPress workflows will be modified to produce animated gifs of the sample snapshots:
image
I'll submit a patch which enables the view of this animated gif also on the data collection summary table by hovering the mouse over the snapshot:
image

Needed values for the sessions at the welcome page

The session grid interface is being changed into something like this:

image

We need to display the workflowCount, the autoprocResultsCount and the phasingResultsCount for each sessions.

It would be nice if these parameters were returned by the following urls:

this.get('/{token}/proposal/{0}/session/list'.format([proposal]));
this.get('/{token}/proposal/session/beamlineoperator/{0}/list'.format([beamlineOperator]));
this.get('/{token}/proposal/{0}/session/date/{1}/{2}/list'.format([proposal, startDate, endDate]));
this.get('/{token}/proposal/session/date/{0}/{1}/list'.format([startDate, endDate]));

Stats about number of users that logs in EXI

It would be great if we could have a table where we can see the number of users currently connected and also the number of users that use EXI
I can imagine a plot like this where it is displayed the number of unique connections and the number of total connections to EXI.

image

Clean up dependencies

There are some unused dependencies on js/dependencies
In principle we let bower to manage our dependencies itself so we should be capable to remove most of them

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.