<jupyter_start><jupyter_text>Notebook for uploading a data set with description into an OMERO server<jupyter_code>import os
import sys
import getpass
from pyomero_upload.pyomero_upload import PyOmeroUploader
# configure connection settings
server = 'demo.openmicroscopy.org'
user = 'USER'
password = getpass.getpass()
uploader = PyOmeroUploader(user, password, server)
# defining data to upload
data_path = '/home/jovyan/work/test_data'
dataset_name = 'Upload from Jupyter'
# data upload with hybercubes
# The 'True' argument instructs the uploader to process and deposit image files as hypercubes
dId = uploader.launch_upload(dataset_name, data_path, True)
print(dId)
# searching for the upload

# should be 
searcher = uploader.searcher()
import omero_data_transfer.omero_data_broker as data_broker
from omero import sys as om_sys
from omero import rtypes

#query = "select d from Dataset d where d.name = :dname"
query = "select d from Dataset d where d.id = :did"

params = om_sys.Parameters()
params.map = {'dname' : rtypes.rstring(dataset_name)}
params.map = {'did' : rtypes.rlong(dId)}

datasets = searcher.find_objects_by_query(query, params)
dataset = datasets[0]
#dataset = datasets
print(dataset.name.val)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.08828250401284109, 'fraction_numerical': 0.0008025682182985554, 'mean_word_length': 6.1257142857142854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '191812', 'license': 'MIT', 'n_tokens_mistral': 416, 'n_tokens_neox': 416, 'n_words': 123, 'path': 'notebooks/omero_upload.ipynb', 'repo_name': 'SynthSys/omero_connect_demo', 'size': '1246'}