diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70a3b060..5e2bf190 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -140,6 +140,6 @@ jobs: python -m coverage report - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4.6.0 + uses: codecov/codecov-action@v5.0.7 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2c63c131..ba561d95 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.7.0 + rev: v0.8.1 hooks: # Run the linter. - id: ruff @@ -21,7 +21,7 @@ repos: - id: ruff-format - repo: https://github.com/gitleaks/gitleaks - rev: v8.21.1 + rev: v8.21.2 hooks: - id: gitleaks diff --git a/config/settings/base.py b/config/settings/base.py index 2f98275c..7c7410a4 100644 --- a/config/settings/base.py +++ b/config/settings/base.py @@ -310,6 +310,7 @@ "cdsa:records:user_access", "dbgap:records:index", "dbgap:records:applications", + "favicon", ] # django-dbbackup @@ -394,12 +395,6 @@ ANVIL_ACCOUNT_ADAPTER = "primed.primed_anvil.adapters.AccountAdapter" ANVIL_MANAGED_GROUP_ADAPTER = "primed.primed_anvil.adapters.ManagedGroupAdapter" -# Specify the URL name that AccountLink and AccountLinkVerify redirect to. -ANVIL_ACCOUNT_LINK_REDIRECT = "users:redirect" -# Specify the subject for AnVIL account verification emails. -ANVIL_ACCOUNT_LINK_EMAIL_SUBJECT = "Verify your AnVIL account email" -ANVIL_ACCOUNT_VERIFY_NOTIFICATION_EMAIL = "primedconsortium@uw.edu" - DRUPAL_API_CLIENT_ID = env("DRUPAL_API_CLIENT_ID", default="") DRUPAL_API_CLIENT_SECRET = env("DRUPAL_API_CLIENT_SECRET", default="") DRUPAL_API_REL_PATH = env("DRUPAL_API_REL_PATH", default="mockapi") diff --git a/config/urls.py b/config/urls.py index 9b091d3f..9d82035d 100644 --- a/config/urls.py +++ b/config/urls.py @@ -1,9 +1,11 @@ from django.conf import settings from django.conf.urls.static import static from django.contrib import admin +from django.templatetags.static import static as static_url_tag from django.urls import include, path from django.views import defaults as default_views from django.views.generic import TemplateView +from django.views.generic.base import RedirectView urlpatterns = [ path("", TemplateView.as_view(template_name="pages/home.html"), name="home"), @@ -26,6 +28,11 @@ "collaborative_analysis/", include("primed.collaborative_analysis.urls", namespace="collaborative_analysis"), ), + path( + "favicon.ico", + RedirectView.as_view(url=static_url_tag("images/favicons/primed-favicon.png"), permanent=True), + name="favicon", + ), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/primed/drupal_oauth_provider/tests.py b/primed/drupal_oauth_provider/tests.py index e59eb6f2..c827b551 100644 --- a/primed/drupal_oauth_provider/tests.py +++ b/primed/drupal_oauth_provider/tests.py @@ -130,7 +130,7 @@ def get_mocked_response(self): "name": "testmaster", "email": "test@testmaster.net", "email_verified": "True", - "sub": 20122 + "sub": "20122" }""", ), ] @@ -198,7 +198,7 @@ def get_id_token(self): "iat": self.setup_time, "aud": allowed_audience, "scope": ["authenticated", "oauth_client_user"], - "sub": 20122, + "sub": "20122", } ) diff --git a/primed/primed_anvil/adapters.py b/primed/primed_anvil/adapters.py index 2eba20a4..c821b5f9 100644 --- a/primed/primed_anvil/adapters.py +++ b/primed/primed_anvil/adapters.py @@ -18,6 +18,9 @@ class AccountAdapter(BaseAccountAdapter): list_table_class = AccountTable list_filterset_class = AccountListFilter + account_link_verify_redirect = "users:redirect" + account_link_email_subject = "Verify your AnVIL account email" + account_verify_notification_email = "foo@uw.edu" def get_autocomplete_queryset(self, queryset, q): """Filter to Accounts where the email or the associated user name matches the query `q`.""" diff --git a/primed/templates/admin/base_site.html b/primed/templates/admin/base_site.html new file mode 100644 index 00000000..21c0e91c --- /dev/null +++ b/primed/templates/admin/base_site.html @@ -0,0 +1,7 @@ +{% extends "admin/base_site.html" %} +{% load static %} +{% block extrahead %} + + + +{% endblock %} diff --git a/requirements/dev-requirements.txt b/requirements/dev-requirements.txt index b215dbc3..c159deb3 100644 --- a/requirements/dev-requirements.txt +++ b/requirements/dev-requirements.txt @@ -137,7 +137,7 @@ requests==2.32.3 # -c requirements/requirements.txt # -c requirements/test-requirements.txt # sphinx -ruff==0.7.2 +ruff==0.8.1 # via -r requirements/dev-requirements.in six==1.16.0 # via @@ -218,7 +218,7 @@ wcwidth==0.2.13 # via prompt-toolkit websockets==12.0 # via sphinx-autobuild -werkzeug==3.1.2 +werkzeug==3.1.3 # via -r requirements/dev-requirements.in # The following packages are considered to be unsafe in a requirements file: diff --git a/requirements/requirements.in b/requirements/requirements.in index 9e075aeb..6bd99a34 100644 --- a/requirements/requirements.in +++ b/requirements/requirements.in @@ -38,7 +38,7 @@ django-dbbackup # https://github.com/jazzband/django-dbbackup django-extensions # https://github.com/django-extensions/django-extensions # anvil_consortium_manager -django-anvil-consortium-manager @ git+https://github.com/UW-GAC/django-anvil-consortium-manager.git@v0.25 +django-anvil-consortium-manager @ git+https://github.com/UW-GAC/django-anvil-consortium-manager.git@v0.26.1 # Simple history - model history tracking django-simple-history diff --git a/requirements/requirements.txt b/requirements/requirements.txt index 666c79a8..038caac3 100644 --- a/requirements/requirements.txt +++ b/requirements/requirements.txt @@ -37,7 +37,7 @@ crispy-bootstrap5==2024.10 # via # -r requirements/requirements.in # django-anvil-consortium-manager -cryptography==43.0.3 +cryptography==44.0.0 # via -r requirements/requirements.in django==4.2.16 # via @@ -55,9 +55,9 @@ django==4.2.16 # django-picklefield # django-simple-history # django-tables2 -django-allauth==65.1.0 +django-allauth==65.3.0 # via -r requirements/requirements.in -django-anvil-consortium-manager @ git+https://github.com/UW-GAC/django-anvil-consortium-manager.git@v0.25 +django-anvil-consortium-manager @ git+https://github.com/UW-GAC/django-anvil-consortium-manager.git@v0.26.1 # via -r requirements/requirements.in django-autocomplete-light==3.11.0 # via django-anvil-consortium-manager @@ -110,7 +110,7 @@ jsonschema==4.23.0 # via -r requirements/requirements.in jsonschema-specifications==2023.12.1 # via jsonschema -mysqlclient==2.2.5 +mysqlclient==2.2.6 # via -r requirements/requirements.in networkx==3.1 # via @@ -144,7 +144,7 @@ pyasn1-modules==0.3.0 # via google-auth pycparser==2.21 # via cffi -pyjwt==2.9.0 +pyjwt==2.10.1 # via -r requirements/requirements.in pyparsing==3.1.1 # via packaging diff --git a/requirements/test-requirements.txt b/requirements/test-requirements.txt index 2cc02a15..f7c025fa 100644 --- a/requirements/test-requirements.txt +++ b/requirements/test-requirements.txt @@ -53,7 +53,7 @@ pyparsing==3.1.1 # via # -c requirements/requirements.txt # packaging -pytest==8.3.3 +pytest==8.3.4 # via # -r requirements/test-requirements.in # pytest-cov