From a4161c440c4e2290cd9c60936d32f0ddf217beb8 Mon Sep 17 00:00:00 2001 From: Mark Hobson Date: Thu, 16 Jan 2025 10:49:41 +0000 Subject: [PATCH] GH-179: Add ATF5 funding programme --- schemes/domain/schemes/overview.py | 1 + schemes/infrastructure/database/schemes/overview.py | 1 + schemes/views/schemes/overview.py | 2 ++ schemes/views/schemes/schemes.py | 1 + tests/infrastructure/database/schemes/test_overview.py | 1 + tests/views/schemes/test_overview.py | 1 + tests/views/schemes/test_schemes.py | 1 + 7 files changed, 8 insertions(+) diff --git a/schemes/domain/schemes/overview.py b/schemes/domain/schemes/overview.py index 99ee5e8..6598efb 100644 --- a/schemes/domain/schemes/overview.py +++ b/schemes/domain/schemes/overview.py @@ -106,6 +106,7 @@ class FundingProgrammes: ATF3 = FundingProgramme("ATF3", False, True) ATF4 = FundingProgramme("ATF4", False, True) ATF4E = FundingProgramme("ATF4e", False, True) + ATF5 = FundingProgramme("ATF5", True, True) CRSTS = FundingProgramme("CRSTS", False, False) LUF1 = FundingProgramme("LUF1", False, False) LUF2 = FundingProgramme("LUF2", False, False) diff --git a/schemes/infrastructure/database/schemes/overview.py b/schemes/infrastructure/database/schemes/overview.py index 337d650..abdb3c0 100644 --- a/schemes/infrastructure/database/schemes/overview.py +++ b/schemes/infrastructure/database/schemes/overview.py @@ -26,6 +26,7 @@ class FundingProgrammeMapper: FundingProgrammes.LUF2: 7, FundingProgrammes.LUF3: 8, FundingProgrammes.MRN: 9, + FundingProgrammes.ATF5: 10, } def to_id(self, funding_programme: FundingProgramme) -> int: diff --git a/schemes/views/schemes/overview.py b/schemes/views/schemes/overview.py index 0c4ecf5..69d63d4 100644 --- a/schemes/views/schemes/overview.py +++ b/schemes/views/schemes/overview.py @@ -78,6 +78,7 @@ class FundingProgrammeRepr(Enum): ATF3 = "ATF3" ATF4 = "ATF4" ATF4E = "ATF4e" + ATF5 = "ATF5" CRSTS = "CRSTS" LUF1 = "LUF1" LUF2 = "LUF2" @@ -98,6 +99,7 @@ def _members() -> dict[FundingProgramme, FundingProgrammeRepr]: FundingProgrammes.ATF3: FundingProgrammeRepr.ATF3, FundingProgrammes.ATF4: FundingProgrammeRepr.ATF4, FundingProgrammes.ATF4E: FundingProgrammeRepr.ATF4E, + FundingProgrammes.ATF5: FundingProgrammeRepr.ATF5, FundingProgrammes.CRSTS: FundingProgrammeRepr.CRSTS, FundingProgrammes.LUF1: FundingProgrammeRepr.LUF1, FundingProgrammes.LUF2: FundingProgrammeRepr.LUF2, diff --git a/schemes/views/schemes/schemes.py b/schemes/views/schemes/schemes.py index b6d77e0..171af31 100644 --- a/schemes/views/schemes/schemes.py +++ b/schemes/views/schemes/schemes.py @@ -262,6 +262,7 @@ class FundingProgrammeContext: FundingProgrammes.ATF3: "ATF3", FundingProgrammes.ATF4: "ATF4", FundingProgrammes.ATF4E: "ATF4e", + FundingProgrammes.ATF5: "ATF5", FundingProgrammes.CRSTS: "CRSTS", FundingProgrammes.LUF1: "LUF1", FundingProgrammes.LUF2: "LUF2", diff --git a/tests/infrastructure/database/schemes/test_overview.py b/tests/infrastructure/database/schemes/test_overview.py index e1845d5..d8dfdc3 100644 --- a/tests/infrastructure/database/schemes/test_overview.py +++ b/tests/infrastructure/database/schemes/test_overview.py @@ -28,6 +28,7 @@ def test_to_domain(self, type_: SchemeType, id_: int) -> None: (FundingProgrammes.LUF2, 7), (FundingProgrammes.LUF3, 8), (FundingProgrammes.MRN, 9), + (FundingProgrammes.ATF5, 10), ], ) class TestFundingProgrammeMapper: diff --git a/tests/views/schemes/test_overview.py b/tests/views/schemes/test_overview.py index cc170a8..401d6e8 100644 --- a/tests/views/schemes/test_overview.py +++ b/tests/views/schemes/test_overview.py @@ -110,6 +110,7 @@ def test_to_domain(self, type_: SchemeType, type_repr: str) -> None: (FundingProgrammes.ATF3, "ATF3"), (FundingProgrammes.ATF4, "ATF4"), (FundingProgrammes.ATF4E, "ATF4e"), + (FundingProgrammes.ATF5, "ATF5"), (FundingProgrammes.CRSTS, "CRSTS"), (FundingProgrammes.LUF1, "LUF1"), (FundingProgrammes.LUF2, "LUF2"), diff --git a/tests/views/schemes/test_schemes.py b/tests/views/schemes/test_schemes.py index 7e1e495..eab8abe 100644 --- a/tests/views/schemes/test_schemes.py +++ b/tests/views/schemes/test_schemes.py @@ -348,6 +348,7 @@ class TestFundingProgrammeContext: (FundingProgrammes.ATF3, "ATF3"), (FundingProgrammes.ATF4, "ATF4"), (FundingProgrammes.ATF4E, "ATF4e"), + (FundingProgrammes.ATF5, "ATF5"), (FundingProgrammes.CRSTS, "CRSTS"), (FundingProgrammes.LUF1, "LUF1"), (FundingProgrammes.LUF2, "LUF2"),