From e861fb1f406567e80ada0c5af371a7003b7d7858 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Thu, 14 Dec 2023 14:37:55 -0500 Subject: [PATCH 1/3] Disable scheduled CI tasks GitHub disables the workflow completely if you don't have any code changes for 60 days. Unfortunately they don't only disable the scheduled trigger, but _all_ triggers, so CI wasn't running on PRs either. Since this repo is mostly dormant, I'm turning off the schedule to prevent this happening in the future. --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cecc29ab..95366b7f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,8 +4,6 @@ on: push: branches: - master - schedule: - - cron: "0 0 * * *" jobs: lint: From c474434d72e5dd6651e1cdc96d1045e62edd0469 Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Thu, 14 Dec 2023 14:48:58 -0500 Subject: [PATCH 2/3] Add allauth middleware --- miqa/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/miqa/settings.py b/miqa/settings.py index 98e30643..8fa24ad4 100644 --- a/miqa/settings.py +++ b/miqa/settings.py @@ -98,6 +98,10 @@ def before_binding(configuration: ComposedConfiguration) -> None: 'EXCEPTION_HANDLER' ] = 'miqa.core.rest.exceptions.custom_exception_handler' + configuration.MIDDLEWARE += [ + 'allauth.account.middleware.AccountMiddleware', + ] + class DevelopmentConfiguration(MiqaMixin, DevelopmentBaseConfiguration): HOMEPAGE_REDIRECT_URL = values.Value(environ=True, default='http://localhost:8081') From 8f4694bf11af4153ed36f7885604d22837d058cf Mon Sep 17 00:00:00 2001 From: Zach Mullen Date: Thu, 14 Dec 2023 18:10:32 -0500 Subject: [PATCH 3/3] Fix type errors --- miqa/core/models/frame.py | 2 +- miqa/core/tasks.py | 2 +- miqa/learning/evaluation_models.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/miqa/core/models/frame.py b/miqa/core/models/frame.py index dc97ffdc..07aff68e 100644 --- a/miqa/core/models/frame.py +++ b/miqa/core/models/frame.py @@ -11,7 +11,7 @@ from django.db.models.signals import pre_delete from django.dispatch import receiver from django_extensions.db.models import TimeStampedModel -from s3_file_field import S3FileField +from s3_file_field.fields import S3FileField from miqa.core.conversion.nifti_to_zarr_ngff import convert_to_store_path diff --git a/miqa/core/tasks.py b/miqa/core/tasks.py index a1acca0d..7257ba6f 100644 --- a/miqa/core/tasks.py +++ b/miqa/core/tasks.py @@ -51,7 +51,7 @@ def _download_from_s3(path: str, public: bool) -> bytes: @shared_task def reset_demo(): - Project.objects.delete() + Project.objects.all().delete() demo_project = Project( name='Demo Project', diff --git a/miqa/learning/evaluation_models.py b/miqa/learning/evaluation_models.py index 632762fa..93284da9 100644 --- a/miqa/learning/evaluation_models.py +++ b/miqa/learning/evaluation_models.py @@ -1,4 +1,4 @@ -from abc import ABC, abstractclassmethod +from abc import ABC, abstractmethod from pathlib import Path from typing import List @@ -13,7 +13,7 @@ def __init__(self, uri: URI, expected_outputs: List[str]): self.expected_outputs = expected_outputs super().__init__() - @abstractclassmethod + @abstractmethod def load(self): pass