ome / omero-blitz

Gradle project containing Ice remoting code for OMERO
https://www.openmicroscopy.org/omero
GNU General Public License v2.0
0 stars 15 forks source link

import targets: add support for Project #61

Closed joshmoore closed 5 years ago

joshmoore commented 5 years ago

A command like:

bin/omero import -T Project:name:bar/Dataset:name:foo /tmp/a.fake

now loads a sub-target of type Dataset internally. The output from such an import looks like:

INFO          ome.formats.importer.ImportConfig - Using import target: Project:name:bar/Dataset:name:foo
INFO   rmats.importer.targets.ModelImportTarget - Creating sub-target: Dataset:name:foo
INFO   rmats.importer.targets.ModelImportTarget - Super-target loaded: Project:303
INFO   rmats.importer.targets.ModelImportTarget - Linked targets
INFO         ome.formats.importer.ImportLibrary - Import target specifies container: Dataset:855

see: https://forum.image.sc/t/cli-import-specifiy-project-to-place-dataset/27037/3

joshmoore commented 5 years ago

Opening for discussion. Requires tests & docs.

mtbc commented 5 years ago

Code looks fine as an initial step and some smoketesting went fine too. :+1:

sbesson commented 5 years ago

Capturing here an interesting behavior that I realized following a copy-n-paste in IDR dataset import. The following workflow:

$  bin/omero import -T Project:name:foo/Dataset:name:bar test.fake 
$  bin/omero import -T Project:name:foo2/Dataset:name:bar test.fake 
$  bin/omero import -T Project:name:foo/Dataset:name:bar2 test.fake 

leads to the bar datasets being multi-linked in projects foo and foo2 and containing 2 images:

Screen Shot 2019-08-08 at 17 08 48

On second thought, I completely understand how my workflow led to this layout. I am mentioning it here as my initial naive user expectation was that the default target behavior would be applied to the combination of the project and the dataset rather than each container individually. This might be something worth mentioning when the docs get amended to document this feature. When we document this feature as part of the import targets