Skip to content
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

dealing with empty image.name returned by showinf in prepare (also updating dependencies) #91

Merged
merged 4 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .omeroci/py-setup
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ conda init
conda create -n omero python=3.9
conda activate omero
pip install https://github.com/glencoesoftware/zeroc-ice-py-linux-x86_64/releases/download/20231130/zeroc_ice-3.6.5-cp39-cp39-manylinux_2_28_x86_64.whl
conda install -c bioconda bftools
conda install -y -c bioconda bftools
pip install pytest restview mox3

cd $TARGET
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ def read(fname):
long_description_content_type="text/markdown",
url="https://github.com/TheJacksonLaboratory/omero-cli-transfer",
install_requires=[
'ezomero>=2.1.0, <3.0.0',
'ezomero>=3.0.0, <4.0.0',
'ome-types==0.5.1.post1'
],
extras_require={
"rocrate": ["rocrate==0.7.0"],
"rocrate": ["rocrate>=0.7.0, <1.0.0"],
},
python_requires='>=3.8',

Expand Down
8 changes: 6 additions & 2 deletions src/generate_xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,15 +613,19 @@ def parse_showinf(text, counter_imgs, counter_plates, counter_ann,
img_ref[image.id] = img_id_str
pix = create_empty_pixels(image, img_id)
if len(ome.images) > 1: # differentiating names
if image.name == "":
if not (image.name and not (image.name.isspace())):
image_name = "0"
else:
image_name = image.name
filename = Path(target).name
img = Image(id=img_id_str, name=filename + " [" + image_name + "]",
pixels=pix)
else:
img = Image(id=img_id_str, name=image.name, pixels=pix)
if not (image.name and not (image.name.isspace())):
image_name = os.path.split(target)[1]
else:
image_name = image.name
img = Image(id=img_id_str, name=image_name, pixels=pix)
img_id += 1
xml = create_path_xml(target)
ns = 'openmicroscopy.org/cli/transfer'
Expand Down