From 53702694de0c53044f8014e95adfde5e6aead986 Mon Sep 17 00:00:00 2001 From: Birger Schacht Date: Wed, 4 Dec 2024 10:05:45 +0100 Subject: [PATCH] chore(sample_project): drop `apis_relation` from INSTALLED_APPS We only use the new style relations in the sample project, so we can drop the old ones. The `history` tests still depend on some parts of the `apis_relations` module, so we introduce a separate settings file for the tests that adds `apis_relations` to the `INSTALLED_APPS`. --- .github/workflows/django-tests.yml | 2 +- sample_project/settings.py | 1 - sample_project/settings_tests.py | 3 +++ 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 sample_project/settings_tests.py diff --git a/.github/workflows/django-tests.yml b/.github/workflows/django-tests.yml index 3babf0113..c6872f134 100644 --- a/.github/workflows/django-tests.yml +++ b/.github/workflows/django-tests.yml @@ -7,7 +7,7 @@ on: pull_request: env: - DJANGO_SETTINGS_MODULE: sample_project.settings + DJANGO_SETTINGS_MODULE: sample_project.settings_tests jobs: setup: diff --git a/sample_project/settings.py b/sample_project/settings.py index f40fb4976..b5c316620 100644 --- a/sample_project/settings.py +++ b/sample_project/settings.py @@ -44,7 +44,6 @@ # The APIS apps "apis_core.relations", "apis_core.apis_metainfo", - "apis_core.apis_relations", "apis_core.apis_entities", # apis_vocabularies is deprecated, but there are # still migrations depending on it - it will be dropped diff --git a/sample_project/settings_tests.py b/sample_project/settings_tests.py new file mode 100644 index 000000000..606f4b206 --- /dev/null +++ b/sample_project/settings_tests.py @@ -0,0 +1,3 @@ +from .settings import * + +INSTALLED_APPS += ["apis_core.apis_relations"] # noqa: F405