Skip to content

Commit

Permalink
merge v0.14.1 release
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Dec 12, 2023
2 parents 455c32c + dcff044 commit 2bc6093
Show file tree
Hide file tree
Showing 57 changed files with 2,314 additions and 1,421 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
ports:
- 6379:6379
irods:
# TODO: Update image to 4.3 once its made default
image: ghcr.io/bihealth/irods-docker:4.2.11-1
env:
IRODS_AUTHENTICATION_SCHEME: native
Expand Down
61 changes: 61 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,67 @@ Changelog for the SODAR project. Loosely follows the
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.


v0.14.1 (2023-12-12)
====================

Added
-----

- **Irodsbackend**
- ``get_version()`` helper (#1592, #1817, #1831)
- ``get_access_lookup()`` helper (#1832)
- **Irodsinfo**
- iRODS v4.3 auth scheme support in client environment (#1834)
- **Samplesheets**
- Custom validation for ``sheet_sync_url`` and ``sheet_sync_token`` (#1310, #1384)
- ``hpo.jax.org`` in ``SHEETS_ONTOLOGY_URL_SKIP`` (#1821)
- Missing Django settings in siteinfo (#1830)
- **Taskflowbackend**
- iRODS v4.3 support (#1592, #1817, #1832)
- ``BatchCalculateChecksumTask`` exception logging (#1843)

Changed
-------

- **General**
- Upgrade to Django v3.2.23 (#1811)
- Upgrade to django-sodar-core v0.13.3 (#1810)
- **Irodsbackend**
- iRODS collection modal copy button icon (#1851)
- **Landingzones**
- Disable locked zone controls in template for non-superusers (#1808)
- Rename and refactor ``disable_zone_ui()`` template tag (#1808)
- **Samplesheets**
- Upgrade Vue app dependencies (#1811)
- Change default IGV genome to ``b37_1kg`` (#1812)
- Update existing ``b37`` IGV genome settings with a migration (#1812)
- **Taskflowbackend**
- Improve ``landing_zone_move`` zone status info messages for validation (#1840)

Fixed
-----

- **General**
- Add workaround for ``AUTH_LDAP_CONNECTION_OPTIONS`` duplication (#1853)
- **Irodsbackend**
- Opening redundant iRODS connection in server version retrieval (#1831)
- **Landingzones**
- No wait for async ``CurrentUserRetrieveAPIView`` call result (#1732, #1807)
- ``BaseLandingZoneStatusTask.set_status()`` failure with concurrent sheet replacing (#1839)
- **Samplesheets**
- ``ColumnToggleModal`` study checkbox states rendered under assay (#1848)
- ``ColumnToggleModal`` group toggle not updating checkboxes in UI (#1849)
- **Taskflowbackend**
- ``project_create`` timeline event user reference (bihealth/sodar_core#1301, #1819)
- Incorrect write access messages in ``landing_zone_move`` when validating only (#1845)

Removed
-------

- **Taskflowbackend**
- Duplicate ``SetAccessTask`` tests (#1833)


v0.14.0 (2023-09-27)
====================

Expand Down
15 changes: 10 additions & 5 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@
# Enable LDAP if configured
ENABLE_LDAP = env.bool('ENABLE_LDAP', False)
ENABLE_LDAP_SECONDARY = env.bool('ENABLE_LDAP_SECONDARY', False)

LDAP_DEBUG = env.bool('LDAP_DEBUG', False)
# Alternative domains for detecting LDAP access by email address
LDAP_ALT_DOMAINS = env.list('LDAP_ALT_DOMAINS', None, default=[])

Expand All @@ -356,13 +356,17 @@
import ldap
from django_auth_ldap.config import LDAPSearch

if LDAP_DEBUG:
ldap.set_option(ldap.OPT_DEBUG_LEVEL, 255)
# Default values
LDAP_DEFAULT_CONN_OPTIONS = {ldap.OPT_REFERRALS: 0}
LDAP_DEFAULT_ATTR_MAP = {
'first_name': 'givenName',
'last_name': 'sn',
'email': 'mail',
}
# Temporarily disable cert checking (see issue #1853)
ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER)

# Primary LDAP server
AUTH_LDAP_SERVER_URI = env.str('AUTH_LDAP_SERVER_URI', None)
Expand All @@ -371,7 +375,7 @@
AUTH_LDAP_START_TLS = env.str('AUTH_LDAP_START_TLS', False)
AUTH_LDAP_CA_CERT_FILE = env.str('AUTH_LDAP_CA_CERT_FILE', None)
AUTH_LDAP_CONNECTION_OPTIONS = {**LDAP_DEFAULT_CONN_OPTIONS}
if AUTH_LDAP_CA_CERT_FILE is not None:
if AUTH_LDAP_CA_CERT_FILE:
AUTH_LDAP_CONNECTION_OPTIONS[
ldap.OPT_X_TLS_CACERTFILE
] = AUTH_LDAP_CA_CERT_FILE
Expand Down Expand Up @@ -406,7 +410,7 @@
AUTH_LDAP2_START_TLS = env.str('AUTH_LDAP2_START_TLS', False)
AUTH_LDAP2_CA_CERT_FILE = env.str('AUTH_LDAP2_CA_CERT_FILE', None)
AUTH_LDAP2_CONNECTION_OPTIONS = {**LDAP_DEFAULT_CONN_OPTIONS}
if AUTH_LDAP2_CA_CERT_FILE is not None:
if AUTH_LDAP2_CA_CERT_FILE:
AUTH_LDAP2_CONNECTION_OPTIONS[
ldap.OPT_X_TLS_CACERTFILE
] = AUTH_LDAP2_CA_CERT_FILE
Expand Down Expand Up @@ -608,7 +612,7 @@ def set_logging(level=None):


# General API settings
SODAR_API_DEFAULT_VERSION = '0.14.0'
SODAR_API_DEFAULT_VERSION = '0.14.1'
SODAR_API_ALLOWED_VERSIONS = [
'0.7.0',
'0.7.1',
Expand All @@ -628,6 +632,7 @@ def set_logging(level=None):
'0.13.3',
'0.13.4',
'0.14.0',
'0.14.1',
]
SODAR_API_MEDIA_TYPE = 'application/vnd.bihealth.sodar+json'
SODAR_API_DEFAULT_HOST = env.url(
Expand Down Expand Up @@ -793,7 +798,7 @@ def set_logging(level=None):
)
# Skip URL template modification if substring found in accession
SHEETS_ONTOLOGY_URL_SKIP = env.list(
'SHEETS_ONTOLOGY_URL_SKIP', default=['bioontology.org']
'SHEETS_ONTOLOGY_URL_SKIP', default=['bioontology.org', 'hpo.jax.org']
)

# Labels and URL patterns for external link columns
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 4 additions & 2 deletions docs_manual/source/admin_ontologyaccess.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ Title
Optional title for the ontology, mostly for easy recognizing in the Ontology
Access UI.
Term URL
The URL for linking terms to their online specifications. This expects two
parameters, ``{id_space}`` and ``{local_id}}``.
The URL pattern for linking terms to their online specifications. This
expects two parameters, ``{id_space}`` and ``{local_id}}``. If the ontology
can be found in obolibrary, it is recommended to provide the pattern in the
form of ``http://purl.obolibrary.org/obo/{id_space}_{local_id}``.

.. figure:: _static/admin/ontologyaccess_form.png
:align: center
Expand Down
4 changes: 2 additions & 2 deletions docs_manual/source/api_examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ the SODAR API:
# Token authorization header (required)
auth_header = {'Authorization': 'token {}'.format(api_token)}
# Use core_headers for project management API endpoints
core_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar-core+json; version=0.13.2'}
core_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar-core+json; version=0.13.3'}
# Use sodar_headers for sample sheet and landing zone API endpoints
sodar_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar+json; version=0.14.0'}
sodar_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar+json; version=0.14.1'}
.. note::

Expand Down
2 changes: 1 addition & 1 deletion docs_manual/source/api_irodsinfo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ SODAR version:

.. code-block:: console
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
Accept: application/vnd.bihealth.sodar+json; version=0.14.1
2 changes: 1 addition & 1 deletion docs_manual/source/api_landingzones.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ SODAR version:

.. code-block:: console
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
Accept: application/vnd.bihealth.sodar+json; version=0.14.1
2 changes: 1 addition & 1 deletion docs_manual/source/api_projectroles.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ in the current SODAR version:

.. code-block:: console
Accept: application/vnd.bihealth.sodar-core+json; version=0.13.2
Accept: application/vnd.bihealth.sodar-core+json; version=0.13.3
2 changes: 1 addition & 1 deletion docs_manual/source/api_samplesheets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ SODAR version:

.. code-block:: console
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
Accept: application/vnd.bihealth.sodar+json; version=0.14.1
8 changes: 4 additions & 4 deletions docs_manual/source/app_samplesheets_browse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ displayed in the screenshot below.

Table header with column visibility toggle button highlighted

Clicking the button opens a modal in which you can hide or unhide columns by
clicking the accompanying check boxes. Columns can be toggled individually
or by an entire node. The node name columns, or protocol columns in the case of
unnamed processes, will always be displayed.
Clicking the button opens a modal in which you can hide or unhide columns using
the accompanying checkboxes. Columns can be toggled individually or for an
entire material or process. Name columns, or protocol columns in the case of
unnamed processes, will always be displayed and can't be hidden.

.. figure:: _static/app_samplesheets/column_toggle_modal.png
:align: center
Expand Down
9 changes: 6 additions & 3 deletions docs_manual/source/app_samplesheets_edit.rst
Original file line number Diff line number Diff line change
Expand Up @@ -379,9 +379,12 @@ variables. The modal content varies based on the column type, but all share a
few common elements:

- Configuration copy/paste elements in the top right corner
- The *Editable* checkbox for enabling or disabling editing for this column
- The *Cancel* and *Update* buttons for committing the configuration change or
cancelling it.
- The :guilabel:`Editable` checkbox for enabling or disabling editing for this
column. This is disabled by default. When disabled, users are only able to
enter data in mandatory fields such as material names or process protocols
when inserting new rows.
- The :guilabel:`Cancel` and :guilabel:`Update` buttons for committing the
configuration change or cancelling it.

Upon first importing or creating the sample sheets, the initial type and
configuration of a column is automatically determined by SODAR. The modal
Expand Down
2 changes: 1 addition & 1 deletion docs_manual/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = 'BIH Core Unit Bioinformatics'

# The full version, including alpha/beta/rc tags
release = '0.14.0'
release = '0.14.1'


# -- General configuration ---------------------------------------------------
Expand Down
32 changes: 32 additions & 0 deletions docs_manual/source/sodar_release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,38 @@ list of changes in current and previous releases, see the
:ref:`full changelog<sodar_changelog>`.


v0.14.1 (2023-12-12)
====================

Release for minor updates, maintenance and bug fixes.

- Add iRODS v4.3 support
- Add sheet sync setting validation
- Change default IGV genome to "b37_1kg"
- Fix landing zone locking controls for non-superusers
- Fix access to new HP ontology URLs
- Fix sheet column toggle modal UI issues
- Minor updates and bug fixes
- Upgrade to SODAR Core v0.13.3

Migration Guide
---------------

Default IGV Genome
The default IGV genome for cancer and germline projects has been changed
from "b37" to "b37_1kg", as the former is no longer supported by new
versions of IGV. Existing settings referring the now-unavailble genome will
be automatically updated. Users should be advised to upgrade their IGV
software to a recent version.
HPO Term Accession
The official API for the Human Phenotype Ontology has changed. It is
recommended to set the default URL pattern in the Ontology Access app to
``https://hpo.jax.org/app/browse/term/{id_space}:{local_id}``. Furthermore,
``hpo.jax.org`` should be included in ``SHEETS_ONTOLOGY_URL_SKIP`` as
bioontology.org-wrapped URLs to the new API do not work at the time of
writing.


v0.14.0 (2023-09-27)
====================

Expand Down
38 changes: 33 additions & 5 deletions irodsbackend/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import logging
import math
import os
import pytz
import random
import re
import string
import uuid

from contextlib import contextmanager

import pytz
from packaging import version

from irods.api_number import api_number
from irods.collection import iRODSCollection
Expand Down Expand Up @@ -490,9 +490,37 @@ def get_info(cls, irods):
'server_host': irods.host,
'server_port': irods.port,
'server_zone': irods.zone,
'server_version': '.'.join(
str(x) for x in irods.pool.get_connection().server_version
),
'server_version': cls.get_version(irods),
}

@classmethod
def get_version(cls, irods):
"""
Return the version of the iRODS server SODAR is connected to.
:param irods: iRODSSession object
:return: String
"""
return '.'.join(str(x) for x in irods.server_version)

@classmethod
def get_access_lookup(cls, irods):
"""
Return an ACL lookup dict compatible with the currently used iRODS
server version (4.2 and 4.3 supported).
:param irods: iRODSSession object
:return: Dict
"""
v = version.parse(cls.get_version(irods))
d = '_' if v >= version.parse('4.3') else ' '
return {
'read': 'read{}object'.format(d),
'read{}object'.format(d): 'read',
'write': 'modify{}object'.format(d),
'modify{}object'.format(d): 'write',
'null': 'null',
'own': 'own',
}

def get_object_stats(self, irods, path):
Expand Down
2 changes: 1 addition & 1 deletion irodsbackend/static/irodsbackend/js/irodsbackend.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ $(document).ready(function() {
'title="Copy iRODS path into clipboard" data-tooltip="tooltip" ' +
'data-placement="top" onclick="copyModalPath(\'' + obj['path'] +
'\', \'' + elemId + '\')">' +
'<i class="iconify" data-icon="mdi:clipboard-text-multiple"></i>' +
'<i class="iconify" data-icon="mdi:console-line"></i>' +
'</button>';
var iconHtml = '<i class="iconify mr-1" data-icon="' + icon + '"' +
' title="' + toolTip + '"></i>';
Expand Down
16 changes: 15 additions & 1 deletion irodsbackend/tests/test_api_taskflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,21 @@ def test_get_info(self):
self.assertEqual(info['server_host'], IRODS_HOST)
self.assertEqual(info['server_port'], IRODS_PORT)
self.assertEqual(info['server_zone'], IRODS_ZONE)
self.assertIsNotNone(info['server_version'])
self.assertEqual(
info['server_version'],
'.'.join(
str(x) for x in self.irods.pool.get_connection().server_version
),
)

def test_get_version(self):
"""Test get_irods_version()"""
self.assertEqual(
self.irods_backend.get_version(self.irods),
'.'.join(
str(x) for x in self.irods.pool.get_connection().server_version
),
)

def test_get_objects(self):
"""Test get_objects() with files in a sample collection"""
Expand Down
10 changes: 9 additions & 1 deletion irodsinfo/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import zipfile

from irods.exception import NetworkException, CAT_INVALID_AUTHENTICATION
from packaging import version

from django.conf import settings
from django.contrib import messages
Expand Down Expand Up @@ -43,7 +44,6 @@ def get_irods_client_env(user, irods_backend):
irods_env = dict(settings.IRODS_ENV_DEFAULT)
irods_env.update(
{
'irods_authentication_scheme': 'PAM',
'irods_cwd': home_path,
'irods_home': home_path,
'irods_host': settings.IRODS_HOST_FQDN,
Expand All @@ -56,6 +56,14 @@ def get_irods_client_env(user, irods_backend):
irods_env['irods_ssl_certificate_file'] = cert_file_name
# Get optional client environment overrides
irods_env.update(dict(settings.IRODS_ENV_CLIENT))
# Update authentication scheme with iRODS v4.3+ support
with irods_backend.get_session() as irods:
irods_version = irods_backend.get_version(irods)
if version.parse(irods_version) >= version.parse('4.3'):
auth_scheme = 'pam_password'
else:
auth_scheme = 'PAM'
irods_env['irods_authentication_scheme'] = auth_scheme
irods_env = irods_backend.format_env(irods_env)
logger.debug('iRODS environment: {}'.format(irods_env))
return irods_env
Expand Down
Loading

0 comments on commit 2bc6093

Please sign in to comment.