Package: omero-py
IntroductionOMERO.py provides Python bindings to the OMERO.blitz server
as well as a pluggable command-line interface.DependenciesDirect dependencies of OMERO.py are:ZeroC IcePy 3.6future (deprecated)numpyPillow >= 10.0.0InstallationWe recommend installing omero-py in a Python virtual environment.
You can create one using eithervenvorconda(preferred).
If you opt forConda, you will need
to install it first, seeminicondafor more details.To installomero-pyusing conda (preferred):conda create -n myenv -c conda-forge python=3.8 omero-py
conda activate myenvAlternatively installomero-pyusing venv:python3.8 -m venv myenv
. myenv/bin/activate
pip install omero-pyYou may need to replacepython3.8withpythonorpython3depending on your Python distribution.Setting of the environment variableOMERODIRis required
for some functionality.$OMERODIR/var/log/directory will contain log files.$OMERODIR/etc/grid/config.xmlis used to store config.IfOMERODIRis set to an OMERO.server directory,
theimportandadmincommands will be enabled:# If you need import or admin commands:
export OMERODIR=/path/to/OMERO.server/

# otherwise, can choose any location.
export OMERODIR=$(pwd)Since version 5.13.0, the use ofomero certificatesis required to ensure that an OMERO server installation has, at minimum, a self-signed certificate.See:OMEROdocumentation for more details andOMERO server certificate management pluginUsageFor OMERO python language bindings, seeOMERO.py.For Command Line usage, seeOMERO.CLI.For API documentation, seehttps://omero-py.readthedocs.io/ContributingSee:OMEROdocumentationDeveloper installationOMERO.py currently depends on an externally built artifact which is automatically bundled in the PyPI package.For a development installation we recommend creating a virtualenv with the following setup (example assumespython3.8but you can create and activate the virtualenv using any compatible Python):To install using venv:python3.8 -mvenv myenv
. myenv/bin/activate
git clone https://github.com/ome/omero-py
cd omero-py
python setup.py devtarget
pip install -e .To installomero-pyusing conda (preferred):conda create -n myenv -c ome python=3.8 zeroc-ice36-python
conda activate myenv
git clone https://github.com/ome/omero-py
cd omero-py
python setup.py devtarget
pip install -e .This will install omero-py into your virtualenv as an editable package, so any edits tosrcfiles should be reflected in your installation.
Note that if you add or remove files you must rerun the last two steps.Running testsUnit tests are located under thetestdirectory and can be run with pytest.Integration testsIntegration tests are stored in the main repository (ome/openmicroscopy) and depend on the
OMERO integration testing framework. Reading aboutRunning and writing testsin theOMEROdocumentationRelease processThis repository usesbump2versionto manage version numbers.
To tag a release run:$ bumpversion releaseThis will remove the.dev0suffix from the current version, commit, and tag the release.To switch back to a development version run:$ bumpversion --no-tag [major|minor|patch]specifyingmajor,minororpatchdepending on whether the development branch will be amajor, minor or patch release. This will also add the.dev0suffix.Remember togit pushall commits and tags.s essential.The CI pipeline will automatically deploy the tag onto PyPI. Once released,
a Pull Request needs to be opened againstconda-omero-pyto update the
officialOMERO.py Conda package.DocumentationThe API documentation is generated using Sphinx.
To generate it:InstallSphinx.Set the environment variableNO_TEMP_MANAGERtotrue.In thedocsdirectory, runmake clean html.LicenseOMERO.py is released under the GPL v2.Copyright2009-2023, The Open Microscopy Environment, Glencoe Software, Inc.