Skip to content

Commit

Permalink
Merge pull request #858 from UW-GAC/main
Browse files Browse the repository at this point in the history
Deploy to stage
  • Loading branch information
amstilp authored Dec 3, 2024
2 parents 8d1889b + faa2d2f commit 4986d95
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
7 changes: 1 addition & 6 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@
"cdsa:records:user_access",
"dbgap:records:index",
"dbgap:records:applications",
"favicon",
]

# django-dbbackup
Expand Down Expand Up @@ -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 = "[email protected]"

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")
Expand Down
7 changes: 7 additions & 0 deletions config/urls.py
Original file line number Diff line number Diff line change
@@ -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"),
Expand All @@ -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)


Expand Down
4 changes: 2 additions & 2 deletions primed/drupal_oauth_provider/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def get_mocked_response(self):
"name": "testmaster",
"email": "[email protected]",
"email_verified": "True",
"sub": 20122
"sub": "20122"
}""",
),
]
Expand Down Expand Up @@ -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",
}
)

Expand Down
3 changes: 3 additions & 0 deletions primed/primed_anvil/adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "[email protected]"

def get_autocomplete_queryset(self, queryset, q):
"""Filter to Accounts where the email or the associated user name matches the query `q`."""
Expand Down
7 changes: 7 additions & 0 deletions primed/templates/admin/base_site.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{% extends "admin/base_site.html" %}
{% load static %}
{% block extrahead %}

<link rel="shortcut icon" href="{% static 'images/favicons/primed-favicon.png' %}">

{% endblock %}
4 changes: 2 additions & 2 deletions requirements/dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion requirements/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions requirements/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion requirements/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4986d95

Please sign in to comment.