[ome-devel] Python API - Server version check

Luca Lianas luca.lianas at crs4.it
Tue Jul 23 16:31:22 BST 2013


Hi Sebastien


2013/7/23 Sebastien Besson <s.besson at dundee.ac.uk>

>  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.
>

A tight coupling is exactly what we need, we have several servers running
different models (and one still running ice 3.3) so a strong check is the
only thing that we can use to prevent unexpected runtime errors. I already
added this new check in OMERO.biobank (develop branch on Github) and I
created a tool that automatically updates the server configuration in order
to add the biobank TAG (I also updated the server installation guide on
Github's WIKI).

Cheers

Luca


>  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>
>
>> 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
>   <check_ome_version.py>_______________________________________________
>
> ome-devel mailing list
> 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
>



-- 
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/20130723/58efcd41/attachment-0001.html>


More information about the ome-devel mailing list