[ome-devel] Python API - Server version check

Sebastien Besson s.besson at dundee.ac.uk
Tue Jul 23 09:15:49 BST 2013


Hi Luca,

sorry for the delay. To implement a simple dependency check, your code changes make sense and I don't see anything wrong with your implementation.
Obviously, modifying the version target creates a very tight coupling between the omero version and the biobank version, but this may be exactly part of the design you want to achieve.

I am away for two weeks but I will definitely try out omero.biobank once back from vacation. I will let you know if I have some extra comment by then.
Note also that providing ways to define dependencies between server and components is something we want to explore in the upcoming months.

Cheers,
Sebastien

On 18 Jul 2013, at 16:23, Luca Lianas wrote:

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<mailto: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<mailto: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<mailto:luca.lianas at crs4.it>
_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto: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<mailto:luca.lianas at crs4.it>
<check_ome_version.py>_______________________________________________
ome-devel mailing list
ome-devel at lists.openmicroscopy.org.uk<mailto:ome-devel at lists.openmicroscopy.org.uk>
http://lists.openmicroscopy.org.uk/mailman/listinfo/ome-devel

Dr Sébastien Besson
Open Microscopy Environment / Harvard Medical School
Wellcome Trust Centre for Gene Regulation and Expression,
College of Life Sciences, University of Dundee, Dow Street,
Dundee DD1 5EH Scotland UK   Tel: (01382) 386364


The University of Dundee is a registered Scottish Charity, No: SC015096
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openmicroscopy.org.uk/pipermail/ome-devel/attachments/20130723/daf59488/attachment.html>


More information about the ome-devel mailing list