Skip to content

Tables new API#5481

Merged
jburel merged 16 commits intoome:developfrom
joshmoore:tables-legacy
Sep 25, 2017
Merged

Tables new API#5481
jburel merged 16 commits intoome:developfrom
joshmoore:tables-legacy

Conversation

@joshmoore
Copy link
Copy Markdown
Member

What this PR does

Deprecate usage of the old PyTables API

Table creation and manipulation tested with the following version of pytables:

  • 3.3.0 (Debian9)
  • 3.2.x (Ubuntu16.04, CentOS 7)
  • 3.1.x (ubuntu 14.04)

Testing this PR

check that the integration tests and training examples are green

Related reading

--depends-on #5409

@joshmoore joshmoore mentioned this pull request Aug 31, 2017
@joshmoore joshmoore changed the title Tables legacy Tables new API Aug 31, 2017
joshmoore and others added 4 commits August 31, 2017 14:23
In order to support old and new PyTables versions, this
allows for choosing during service creation the storage
provider. This is the first step in to allowing non-HDF
backends.
@dominikl
Copy link
Copy Markdown
Member

dominikl commented Aug 31, 2017

Will that also be available in the Java omero.grid.TablePrx ? Wanted to add some update methods to the gateway TablesFacility but couldn't find methods to add/delete rows/columns. incr and decr added with this PR seems to do that, right?

@joshmoore
Copy link
Copy Markdown
Member Author

Will that also be available in the Java omero.grid.TablePrx ?

@dominikl : no, these are only backend changes.

add/delete rows/columns. incr and decr added with this PR seems to do that, right?

The methods weren't really added, only refactored from elsewhere. Their function is to maintain a counter of how often the file itself was opened, as opposed to column management. In general, PyTables doesn't easily provide column addition/removal. It requires recreating the file.

@jburel jburel added the develop label Sep 1, 2017
@will-moore
Copy link
Copy Markdown
Member

@joshmoore
Copy link
Copy Markdown
Member Author

merge-integration is still running.

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 5, 2017

$ pip freeze | grep tables
tables==3.3.0

With Java integration tests on a Debian 9 system I am having some trouble with TableTest and TablesFacilityTest, though they passed fine on octopus. TestNG output is on squig in ome/team/mtbcarroll/PR-5481/index.html. Ping me if you'd like to log into the VM where this ran so you can check its config; I may have just screwed something simple up.

@joshmoore
Copy link
Copy Markdown
Member Author

joshmoore commented Sep 5, 2017

Thanks, @mtbc. Things I see:

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 5, 2017

Yes, if I upgrade to 3.4.2 then the TablesFacilityTest failure becomes another getWhereList one.

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 5, 2017

(It's a pity that even Debian unstable is on tables 3.3.0 but I need to fiddle versions of other things anyway because Debian 9's packaged django stuff is too new for web.)

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 6, 2017

what are the issues with Django? Probably worth a card

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 6, 2017

I don't know but have now created https://trello.com/c/GN2e5t9C/245-omeroweb-with-newer-django.

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 6, 2017

Comment added to card

@snoopycrimecop snoopycrimecop mentioned this pull request Sep 18, 2017
@jburel jburel added the exclude label Sep 18, 2017
@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 19, 2017

Taking a look at this, I've some confusion in that there are also omero::grid::Table methods getWhereList and readCoordinates in our API as listed at http://downloads.openmicroscopy.org/omero/5.4.0-m3/api/slice2html/omero/grid/Table.html and I doubt that I can rely on static checks to determine which kind of table is being called from where.

@jburel jburel removed the exclude label Sep 19, 2017
@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 19, 2017

I have removed the exclude label.
Conflict will need to be fixed so it can be included in the build

TablesI now retries to acquire access to the related repository.
omero.tables.RETRIES, by default 20, is used if not argument is
passed to the constructor. Tests have been updated to perform no
retries.

See: https://trello.com/c/wPBnTfPU/58-flaky-tests
@joshmoore
Copy link
Copy Markdown
Member Author

Cherry-picked the commit from gh-5512 since they were conflicting. I think this is ready for inclusion. (Though we may need to document non-working versions of PyTables. cc: @mtbc)

Usages of the two camel-cased methods were spread over hdfstoragev2
and columns. Splitting columns.py into 2 files as with the storage
is both less useful (since no extension point is needed) and more
disruptive since the file is already imported elsewhere. Instead,
the few uses of camel-case have been wrapped with a check for the
new version of PyTables and where necessary, the underscore version
is used.
@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

I added a comment while working on doc
see https://github.com/openmicroscopy/ome-documentation/pull/1739/files#diff-4f1690607b26288b56afc5164c52dce0
Do we want something else?

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 20, 2017

===============================================
OmeroJava.integration
Total tests run: 2391, Failures: 0, Skips: 0
===============================================

BUILD SUCCESSFUL
Total time: 66 minutes 46 seconds
mtbc@mtbc-pr-5481:~/openmicroscopy$ pip freeze | grep tables
tables==3.4.2
mtbc@mtbc-pr-5481:~/openmicroscopy$ git log -1
commit 09a2aad8468d3d7ddee152938c2ea356aa506267
Merge: 1537f5a708 bb8a484334
Author: Mark Carroll <M.T.B.Carroll@Dundee.ac.uk>
Date:   Wed Sep 20 09:27:32 2017 +0000

    Merge remote-tracking branch 'origin/pr/5481' into HEAD
mtbc@mtbc-pr-5481:~/openmicroscopy$ 

Earlier issue now fixed. 👍

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

Did you install tables from pypi?
Have you tried with the "default" version on debian 9 (3.3)
I reckon it should work too

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 20, 2017

I installed with pip install tables because I thought 3.3.0 would run into the TypeError at #5481 (comment) as at PyTables/PyTables#598 (comment).

@joshmoore
Copy link
Copy Markdown
Member Author

The TypeError: shape must be an integer or sequence: 4L issue is definitely PyTables-specific and not related to this PR.

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

in this the case we will have to indicate that 3.3 is not working in the doc.
summary is: it works on 3.1, 3.2, 3.4 but not 3.3. (default on Debian 9)

This will require also an ome-install PR so it can be reflected in the installation doc

@mtbc
Copy link
Copy Markdown
Member

mtbc commented Sep 20, 2017

Yes, to confirm,

mtbc@mtbc-pr-5481:~/openmicroscopy$ ./build.py -f components/tools/OmeroJava/build.xml test -DTEST=integration/gateway/TablesFacilityTest
...
                        TypeError: shape must be an integer or sequence: 4L
...
Exception in thread "TestNGInvoker-testAddTable()"
===============================================
Ant suite
Total tests run: 8, Failures: 1, Skips: 6
===============================================
mtbc@mtbc-pr-5481:~/openmicroscopy$ pip freeze | grep tables
tables==3.3.0
mtbc@mtbc-pr-5481:~/openmicroscopy$ dpkg --status python-tables | grep ^Version
Version: 3.3.0-5
mtbc@mtbc-pr-5481:~/openmicroscopy$ 

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

omero-install PR ome/omero-install#169

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

doc PR ome/omero-documentation#1771

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 20, 2017

i will check the tests tomorrow but it seems that it will be good to merge
I have opened two PR to fix the doc (installation and troubleshooting)

@jburel
Copy link
Copy Markdown
Member

jburel commented Sep 25, 2017

No table failure
merging

@jburel jburel merged commit a29c410 into ome:develop Sep 25, 2017
@sbesson sbesson added this to the 5.4.0 milestone Oct 6, 2017
joshmoore added a commit to joshmoore/openmicroscopy that referenced this pull request Dec 6, 2017
This adds on to 1264642 (omegh-5481)
but not just adding a wait to the .omero/repository lookup but as
well to the .omero/repository/*/repo_uuid lookup, so that the 20
REPEATS don't progress within 2-3 seconds but instead take long
enough for the integration server has time to configure itself
mtbc added a commit to mtbc/openmicroscopy that referenced this pull request Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants