-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support to tables #58
Conversation
ezomero/_gets.py
Outdated
ann = conn.getObject('FileAnnotation', file_ann_id) | ||
orig_table_file = conn.getObject('OriginalFile', ann.getFile().id) | ||
resources = conn.c.sf.sharedResources() | ||
table_obj = resources.openTable(orig_table_file._obj) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to catch whether someone gives a file ID that is not a table?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should - good catch. I'll try and figure out how to do that.
ezomero/_posts.py
Outdated
@@ -237,7 +246,7 @@ def post_map_annotation(conn, object_type, object_id, kv_dict, ns, | |||
>>> post_map_annotation(conn, "Image", 56, d, ns) | |||
234 | |||
""" | |||
|
|||
print("group at begin", conn.getGroupFromContext().getId()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the significance of this line, and 276?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was me trying to debug the across-groups issue and forgetting to remove prints :)
|
||
Notes | ||
------- | ||
Currently not working with `across_groups` - the `OriginalFile` seems to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this worth a question to the OME team before merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's worth pushing it as is and opening a new issue for that problem - we can reach out to them when working that issue. The vast majority of people are not trying to post tables across groups.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(in fact I had already created issue #59 lol)
Description
Adds
post_table
andget_table
, at least partially covering #16. An optionalpandas
dependency is added via the installation optionezomero[tables]
- if that is available, posting a table from a pandas DataFrame and returning a table to a pandas DataFrame are enabled; otherwise, tables are posted/returned as simple lists of row-lists.Checklist
Docstrings, unit tests and flake8 pass done.
For reviewers
later.
__init__.py
.