idr-gallery


Nameidr-gallery JSON
Version 3.12.1 PyPI version JSON
download
home_pagehttps://github.com/IDR/idr-gallery
SummaryA Python plugin for OMERO.web
upload_time2024-11-26 16:13:08
maintainerNone
docs_urlNone
authorThe Open Microscopy Team
requires_python>=3
licenseAGPL-3.0
keywords omero.web plugin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. image:: https://github.com/ome/omero-gallery/workflows/OMERO/badge.svg
    :target: https://github.com/ome/omero-gallery/actions

.. image:: https://badge.fury.io/py/omero-gallery.svg
    :target: https://badge.fury.io/py/omero-gallery

IDR gallery
===========

This is an OMERO.web plugin (Django app) that provides a 'gallery' view of images in OMERO, ideal for public browsing without editing.

Also see `SUPPORT.md <https://github.com/ome/omero-gallery/blob/master/SUPPORT.md>`_

Requirements
============

* OMERO.web 5.6.0 or newer.

Installing from PyPI
====================

This section assumes that an OMERO.web is already installed.

Install the app using `pip <https://pip.pypa.io/en/stable/>`_:

::

    $ pip install -U idr-gallery

Add gallery custom app to your installed web apps:

::

    $ omero config append omero.web.apps '"idr_gallery"'

Now restart OMERO.web as normal.


IDR.gallery overview
====================

This UI was developed for use in the IDR and can be seen at
https://idr.openmicroscopy.org/. In the IDR, a "Study" is a Project or Screen
and they are annotated with Key-Value data in the form of Map Annotations,
for example ``Study Type: 3D-tracking``.
The UI supports several features based on these Key-Value attributes:

* Home page shows 'Categories' that are defined by queries on Map Annotations.
* Filter studies by Map Annotations.

If Images are also annotated with Map Annotations and
https://github.com/ome/omero-mapr/ is installed then you can:

* Find Studies containing Images that match queries on their Map Annotations.


Configuring the UI
------------------

**omero.web.gallery.category_queries:**
To enable the Categories UI, you must set ``omero.web.gallery.category_queries``.
If this is not set, you will see the Default UI shown above and the other
settings described below will be ignored.

Each Category is defined by a display ``label``, a ``query`` to select the Projects
and Screens and an ``index`` to specify the order they appear on the page.
Most of the examples below are used in the IDR. You can view the Categories
at https://idr.openmicroscopy.org/ and see the query for each as a tooltip on
the label of each category.

In the simplest case, if you do not have Map Annotations on Studies (Projects and
Screens), you can simply sort by Name. This example defines
a Category: "All Studies" to show the first 50 studies by Name::

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

Other categories are defined by queries on Map Annotations. For example, to
show all Studies that have Key:Value of ``Study Type: 3D-tracking``::

    $ omero config set omero.web.gallery.category_queries '{
      "tracking":{"label":"3D tracking", "index":0, "query":"Study Type: 3D-tracking"}
      }'

Queries can use the ``AND`` and ``OR`` keywords to combine queries::

    $ omero config set omero.web.gallery.category_queries '{
      "time":{"label":"Time-lapse imaging", "index":0, "query":"Study Type: 3D-tracking OR Study Type: time"},
      "screens":{"label":"High-content screening (human)", "index":1, "query":"Organism:Homo sapiens AND Study Type:high content screen"}
      }'

**omero.web.gallery.filter_keys:**
If this is configured then the gallery will allow filtering of Screens and
Projects by Key:Value pairs linked to them, or use ``Name`` to filter by Name
or ``Group`` to filter by Group.
This list defines which Keys the user can choose in the UI.
On selecting a Key, the user will be able to filter by Values typed into
an auto-complete field.

Each item is a simple string (matching the Key) or an object with a ``label``
and ``value``, where ``value`` matches the Key. An example based on IDR::

    $ omero config set omero.web.gallery.filter_keys '[
        "Name",
        "Imaging Method",
        "Organism",
        {"label": "Publication Authors", "value": "Authors"}
    ]'


**omero.web.gallery.title:**
Sets the html page ```<title>title</title>``` for gallery pages.


**omero.web.gallery.top_left_logo:**
This setting can be used to replace the 'IDR' logo at the top-left of the
page with an image hosted elsewhere (png, jpeg or svg). It will be displayed
with height of 33 pixels and maximum width of 200 pixels::

    $ omero config set omero.web.gallery.top_left_logo '{"src": "https://www.openmicroscopy.org/img/logos/ome-main-nav.svg"}'


**omero.web.gallery.heading:**
Replace the "Welcome to IDR.gallery" heading on the home page.


**omero.web.gallery.top_right_links:**
This specifies a list of links as {'text':'Text','href':'www.url'} for the
top-right of each page. If a link contains 'submenu':[ ] with more links,
these will be shown in a dropdown menu::

    $ omero config set omero.web.gallery.top_right_links '[
        {"text":"IDR", "href":"https://idr.openmicroscopy.org/"}
    ]'

**omero.web.gallery.favicon:**
Set a URL to a favicon to use for the browser.

**omero.web.gallery.study_short_name:**
This specifies a short name for Screen or Project to show above the study Image
in the categories or search page, instead of the default 'Project: 123'.
The list allows us to try multiple methods, using the first that works.
Each object in the list has e.g. {'key': 'Name'}. The 'key' can be Name,
Description or the key for a Key:Value pair on the object.
If a 'regex' and 'template' are specified, we try name.replace(regex, template).
In this example, we check for a Key:Value named "Title". If that is not found,
then we use a regex based on the object's Name. This example is from the IDR,
where we want to create a short name like ``idr0001A`` from a Name
like: ``idr0001-graml-sysgro/screenA``::

    $ omero config set omero.web.gallery.study_short_name '[
        {"key":"Title"},
        {"key":"Name", "regex": "^(.*?)-.*?(.)$", "template": "$1$2"},
    ]'

Release process
---------------

- occasionally update `totalImages` and other fallback counts in loadStudyStats()
- review and update the `CHANGELOG <https://github.com/ome/omero-gallery/blob/master/CHANGELOG.md>`_
- run ``bumpversion release`` to remove the dev suffix and create a signed tag
- run ``bumpversion --no-tag patch`` to bump the version to the next dev suffix
- push the newly created tag and ``master`` to ``origin``. e.g. ``git push origin master v3.3.3``
- the GitHub action build for the tag includes a PyPI deployment step, so no need to deploy on PyPI manually

License
-------

`idr_gallery` is released under the AGPL.

Copyright
---------

2016-2023, The Open Microscopy Environment

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IDR/idr-gallery",
    "name": "idr-gallery",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": null,
    "keywords": "OMERO.web, plugin",
    "author": "The Open Microscopy Team",
    "author_email": "ome-devel@lists.openmicroscopy.org.uk",
    "download_url": "https://files.pythonhosted.org/packages/01/dd/cc1f6185dbc0cb790d7bb99bace262cf1637483176123d31ed9df35142a8/idr_gallery-3.12.1.tar.gz",
    "platform": null,
    "description": ".. image:: https://github.com/ome/omero-gallery/workflows/OMERO/badge.svg\n    :target: https://github.com/ome/omero-gallery/actions\n\n.. image:: https://badge.fury.io/py/omero-gallery.svg\n    :target: https://badge.fury.io/py/omero-gallery\n\nIDR gallery\n===========\n\nThis is an OMERO.web plugin (Django app) that provides a 'gallery' view of images in OMERO, ideal for public browsing without editing.\n\nAlso see `SUPPORT.md <https://github.com/ome/omero-gallery/blob/master/SUPPORT.md>`_\n\nRequirements\n============\n\n* OMERO.web 5.6.0 or newer.\n\nInstalling from PyPI\n====================\n\nThis section assumes that an OMERO.web is already installed.\n\nInstall the app using `pip <https://pip.pypa.io/en/stable/>`_:\n\n::\n\n    $ pip install -U idr-gallery\n\nAdd gallery custom app to your installed web apps:\n\n::\n\n    $ omero config append omero.web.apps '\"idr_gallery\"'\n\nNow restart OMERO.web as normal.\n\n\nIDR.gallery overview\n====================\n\nThis UI was developed for use in the IDR and can be seen at\nhttps://idr.openmicroscopy.org/. In the IDR, a \"Study\" is a Project or Screen\nand they are annotated with Key-Value data in the form of Map Annotations,\nfor example ``Study Type: 3D-tracking``.\nThe UI supports several features based on these Key-Value attributes:\n\n* Home page shows 'Categories' that are defined by queries on Map Annotations.\n* Filter studies by Map Annotations.\n\nIf Images are also annotated with Map Annotations and\nhttps://github.com/ome/omero-mapr/ is installed then you can:\n\n* Find Studies containing Images that match queries on their Map Annotations.\n\n\nConfiguring the UI\n------------------\n\n**omero.web.gallery.category_queries:**\nTo enable the Categories UI, you must set ``omero.web.gallery.category_queries``.\nIf this is not set, you will see the Default UI shown above and the other\nsettings described below will be ignored.\n\nEach Category is defined by a display ``label``, a ``query`` to select the Projects\nand Screens and an ``index`` to specify the order they appear on the page.\nMost of the examples below are used in the IDR. You can view the Categories\nat https://idr.openmicroscopy.org/ and see the query for each as a tooltip on\nthe label of each category.\n\nIn the simplest case, if you do not have Map Annotations on Studies (Projects and\nScreens), you can simply sort by Name. This example defines\na Category: \"All Studies\" to show the first 50 studies by Name::\n\n    $ omero config set omero.web.gallery.category_queries '{\n      \"all\":{\"label\":\"All Studies\", \"index\":0, \"query\":\"FIRST50:Name\"}\n      }'\n\nOther categories are defined by queries on Map Annotations. For example, to\nshow all Studies that have Key:Value of ``Study Type: 3D-tracking``::\n\n    $ omero config set omero.web.gallery.category_queries '{\n      \"tracking\":{\"label\":\"3D tracking\", \"index\":0, \"query\":\"Study Type: 3D-tracking\"}\n      }'\n\nQueries can use the ``AND`` and ``OR`` keywords to combine queries::\n\n    $ omero config set omero.web.gallery.category_queries '{\n      \"time\":{\"label\":\"Time-lapse imaging\", \"index\":0, \"query\":\"Study Type: 3D-tracking OR Study Type: time\"},\n      \"screens\":{\"label\":\"High-content screening (human)\", \"index\":1, \"query\":\"Organism:Homo sapiens AND Study Type:high content screen\"}\n      }'\n\n**omero.web.gallery.filter_keys:**\nIf this is configured then the gallery will allow filtering of Screens and\nProjects by Key:Value pairs linked to them, or use ``Name`` to filter by Name\nor ``Group`` to filter by Group.\nThis list defines which Keys the user can choose in the UI.\nOn selecting a Key, the user will be able to filter by Values typed into\nan auto-complete field.\n\nEach item is a simple string (matching the Key) or an object with a ``label``\nand ``value``, where ``value`` matches the Key. An example based on IDR::\n\n    $ omero config set omero.web.gallery.filter_keys '[\n        \"Name\",\n        \"Imaging Method\",\n        \"Organism\",\n        {\"label\": \"Publication Authors\", \"value\": \"Authors\"}\n    ]'\n\n\n**omero.web.gallery.title:**\nSets the html page ```<title>title</title>``` for gallery pages.\n\n\n**omero.web.gallery.top_left_logo:**\nThis setting can be used to replace the 'IDR' logo at the top-left of the\npage with an image hosted elsewhere (png, jpeg or svg). It will be displayed\nwith height of 33 pixels and maximum width of 200 pixels::\n\n    $ omero config set omero.web.gallery.top_left_logo '{\"src\": \"https://www.openmicroscopy.org/img/logos/ome-main-nav.svg\"}'\n\n\n**omero.web.gallery.heading:**\nReplace the \"Welcome to IDR.gallery\" heading on the home page.\n\n\n**omero.web.gallery.top_right_links:**\nThis specifies a list of links as {'text':'Text','href':'www.url'} for the\ntop-right of each page. If a link contains 'submenu':[ ] with more links,\nthese will be shown in a dropdown menu::\n\n    $ omero config set omero.web.gallery.top_right_links '[\n        {\"text\":\"IDR\", \"href\":\"https://idr.openmicroscopy.org/\"}\n    ]'\n\n**omero.web.gallery.favicon:**\nSet a URL to a favicon to use for the browser.\n\n**omero.web.gallery.study_short_name:**\nThis specifies a short name for Screen or Project to show above the study Image\nin the categories or search page, instead of the default 'Project: 123'.\nThe list allows us to try multiple methods, using the first that works.\nEach object in the list has e.g. {'key': 'Name'}. The 'key' can be Name,\nDescription or the key for a Key:Value pair on the object.\nIf a 'regex' and 'template' are specified, we try name.replace(regex, template).\nIn this example, we check for a Key:Value named \"Title\". If that is not found,\nthen we use a regex based on the object's Name. This example is from the IDR,\nwhere we want to create a short name like ``idr0001A`` from a Name\nlike: ``idr0001-graml-sysgro/screenA``::\n\n    $ omero config set omero.web.gallery.study_short_name '[\n        {\"key\":\"Title\"},\n        {\"key\":\"Name\", \"regex\": \"^(.*?)-.*?(.)$\", \"template\": \"$1$2\"},\n    ]'\n\nRelease process\n---------------\n\n- occasionally update `totalImages` and other fallback counts in loadStudyStats()\n- review and update the `CHANGELOG <https://github.com/ome/omero-gallery/blob/master/CHANGELOG.md>`_\n- run ``bumpversion release`` to remove the dev suffix and create a signed tag\n- run ``bumpversion --no-tag patch`` to bump the version to the next dev suffix\n- push the newly created tag and ``master`` to ``origin``. e.g. ``git push origin master v3.3.3``\n- the GitHub action build for the tag includes a PyPI deployment step, so no need to deploy on PyPI manually\n\nLicense\n-------\n\n`idr_gallery` is released under the AGPL.\n\nCopyright\n---------\n\n2016-2023, The Open Microscopy Environment\n",
    "bugtrack_url": null,
    "license": "AGPL-3.0",
    "summary": "A Python plugin for OMERO.web",
    "version": "3.12.1",
    "project_urls": {
        "Download": "https://github.com/IDR/idr-gallery/archive/v3.12.1.tar.gz",
        "Homepage": "https://github.com/IDR/idr-gallery"
    },
    "split_keywords": [
        "omero.web",
        " plugin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cbe0e79df287b9de4220a746e04ec80ba49ab859183ca948045d363683634032",
                "md5": "cbcc8fd9c3e836d70b22b0905a422010",
                "sha256": "bf4f737bf5a3b8f29b9eec0c9881aa72c3c952a149594c2a3654b6062007a2f8"
            },
            "downloads": -1,
            "filename": "idr_gallery-3.12.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "cbcc8fd9c3e836d70b22b0905a422010",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 484795,
            "upload_time": "2024-11-26T16:13:06",
            "upload_time_iso_8601": "2024-11-26T16:13:06.148621Z",
            "url": "https://files.pythonhosted.org/packages/cb/e0/e79df287b9de4220a746e04ec80ba49ab859183ca948045d363683634032/idr_gallery-3.12.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01ddcc1f6185dbc0cb790d7bb99bace262cf1637483176123d31ed9df35142a8",
                "md5": "95d10a7232091fcb80f80fd87af6eead",
                "sha256": "5c80f78a0df0a0a8f5f9c1c8ee6572bf6a1ec032752913bc2f133f6360393617"
            },
            "downloads": -1,
            "filename": "idr_gallery-3.12.1.tar.gz",
            "has_sig": false,
            "md5_digest": "95d10a7232091fcb80f80fd87af6eead",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 476183,
            "upload_time": "2024-11-26T16:13:08",
            "upload_time_iso_8601": "2024-11-26T16:13:08.074872Z",
            "url": "https://files.pythonhosted.org/packages/01/dd/cc1f6185dbc0cb790d7bb99bace262cf1637483176123d31ed9df35142a8/idr_gallery-3.12.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-26 16:13:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IDR",
    "github_project": "idr-gallery",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "idr-gallery"
}
        
Elapsed time: 0.48359s