[ome-devel] Python API - Server version check

Luca Lianas luca.lianas at crs4.it
Thu Jul 18 16:23:01 BST 2013


Thanks Ola!
I used the omero_version variable and the configService to perform a check
between client and server versions (as you can see in the attached python
example) and it worked fine.
I also added a property in the components/antlib/resources/global.xml file
like this

* <!--*
*    OMERO.biobank properties*
* -->*
* <property name="biobank.version" value="0.6-beta"/>*

and updated the build.xml file like this

*    <target name="version">*
*
*
*        <gitdescribe select="\2\3\5\6">*
*        </gitdescribe>*
*
<echo>${version.describe}-ice${versions.ice_lib}-biobank${biobank.version}</echo>
*
*    </target>*

in order to apply the biobank tag we needed.

The results is

*luca at tensa-zangetsu:/opt/omero_4.4.8$ ./build.py version*
*Buildfile: /opt/omero_4.4.8/build.xml*
*
*
*version:*
*4.4.8-dirty-ice34-biobank0.6-beta*
*
*
*BUILD SUCCESSFUL*
*Total time: 0 seconds*

Are these the right files that I need to update or is it better to make
these changes somewhere else?

Thanks

Luca



2013/7/18 Aleksandra Tarkowska <A.Tarkowska at dundee.ac.uk>

>  Hi Luca
>
>  There is a python function in
> https://github.com/openmicroscopy/openmicroscopy/blob/dev_4_4/components/tools/OmeroWeb/omeroweb/webadmin/webadmin_utils.py#L12
>
>  you just need to call it during the login process
>
>  from omeroweb.webadmin.webadmin_utils import upgradeCheck
> upgradeCheck()
>
>
> Thanks
>  Ola
>
>
>  Aleksandra Tarkowska, M.Sc. Eng.
>  OME Software Developer
>
>  Wellcome Trust Centre for Gene Regulation & Expression
> College of Life Sciences
> MSI/WTB/JBC Complex
> University of Dundee
> Dow Street
> Dundee  DD1 5EH
> United Kingdom
>
>  On 18 Jul 2013, at 13:15, Luca Lianas <luca.lianas at crs4.it>
>  wrote:
>
>  Hi,
> is there a way to perform a version check between the Python API and an
> OMERO server?
> We need some kind of automatic mechanism that will throw an exception if
> the version of the server and the version of the compiled API are not the
> same (i.e. using an OMERO 4.4.8 Python API against a 4.3 OMERO server).
> Our idea is to add a "biobank" tag to perform a check which can guarantee
> that the API we are using was compiled against the same ICE version and the
> same OMERO.biobank models used to compile the server.
>
>  Thanks,
>
>  Luca
>
>  --
> Luca Lianas
> Data Fusion - Distributed Computing
> CRS4 - Centro di Ricerche, Sviluppo e Studi Superiori della Sardegna
> POLARIS, Edificio 1, 09010 PULA (CA - Italy)
>
>
> Phone: 070/9250266
> Email: luca.lianas at crs4.it
>   _______________________________________________
> ome-devel mailing list
> ome-devel at lists.openmicroscopy.org.uk
> http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel
>
>
>
> The University of Dundee is a registered Scottish Charity, No: SC015096
>



-- 
Luca Lianas
Data Fusion - Distributed Computing
CRS4 - Centro di Ricerche, Sviluppo e Studi Superiori della Sardegna
POLARIS, Edificio 1, 09010 PULA (CA - Italy)


Phone: 070/9250266
Email: luca.lianas at crs4.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20130718/1158696e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check_ome_version.py
Type: application/octet-stream
Size: 750 bytes
Desc: not available
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20130718/1158696e/attachment-0001.obj>


More information about the ome-devel mailing list