Skip to content

Commit

Permalink
prepare v0.14.0 release (#1638)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkonie committed Sep 27, 2023
1 parent 78bbfd0 commit 398111c
Show file tree
Hide file tree
Showing 22 changed files with 76 additions and 80 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ Changelog for the SODAR project. Loosely follows the
`Keep a Changelog <http://keepachangelog.com/en/1.0.0/>`_ guidelines.


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

Added
-----

- **General**
- Release cleanup issue template (#1797)
- LDAP settings for TLS and user filter (#1803)
- **Irodsbackend**
- ``get_trash_path()`` helper (#1658)
- iRODS trash statistics for siteinfo (#1658)
Expand Down
3 changes: 2 additions & 1 deletion config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ def set_logging(level=None):


# General API settings
SODAR_API_DEFAULT_VERSION = '0.13.4'
SODAR_API_DEFAULT_VERSION = '0.14.0'
SODAR_API_ALLOWED_VERSIONS = [
'0.7.0',
'0.7.1',
Expand All @@ -627,6 +627,7 @@ def set_logging(level=None):
'0.13.2',
'0.13.3',
'0.13.4',
'0.14.0',
]
SODAR_API_MEDIA_TYPE = 'application/vnd.bihealth.sodar+json'
SODAR_API_DEFAULT_HOST = env.url(
Expand Down
2 changes: 1 addition & 1 deletion docs_manual/source/api_documentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ expected version.

.. code-block:: console
Accept: application/vnd.bihealth.sodar+json; version=0.13.3
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
Specific sections of the SODAR API may require their own accept header. See the
exact header requirement in the respective documentation on each section of the
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.0'}
core_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar-core+json; version=0.13.2'}
# Use sodar_headers for sample sheet and landing zone API endpoints
sodar_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar+json; version=0.13.4'}
sodar_headers = {**auth_header, 'Accept': 'application/vnd.bihealth.sodar+json; version=0.14.0'}
.. note::

Expand Down
6 changes: 3 additions & 3 deletions docs_manual/source/api_irodsinfo.rst
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.. _api_irodsinfo:

Irods Info API
^^^^^^^^^^^^^^^^^
^^^^^^^^^^^^^^

The REST API for irods info operations is described in this document.
The REST API for the iRODS Info app is described in this document.


API Views
Expand All @@ -22,4 +22,4 @@ SODAR version:

.. code-block:: console
Accept: application/vnd.bihealth.sodar+json; version=0.13.4
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
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.13.4
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
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.0
Accept: application/vnd.bihealth.sodar-core+json; version=0.13.2
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.13.4
Accept: application/vnd.bihealth.sodar+json; version=0.14.0
24 changes: 14 additions & 10 deletions docs_manual/source/app_samplesheets_irods_delete.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,22 @@ requests in the project as a project owner or delegate, open the

iRODS delete request list

The list provides a button for copying the iRODS path into the clipboard, status
information for the requests, WebDAV link as well as dropdowns allowing you to
either update or delete your requests. On the top of the page you can see a
*Request Operations* dropdown with *Create Request* link for manual creation of
delete requests.
The list displays the label and status for existing requests. Buttons for
copying the iRODS path into clipboard and opening the data object or collection
in WebDAV are provided for each request. The request dropdown contains
operations for updating, deleting, accepting and/or rejecting requests depending
on your role in the project. The :guilabel:`Request Operations` dropdown on the
top of the view contains options for manually creating a new requests as well
as accepting and rejecting requests multiple requests at once.


Manual Request Creation
=======================

Clicking the :guilabel:`Create Request` button takes you to a simple form where
you can create a delete request by manually entering an iRODS path and an
optional description.
Selecting the :guilabel:`Create Request` option in the
:guilabel:`Request Operations` dropdown takes you to a form in which you can
create a delete request by manually entering an iRODS path. An optional
description can also be provided.

.. figure:: _static/app_samplesheets/irods_del_form.png
:align: center
Expand Down Expand Up @@ -112,6 +115,7 @@ the request list. Once you have selected the requests, click the
:guilabel:`Request Operations` dropdown and select either
:guilabel:`Accept Selected` or :guilabel:`Reject Selected`.

.. warning::
.. note::

The requests for entire collections must be accepted or rejected individually.
Batch accepting or rejeting requests for entire collections is disabled.
They must be accepted or rejected individually from the request dropdown.
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-WIP'
release = '0.14.0'


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


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

Major feature update.

Expand Down
8 changes: 4 additions & 4 deletions docs_manual/source/ui_project_members.rst
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ inherited roles is not allowed. Inherited roles are marked in the member list
with a downwards arrow along with a link to the category from which the role is
inherited.

Each project must have exactly one "local" (or non-inherited) owner. The amount
of allowed delegates is set by the server administrators. The number of
inherited owners and delegates are not limited. For contributors and guests, the
amount per project or category is not limited.
Each project must have exactly one "local" (non-inherited) owner. The amount of
allowed delegates is set by the server administrators. The number of inherited
owners and delegates are not limited. For contributors and guests, the amount
per project or category is not limited.

.. figure:: _static/sodar_ui/project_members_inherit.png
:align: center
Expand Down
50 changes: 23 additions & 27 deletions irodsadmin/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,7 @@ def test_get_orphans_none(self):
)
output = out.getvalue()
sys.stdout = sys.__stdout__

self.assertEqual('', output)
self.assertEqual(output, '')

def test_get_orphans_assay(self):
"""Test get_orphans() with orphan assay"""
Expand All @@ -249,7 +248,7 @@ def test_get_orphans_assay(self):
+ orphan_path
+ ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_get_orphans_study(self):
"""Test get_orphans() with orphan study"""
Expand All @@ -275,7 +274,7 @@ def test_get_orphans_study(self):
+ orphan_path
+ ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_get_output_zone(self):
"""Test get_orphans() with orphan landing zone"""
Expand Down Expand Up @@ -306,7 +305,7 @@ def test_get_output_zone(self):
+ orphan_path
+ ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_get_output_project(self):
"""Test get_orphans() with orphan project"""
Expand All @@ -332,7 +331,7 @@ def test_get_output_project(self):
expected = (
collection[3:] + ';' + DELETED + ';' + orphan_path + ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_get_output_assay_subs(self):
"""Test get_orphans() with orphan assay subcollections"""
Expand Down Expand Up @@ -360,7 +359,7 @@ def test_get_output_assay_subs(self):
+ orphan_path
+ ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_get_output_deleted_project(self):
"""Test get_output() with a deleted project"""
Expand All @@ -387,7 +386,7 @@ def test_get_output_deleted_project(self):
expected = (
project_uuid + ';' + DELETED + ';' + orphan_path + ';0;0 bytes\n'
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_no_orphans(self):
"""Test command with no orphans"""
Expand All @@ -396,7 +395,7 @@ def test_command_no_orphans(self):
call_command('irodsorphans', stdout=out)
output = out.getvalue()
sys.stdout = sys.__stdout__
self.assertEqual('', output)
self.assertEqual(output, '')

def test_command_orphan_assay(self):
"""Test command with orphan assay"""
Expand All @@ -410,7 +409,7 @@ def test_command_orphan_assay(self):
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_orphan_study(self):
"""Test command with orphan study"""
Expand All @@ -424,7 +423,7 @@ def test_command_orphan_study(self):
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_orphan_zone(self):
"""Test command with orphan landing zone"""
Expand All @@ -442,7 +441,7 @@ def test_command_orphan_zone(self):
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_orphan_project(self):
"""Test command with orphan project"""
Expand All @@ -459,7 +458,7 @@ def test_command_orphan_project(self):
expected = '{};{};{};0;0 bytes\n'.format(
project_uuid, DELETED, orphan_path
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_orphan_assay_sub(self):
"""Test command with orphan assay subcollection"""
Expand All @@ -474,7 +473,7 @@ def test_command_orphan_assay_sub(self):
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_multiple(self):
"""Test command with multiple orphans"""
Expand All @@ -501,7 +500,7 @@ def test_command_multiple(self):
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
self.assertEqual(output, expected)

def test_command_ordering(self):
"""Test ordering of orphans in command output"""
Expand All @@ -510,25 +509,22 @@ def test_command_ordering(self):
)
self.irods.collections.create(orphan_path)

project1 = self.make_project('A_Project', PROJECT_TYPE_PROJECT, None)
self.make_assignment(project1, self.user, self.role_owner)
project2 = self.make_project('TestProject2', PROJECT_TYPE_PROJECT, None)
self.make_assignment(project2, self.user, self.role_owner)
orphan_path2 = '{}/sample_data/study_{}'.format(
self.irods_backend.get_path(project1), str(uuid.uuid4())
self.irods_backend.get_path(project2), str(uuid.uuid4())
)
self.irods.collections.create(orphan_path2)

# Run the orphans management command
output = self.catch_stdout()
# As the title of self.project is 'Test Project', it should be ordered
# after project1 with title 'A_Project'
expected = '{};{};{};0;0 bytes\n'.format(
str(project1.sodar_uuid),
project1.full_title,
orphan_path2,
)
expected += '{};{};{};0;0 bytes\n'.format(
str(self.project.sodar_uuid),
self.project.full_title,
orphan_path,
)
self.assertEqual(expected, output)
expected += '{};{};{};0;0 bytes\n'.format(
str(project2.sodar_uuid),
project2.full_title,
orphan_path2,
)
self.assertEqual(output, expected)
2 changes: 0 additions & 2 deletions irodsbackend/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ class IrodsbackendViewTestBase(TaskflowViewTestBase):
def setUp(self):
super().setUp()
self.req_factory = RequestFactory()
# self.irods_backend = get_backend_api('omics_irods')
# self.irods = self.irods_backend.get_session_obj()
# Init project with owner in taskflow
self.project, self.owner_as = self.make_project_taskflow(
'TestProject', PROJECT_TYPE_PROJECT, self.category, self.user
Expand Down
1 change: 0 additions & 1 deletion irodsinfo/views_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ def get(self, request, *args, **kwargs):
)
env = self.get_irods_client_env(request.user, irods_backend)
return Response({'irods_environment': env})

except Exception as ex:
logger.error('iRODS config retrieval failed: {}'.format(ex))
return Response(
Expand Down
14 changes: 5 additions & 9 deletions samplesheets/assayapps/cytof/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ class SampleSheetAssayPlugin(SampleSheetAssayPluginPoint):
#: Toggle displaying of row-based iRODS links in the assay table
display_row_links = True

def __get_mc_assay_name(self, row, table):
@classmethod
def _get_mc_assay_name(cls, row, table):
"""
Return assay name of last mass cytometry process.
Also works when there are consecutive processes of the same name.
Expand All @@ -66,8 +67,7 @@ def __get_mc_assay_name(self, row, table):
):
top_header = get_top_header(table, i)
span_end = i + top_header['colspan']

# consider only columns of mass cytometry process
# Consider only columns of mass cytometry process
if i < span_end and header['value'].lower() == 'assay name':
name = cell['value']
return name
Expand All @@ -85,7 +85,7 @@ def get_row_path(self, row, table, assay, assay_path):
:return: String with full iRODS path or None
"""
# Get the value of Mass cytometry Assay Name column
mc_assay_name = self.__get_mc_assay_name(row, table)
mc_assay_name = self._get_mc_assay_name(row, table)
if mc_assay_name:
return assay_path + '/' + mc_assay_name

Expand All @@ -100,14 +100,11 @@ def update_row(self, row, table, assay):
"""
if not settings.IRODS_WEBDAV_ENABLED or not assay:
return row

assay_path = self.get_assay_path(assay)
if not assay_path:
return row

# Get the value of Mass cytometry Assay Name column
mc_assay_name = self.__get_mc_assay_name(row, table)

mc_assay_name = self._get_mc_assay_name(row, table)
if not mc_assay_name:
return row

Expand Down Expand Up @@ -157,7 +154,6 @@ def update_row(self, row, table, assay):
row[i]['link'] = (
base_url + '/' + mc_assay_name + '/' + row[i]['value']
)

return row

def update_cache(self, name=None, project=None, user=None):
Expand Down
Loading

0 comments on commit 398111c

Please sign in to comment.