diff --git a/.github/workflows/omero_plugin.yml b/.github/workflows/omero_plugin.yml index c14163c5..62f0fb7b 100644 --- a/.github/workflows/omero_plugin.yml +++ b/.github/workflows/omero_plugin.yml @@ -23,7 +23,7 @@ jobs: env: STAGE: app steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Checkout omero-test-infra uses: actions/checkout@master with: diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml index 81eccda3..a735b04e 100644 --- a/.github/workflows/publish_pypi.yml +++ b/.github/workflows/publish_pypi.yml @@ -7,14 +7,16 @@ jobs: name: Build and publish Python distribution to PyPI runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: '3.10' - name: Build a binary wheel and a source tarball run: | - python -mpip install wheel - python setup.py sdist bdist_wheel + python -mpip install build + python -m build - name: Publish distribution to PyPI if: startsWith(github.ref, 'refs/tags') - uses: pypa/gh-action-pypi-publish@v1.3.0 + uses: pypa/gh-action-pypi-publish@v1.8.14 with: password: ${{ secrets.PYPI_PASSWORD }} diff --git a/.omeroci/app-deps b/.omeroci/app-deps index 821fde45..b97a4499 100755 --- a/.omeroci/app-deps +++ b/.omeroci/app-deps @@ -3,5 +3,5 @@ set -e set -u yum -y install epel-release -curl --silent --location https://rpm.nodesource.com/setup_16.x | sudo bash - +curl --silent --location https://rpm.nodesource.com/setup_22.x | sudo bash - yum -y install nodejs diff --git a/omero_parade/annotation_filters/omero_filters.py b/omero_parade/annotation_filters/omero_filters.py index 99cea0da..73eb6387 100644 --- a/omero_parade/annotation_filters/omero_filters.py +++ b/omero_parade/annotation_filters/omero_filters.py @@ -60,8 +60,8 @@ def get_script(request, script_name, conn): and ch.ns='openmicroscopy.org/omero/insight/rating'""" % dtype links = query_service.findAllByQuery(query, params, conn.SERVICE_OPTS) ratings = {} - for l in links: - ratings[l.parent.id.val] = l.child.longValue.val + for link in links: + ratings[link.parent.id.val] = link.child.longValue.val # Return a JS function that will be passed an object # e.g. {'type': 'Image', 'id': 1} @@ -91,11 +91,11 @@ def get_script(request, script_name, conn): where pa.id in (:ids) and ch.class=CommentAnnotation""" % dtype links = query_service.findAllByQuery(query, params, conn.SERVICE_OPTS) comments = {} - for l in links: - iid = l.parent.id.val + for link in links: + iid = link.parent.id.val if iid not in comments: comments[iid] = "" - comments[iid] = " ".join([comments[iid], l.child.textValue.val]) + comments[iid] = " ".join([comments[iid], link.child.textValue.val]) # Return a JS function that will be passed a data object # e.g. {'type': 'Image', 'id': 1} @@ -127,9 +127,9 @@ def get_script(request, script_name, conn): links = query_service.findAllByQuery(query, params, conn.SERVICE_OPTS) tags = {} all_tags = [] - for l in links: - iid = l.parent.id.val - text = l.child.textValue.val + for link in links: + iid = link.parent.id.val + text = link.child.textValue.val all_tags.append(text) if iid not in tags: tags[iid] = [] @@ -170,9 +170,9 @@ def get_script(request, script_name, conn): links = query_service.findAllByQuery(query, params, conn.SERVICE_OPTS) # Dict of {'key': {iid: 'value', iid: 'value'}} map_values = defaultdict(dict) - for l in links: - iid = l.parent.id.val - for kv in l.child.getMapValue(): + for link in links: + iid = link.parent.id.val + for kv in link.child.getMapValue(): map_values[kv.name][iid] = kv.value key_placeholder = "Pick key..." diff --git a/omero_parade/csv_filters/omero_filters.py b/omero_parade/csv_filters/omero_filters.py index 006a7d2c..4e260c1b 100644 --- a/omero_parade/csv_filters/omero_filters.py +++ b/omero_parade/csv_filters/omero_filters.py @@ -38,7 +38,7 @@ def name_to_word(name): This allows us to use the filter name in URL to load filter script """ w = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890.' - return "".join([l if l in w else '_' for l in name]) + return "".join([link if link in w else '_' for link in name]) def get_filters(request, conn): diff --git a/omero_parade/data_providers.py b/omero_parade/data_providers.py index 899d5f35..7a40aa95 100644 --- a/omero_parade/data_providers.py +++ b/omero_parade/data_providers.py @@ -101,8 +101,8 @@ def get_image_map_annotations(conn, plate_id, field_id, ns, key=None): if key is None: return links map_values = {} - for l in links: - for kv in l.child.getMapValue(): + for link in links: + for kv in link.child.getMapValue(): if key == kv.name: - map_values[l.parent.id.val] = int(kv.value) + map_values[link.parent.id.val] = int(kv.value) return map_values