ome / omero-py

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

Bug: `obj update` strips newlines #279

Closed joshmoore closed 3 years ago

joshmoore commented 3 years ago

The regex used for capturing the string after the = symbol currently stops at the first newline. This passes re flags to allow capturing the multiline.

More tests are needed.

see: https://forum.image.sc/t/line-breaks-in-descriptions-via-cli/49236/4

imagesc-bot commented 3 years ago

This pull request has been mentioned on Image.sc Forum. There might be relevant details there:

https://forum.image.sc/t/line-breaks-in-descriptions-via-cli/49236/6

sbesson commented 3 years ago

Tested the two commands suggested in https://github.com/ome/openmicroscopy/pull/6265 against a CI server with this fix included. Everything works as expected and multi-line descriptions render as multi-line.

The omero obj update Dataset:123 description=$'A\nB' syntax is not very intuitive so I don't know whether this should be captured in the help or whether the expectation is simply that someone trying to update a field with the CLI will naturally use the second form.

Otherwise LGTM

joshmoore commented 3 years ago

Yeah, it'll be dependent on someone's shell, etc etc.

will-moore commented 3 years ago

Tested locally. 👍