ome / omero-gallery

https://pypi.org/project/omero-gallery/
GNU Affero General Public License v3.0
5 stars 15 forks source link

remove idr-specific code #42

Closed will-moore closed 5 years ago

will-moore commented 5 years ago

In order to use this for other (non-IDR) deployments, we need to remove anything that is specific to IDR: To test:

With this PR, we need only a single config to see the "new" gallery UI instead of the old one: e.g.

$ bin/omero config set omero.web.gallery.category_queries '{"all":{"label":"All Studies", "index":0, "query":"FIRST50:Name"}}'

will list up to 50 Screens and Projects, sorted by Name in the first category.

Screen Shot 2019-06-26 at 14 34 02

To restore IDR functionality we now need the following configs (to be tested at https://github.com/IDR/deployment/pull/189)

$ bin/omero config set omero.web.gallery.favicon "https://idr.openmicroscopy.org/about/img/logos/favicon-idr.ico"

$ bin/omero config set omero.web.gallery.top_left_logo '{"src": "http://idr.openmicroscopy.org/about/img/logos/logo-idr.svg"}'

$ bin/omero config set omero.web.gallery.top_right_links '[{"text": "About", "href": "https://idr.openmicroscopy.org/about/index.html", "submenu":[{"text": "Overview", "href": "https://idr.openmicroscopy.org/about/index.html"}, {"text": "Published studies", "href": "https://idr.openmicroscopy.org/about/studies.html"}, {"text": "API Access", "href": "https://idr.openmicroscopy.org/about/api.html"}, {"text": "Data download", "href": "https://idr.openmicroscopy.org/about/download.html"}, {"text": "Image Tools Resource (ITR)", "href": "https://idr.openmicroscopy.org/about/itr.html"}, {"text": "Virtual Analysis Environment (VAE)", "href": "https://idr.openmicroscopy.org/jupyter"}, {"text": "Deployment", "href": "https://idr.openmicroscopy.org/about/deployment.html"}]},{"text": "Submissions", "href": "https://idr.openmicroscopy.org/about/submission.html", "submenu": [{"text": "Overview", "href": "https://idr.openmicroscopy.org/about/submission.html"}, {"text": "Screens", "href": "https://idr.openmicroscopy.org/about/screens.html"},        {"text": "Experiments", "href": "https://idr.openmicroscopy.org/about/experiments.html"}]}]'

$ bin/omero config set  omero.web.gallery.subheading_html "The Image Data Resource (IDR) is a public repository of image datasets from published scientific studies,<br/>where the community can submit, search and access high-quality bio-image data."

$ bin/omero config set omero.web.gallery.footer_html IDR

// Existing settings...
$ bin/omero config set omero.web.gallery.filter_keys '[{"label": "Name (IDR number)", "value": "Name"}, "Imaging Method", "License", "Organism", "Publication Authors", "Publication Title", "Screen Technology Type", "Screen Type", "Study Type"]'

$ bin/ omero config set omero.web.gallery.base_url "https://idr.openmicroscopy.org/"

$ bin/omero config set omero.web.gallery.category_queries '{"latest": {"label": "Most Recent studies", "index": 0, "query": "LAST10:date"}, "timelapse": {"label": "Time-lapse imaging", "index": 1, "query": "Study Type:time OR Study Type:5D OR Study Type:3D-tracking"}, "lightsheet": {"label": "Light sheet fluorescence microscopy", "index": 2, "query": "Study Type:light sheet"}, "proteinlocalization": {"label": "Protein localization studies", "index": 3, "query": "Study Type:protein localization"}, "histology": {"label": "Digital pathology imaging", "index": 4, "query":"Study Type:histology"}, "yeast": {"label": "Yeast studies", "index": 5, "query": "Organism: Saccharomyces cerevisiae OR Organism:Schizosaccharomyces pombe"}, "humancellscreen": {"label": "High-content screening (human)", "index": 6, "query": "Organism:Homo sapiens AND Study Type:high content screen"}}'

$ bin/omero config set omero.web.gallery.study_short_name '[{"key": "Name", "regex": "^(.*?)-.*?(.)$", "template": "$1$2"}]'
joshmoore commented 5 years ago

let idrId = studyData.Name.split('-')[0] + studyData.Name[studyData.Name.length-1]; // idr0001A

@will-moore : how about a regex? In this case, something like ^(.*?)-.*?(.)$

mtbc commented 5 years ago

On https://merge-ci.openmicroscopy.org/web/gallery/ seeing weird terms like "confocal imagess" and "HeLa cells in mitosiss" and "Test DVss", wonder why the extra 's'.

mtbc commented 5 years ago

Would be lovely if it could wrap the studies, all six are in a horizontal scrolly thing for me even after I maximize the window.

will-moore commented 5 years ago

To test this PR with IDR settings (added in https://github.com/IDR/deployment/pull/189) please try the IDR test server. It should appear unchanged compared with idr.openmicroscopy.org Check:

joshmoore commented 5 years ago

~@will-moore : I'm missing a search bar on osx/chrome.~ nvm

mtbc commented 5 years ago

Regarding https://github.com/ome/omero-gallery/pull/42#issuecomment-506351011 all looking good to me. :+1:

will-moore commented 5 years ago

Will - discussed at IDR meeting:

Also:

joshmoore commented 5 years ago
./omero_gallery/gallery_settings.py:128:1: W293 blank line contains whitespace
will-moore commented 5 years ago

Ready for testing again at https://merge-ci.openmicroscopy.org/web/gallery/

joshmoore commented 5 years ago

Minor CSS issue on small windows where the rows aren't centered: Screen Shot 2019-07-02 at 11 51 36

will-moore commented 5 years ago

@joshmoore the off-centre 2-column layout is the same as at eg. http://idr.openmicroscopy.org/search/?query=Organism:Homo%20sapiens when resizing window. Needs a bit more work to fix that.

will-moore commented 5 years ago

Finally deployed with latest settings on test70 and all looks good!

manics commented 5 years ago

Searching for an image attribute on test70 results in an undefined Study ID: https://test70/cell/search/?query=mapr_gene:INCENP Screen Shot 2019-08-27 at 17 36 44

Also seen some weird behaviour when searching for phenotypes, see private screen recording (updated: turns out this is also present on idr-prod so isn't caused by this PR)

will-moore commented 5 years ago

To test fixes: