Skip to content

Commit

Permalink
GH-179: Add ATF5 funding programme
Browse files Browse the repository at this point in the history
  • Loading branch information
markhobson committed Jan 16, 2025
1 parent 2f501eb commit a4161c4
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions schemes/domain/schemes/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions schemes/infrastructure/database/schemes/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions schemes/views/schemes/overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class FundingProgrammeRepr(Enum):
ATF3 = "ATF3"
ATF4 = "ATF4"
ATF4E = "ATF4e"
ATF5 = "ATF5"
CRSTS = "CRSTS"
LUF1 = "LUF1"
LUF2 = "LUF2"
Expand All @@ -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,
Expand Down
1 change: 1 addition & 0 deletions schemes/views/schemes/schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions tests/infrastructure/database/schemes/test_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
1 change: 1 addition & 0 deletions tests/views/schemes/test_overview.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
1 change: 1 addition & 0 deletions tests/views/schemes/test_schemes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down

0 comments on commit a4161c4

Please sign in to comment.