Skip to content

Commit

Permalink
Merge branch 'dev' into 'main'
Browse files Browse the repository at this point in the history
merge v0.10.8 release

See merge request CUBI_Engineering/CUBI_Data_Mgmt/sodar_core!147
  • Loading branch information
mikkonie committed Feb 2, 2022
2 parents ac73972 + 17a0dc8 commit 1712fe7
Show file tree
Hide file tree
Showing 55 changed files with 1,521 additions and 738 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ jobs:
strategy:
matrix:
python-version:
- 3.7
- 3.8
- 3.9
- '3.8'
- '3.9'
- '3.10'
services:
postgres:
image: postgres:9.6
Expand Down Expand Up @@ -42,7 +42,7 @@ jobs:
uses: actions/checkout@v2
- name: Install project Python dependencies
run: |
pip install wheel==0.36.2
pip install wheel==0.37.1
pip install -r requirements/local.txt
pip install -r requirements/test.txt
- name: Download icons
Expand Down
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ before_script:
- python3 -m venv ./env
- source ./env/bin/activate
# - sh ./utility/install_python_dependencies.sh
- pip3 install wheel==0.36.2
- pip3 install wheel==0.37.1
- pip3 install -r ./requirements/local.txt
- pip3 install -r ./requirements/test.txt

Expand Down
56 changes: 56 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,62 @@ Changelog for the **SODAR Core** Django app package. Loosely follows the
Note that the issue IDs here refer to ones in the private CUBI GitLab.


v0.10.8 (2022-02-02)
====================

Added
-----

- **Projectroles**
- Disabling ``ManagementCommandLogger`` with ``LOGGING_DISABLE_CMD_OUTPUT`` (#894)
- **Siteinfo**
- Missing site settings in ``CORE_SETTINGS`` (#877)
- **Timeline**
- ``get_plugin_lookup()`` and ``get_app_icon_html()`` template tags (#888)
- Template tag tests (#891)

Changed
-------

- **General**
- Upgrade minimum Python version to v3.8, add v3.10 support (#885)
- Upgrade minimum Django version to v3.2.12 (#879, #902)
- Upgrade Python dependencies (#884, #893, #901)
- Upgrade to Chromedriver v97 (#905)
- **Projectroles**
- Display admin icon in user dropdown (#886)
- Refactor UI tests (#882)
- **Timeline**
- Improve event list layout responsivity (#887)
- Replace event list app column with app icon (#888)
- Set default kwarg values for model test helpers (#890)
- Move ``get_request()`` to ``TimelineAPIMixin``
- Display recent events regardless of status in details card (#899)
- Optimize ``get_details_events()`` (#899)

Fixed
-----

- **Projectroles**
- Parent owner set as owner in project create form for non-owner category members (#878)
- Project header icon tooltip alignment (#895)
- Redundant public access icon display for categories (#896)
- Icon size syntax (#875)
- Content of ``sodar-code-input`` partially hidden in Chrome (#904)
- **Siteinfo**
- Layout responsivity issues with long labels (#883)
- **Timeline**
- Redundant app plugin queries in event list (#889, #900)

Removed
-------

- **Projectroles**
- ``_add_remote_association()`` helper from UI tests (#882)
- **Timeline**
- Unused ``get_app_url()`` template tag (#888)


v0.10.7 (2021-12-14)
====================

Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ Before you submit a pull request, check that it meets these guidelines:
4. If the pull request adds functionality, the docs should be updated. Put
your new functionality into a function with a docstring, and add the
feature to the list in ``CHANGELOG.rst``.
5. The pull request should work for Python version 3.7, 3.8 and 3.9. Check
5. The pull request should work for Python version 3.8, 3.9 and 3.10. Check
https://github.com/bihealth/sodar-core/actions
and make sure that the tests pass for supported Python versions.
From v1.0 onwards SODAR Core no longer supports Python 3.6.
From v0.10.8 onwards SODAR Core no longer supports Python 3.7.

Deploying
=========
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ from PyPI as follows.

.. code-block:: console
pip install django-sodar-core==0.10.7
pip install django-sodar-core==0.10.8
For installing a development version you can point your dependency to a specific
commit ID in GitHub. Note that these versions may not be stable.
Expand Down
13 changes: 4 additions & 9 deletions adminalerts/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
from django.utils import timezone

from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By

# Projectroles dependency
from projectroles.tests.test_ui import TestUIBase

from .test_models import AdminAlertMixin
from adminalerts.tests.test_models import AdminAlertMixin


class TestAlertUIBase(AdminAlertMixin, TestUIBase):
Expand Down Expand Up @@ -38,7 +39,6 @@ def test_message(self):
"""Test visibility of alert message in home view"""
expected = [(self.superuser, 1), (self.regular_user, 1)]
url = reverse('home')

self.assert_element_count(
expected, url, 'sodar-alert-site-app', 'class'
)
Expand All @@ -50,7 +50,6 @@ def test_message_inactive(self):

expected = [(self.superuser, 0), (self.regular_user, 0)]
url = reverse('home')

self.assert_element_count(
expected, url, 'sodar-alert-site-app', 'class'
)
Expand All @@ -62,17 +61,15 @@ def test_message_expired(self):

expected = [(self.superuser, 0), (self.regular_user, 0)]
url = reverse('home')

self.assert_element_count(
expected, url, 'sodar-alert-site-app', 'class'
)

def test_message_login(self):
"""Test visibility of alert in login view with auth requirement"""
self.selenium.get(self.build_selenium_url(reverse('login')))

with self.assertRaises(NoSuchElementException):
self.selenium.find_element_by_class_name('sodar-alert-site-app')
self.selenium.find_element(By.CLASS_NAME, 'sodar-alert-site-app')

def test_message_login_no_auth(self):
"""Test visibility of alert in login view without auth requirement"""
Expand All @@ -81,7 +78,7 @@ def test_message_login_no_auth(self):

self.selenium.get(self.build_selenium_url(reverse('login')))
self.assertIsNotNone(
self.selenium.find_element_by_class_name('sodar-alert-site-app')
self.selenium.find_element(By.CLASS_NAME, 'sodar-alert-site-app')
)


Expand All @@ -92,12 +89,10 @@ def test_list_items(self):
"""Test existence of items in list"""
expected = [(self.superuser, 1)]
url = reverse('adminalerts:list')

self.assert_element_count(expected, url, 'sodar-aa-alert-item', 'id')

def test_list_buttons(self):
"""Test existence of buttons in list"""
expected = [(self.superuser, 1)]
url = reverse('adminalerts:list')

self.assert_element_count(expected, url, 'sodar-aa-alert-buttons', 'id')
78 changes: 39 additions & 39 deletions appalerts/tests/test_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ def test_alert_dismiss(self):
url = reverse('appalerts:list')
self.login_and_redirect(self.regular_user, url)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-count').text, '2'
self.selenium.find_element(By.ID, 'sodar-app-alert-count').text, '2'
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-legend').text,
self.selenium.find_element(By.ID, 'sodar-app-alert-legend').text,
'alerts',
)

button = self.selenium.find_elements_by_class_name(
'sodar-app-alert-btn-dismiss-single'
button = self.selenium.find_elements(
By.CLASS_NAME, 'sodar-app-alert-btn-dismiss-single'
)[0]
button.click()
WebDriverWait(self.selenium, self.wait_time).until(
Expand All @@ -80,16 +80,16 @@ def test_alert_dismiss(self):
)
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-count').text, '1'
self.selenium.find_element(By.ID, 'sodar-app-alert-count').text, '1'
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-legend').text,
self.selenium.find_element(By.ID, 'sodar-app-alert-legend').text,
'alert',
)
self.assertEqual(AppAlert.objects.filter(active=True).count(), 1)
self.assertFalse(
self.selenium.find_element_by_id(
'sodar-app-alert-empty'
self.selenium.find_element(
By.ID, 'sodar-app-alert-empty'
).is_displayed()
)

Expand All @@ -100,35 +100,35 @@ def test_alert_dismiss_all(self):
url = reverse('appalerts:list')
self.login_and_redirect(self.regular_user, url)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-count').text, '2'
self.selenium.find_element(By.ID, 'sodar-app-alert-count').text, '2'
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-legend').text,
self.selenium.find_element(By.ID, 'sodar-app-alert-legend').text,
'alerts',
)

self.selenium.find_element_by_id(
'sodar-app-alert-btn-dismiss-all'
self.selenium.find_element(
By.ID, 'sodar-app-alert-btn-dismiss-all'
).click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.invisibility_of_element_located(
(By.CLASS_NAME, 'sodar-app-alert-item')
)
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-count').text, ''
self.selenium.find_element(By.ID, 'sodar-app-alert-count').text, ''
)
self.assertEqual(
self.selenium.find_element_by_id('sodar-app-alert-legend').text,
self.selenium.find_element(By.ID, 'sodar-app-alert-legend').text,
'',
)
self.assertEqual(AppAlert.objects.filter(active=True).count(), 0)
WebDriverWait(self.selenium, self.wait_time).until(
ec.visibility_of_element_located((By.ID, 'sodar-app-alert-empty'))
)
self.assertTrue(
self.selenium.find_element_by_id(
'sodar-app-alert-empty'
self.selenium.find_element(
By.ID, 'sodar-app-alert-empty'
).is_displayed()
)

Expand All @@ -140,21 +140,21 @@ def test_alert_reload(self):
url = reverse('appalerts:list')
self.login_and_redirect(self.regular_user, url)
self.assertTrue(
self.selenium.find_element_by_id(
'sodar-app-alert-empty'
self.selenium.find_element(
By.ID, 'sodar-app-alert-empty'
).is_displayed()
)
with self.assertRaises(NoSuchElementException):
self.selenium.find_element_by_id('sodar-app-alert-reload')
self.selenium.find_element(By.ID, 'sodar-app-alert-reload')

self._make_app_alert(user=self.regular_user, url=reverse('home'))

WebDriverWait(self.selenium, self.wait_time).until(
ec.visibility_of_element_located((By.ID, 'sodar-app-alert-reload'))
)
self.assertTrue(
self.selenium.find_element_by_id(
'sodar-app-alert-reload'
self.selenium.find_element(
By.ID, 'sodar-app-alert-reload'
).is_displayed()
)

Expand All @@ -166,12 +166,12 @@ def test_render(self):
"""Test existence of alert badge for user with alerts"""
url = reverse('home')
self.login_and_redirect(self.regular_user, url)
alert_badge = self.selenium.find_element_by_id('sodar-app-alert-badge')
alert_badge = self.selenium.find_element(By.ID, 'sodar-app-alert-badge')
self.assertIsNotNone(alert_badge)
self.assertTrue(alert_badge.is_displayed())
alert_count = self.selenium.find_element_by_id('sodar-app-alert-count')
alert_legend = self.selenium.find_element_by_id(
'sodar-app-alert-legend'
alert_count = self.selenium.find_element(By.ID, 'sodar-app-alert-count')
alert_legend = self.selenium.find_element(
By.ID, 'sodar-app-alert-legend'
)
self.assertEqual(alert_count.text, '2')
self.assertEqual(alert_legend.text, 'alerts')
Expand All @@ -180,17 +180,17 @@ def test_render_no_alerts(self):
"""Test existence of alert badge for user without alerts"""
url = reverse('home')
self.login_and_redirect(self.no_alert_user, url)
alert_badge = self.selenium.find_element_by_id('sodar-app-alert-badge')
alert_badge = self.selenium.find_element(By.ID, 'sodar-app-alert-badge')
self.assertIsNotNone(alert_badge)
self.assertFalse(alert_badge.is_displayed())

def test_render_add(self):
"""Test adding an alert for user with alerts"""
url = reverse('home')
self.login_and_redirect(self.regular_user, url)
alert_count = self.selenium.find_element_by_id('sodar-app-alert-count')
alert_legend = self.selenium.find_element_by_id(
'sodar-app-alert-legend'
alert_count = self.selenium.find_element(By.ID, 'sodar-app-alert-count')
alert_legend = self.selenium.find_element(
By.ID, 'sodar-app-alert-legend'
)
self.assertEqual(alert_count.text, '2')
self.assertEqual(alert_legend.text, 'alerts')
Expand All @@ -208,9 +208,9 @@ def test_render_delete(self):
"""Test deleting an alert from user with alerts"""
url = reverse('home')
self.login_and_redirect(self.regular_user, url)
alert_count = self.selenium.find_element_by_id('sodar-app-alert-count')
alert_legend = self.selenium.find_element_by_id(
'sodar-app-alert-legend'
alert_count = self.selenium.find_element(By.ID, 'sodar-app-alert-count')
alert_legend = self.selenium.find_element(
By.ID, 'sodar-app-alert-legend'
)
self.assertEqual(alert_count.text, '2')
self.assertEqual(alert_legend.text, 'alerts')
Expand All @@ -228,7 +228,7 @@ def test_render_delete_all(self):
"""Test deleting all alerts from user with alerts"""
url = reverse('home')
self.login_and_redirect(self.regular_user, url)
alert_badge = self.selenium.find_element_by_id('sodar-app-alert-badge')
alert_badge = self.selenium.find_element(By.ID, 'sodar-app-alert-badge')
self.assertTrue(alert_badge.is_displayed())

self.alert.delete()
Expand All @@ -242,7 +242,7 @@ def test_render_add_no_alerts(self):
"""Test adding an alert for user without prior alerts"""
url = reverse('home')
self.login_and_redirect(self.no_alert_user, url)
alert_badge = self.selenium.find_element_by_id('sodar-app-alert-badge')
alert_badge = self.selenium.find_element(By.ID, 'sodar-app-alert-badge')
self.assertFalse(alert_badge.is_displayed())

self._make_app_alert(user=self.no_alert_user, url=reverse('home'))
Expand All @@ -251,9 +251,9 @@ def test_render_add_no_alerts(self):
)
self.assertTrue(alert_badge.is_displayed())

alert_count = self.selenium.find_element_by_id('sodar-app-alert-count')
alert_legend = self.selenium.find_element_by_id(
'sodar-app-alert-legend'
alert_count = self.selenium.find_element(By.ID, 'sodar-app-alert-count')
alert_legend = self.selenium.find_element(
By.ID, 'sodar-app-alert-legend'
)
self.assertEqual(alert_count.text, '1')
self.assertEqual(alert_legend.text, 'alert')
Expand All @@ -265,8 +265,8 @@ def test_alert_dismiss_all(self):
url = reverse('home')
self.login_and_redirect(self.regular_user, url)

self.selenium.find_element_by_id(
'sodar-app-alert-badge-btn-dismiss'
self.selenium.find_element(
By.ID, 'sodar-app-alert-badge-btn-dismiss'
).click()
WebDriverWait(self.selenium, self.wait_time).until(
ec.invisibility_of_element_located(
Expand Down
Loading

0 comments on commit 1712fe7

Please sign in to comment.