From d1c151def00072f64e5dcb8b278ca17afc1489bb Mon Sep 17 00:00:00 2001 From: PatrickGoRaft Date: Mon, 2 Dec 2024 10:23:12 -0500 Subject: [PATCH] updates to support 2025 for mlar submisisons for future proofing --- .../hmda/query/repository/ModifiedLarRepository.scala | 5 +++-- .../main/scala/hmda/publication/lar/ModifiedLarApp.scala | 8 +++++++- .../lar/publication/ModifiedLarPublisher.scala | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/common/src/main/scala/hmda/query/repository/ModifiedLarRepository.scala b/common/src/main/scala/hmda/query/repository/ModifiedLarRepository.scala index d1f4b59234..d5adacf761 100644 --- a/common/src/main/scala/hmda/query/repository/ModifiedLarRepository.scala +++ b/common/src/main/scala/hmda/query/repository/ModifiedLarRepository.scala @@ -24,8 +24,9 @@ class ModifiedLarRepository(databaseConfig: DatabaseConfig[JdbcProfile]) { case 2021 => "modifiedlar2021" case 2022 => "modifiedlar2022" case 2023 => "modifiedlar2023" - - case _ => "modifiedlar2021" + case 2024 => "modifiedlar2024" + case 2025 => "modifiedlar2025" + case _ => "modifiedlar2024" } /** diff --git a/modified-lar/src/main/scala/hmda/publication/lar/ModifiedLarApp.scala b/modified-lar/src/main/scala/hmda/publication/lar/ModifiedLarApp.scala index 3c020975e6..1ca92af0e5 100644 --- a/modified-lar/src/main/scala/hmda/publication/lar/ModifiedLarApp.scala +++ b/modified-lar/src/main/scala/hmda/publication/lar/ModifiedLarApp.scala @@ -94,11 +94,17 @@ object ModifiedLarApp extends App { val censusTractMap2023: Map[String, Census] = CensusRecords.indexedTract2023 + val censusTractMap2024: Map[String, Census] = + CensusRecords.indexedTract2024 + + val censusTractMap2025: Map[String, Census] = + CensusRecords.indexedTract2025 + // database configuration is located in `common` project val databaseConfig = DatabaseConfig.forConfig[JdbcProfile]("db") val repo = new ModifiedLarRepository(databaseConfig) val modifiedLarPublisher = - classicSystem.spawn(ModifiedLarPublisher.behavior(censusTractMap2018, censusTractMap2019, censusTractMap2020,censusTractMap2021,censusTractMap2022,censusTractMap2023, repo), ModifiedLarPublisher.name) + classicSystem.spawn(ModifiedLarPublisher.behavior(censusTractMap2018, censusTractMap2019, censusTractMap2020,censusTractMap2021,censusTractMap2022,censusTractMap2023,censusTractMap2024,censusTractMap2025, repo), ModifiedLarPublisher.name) val processKafkaRecord: String => Future[Done] = submitForPersistence(modifiedLarPublisher) diff --git a/modified-lar/src/main/scala/hmda/publication/lar/publication/ModifiedLarPublisher.scala b/modified-lar/src/main/scala/hmda/publication/lar/publication/ModifiedLarPublisher.scala index 17b3767a96..5df402e90a 100644 --- a/modified-lar/src/main/scala/hmda/publication/lar/publication/ModifiedLarPublisher.scala +++ b/modified-lar/src/main/scala/hmda/publication/lar/publication/ModifiedLarPublisher.scala @@ -64,6 +64,8 @@ object ModifiedLarPublisher { indexTractMap2021: Map[String, Census], indexTractMap2022: Map[String, Census], indexTractMap2023: Map[String, Census], + indexTractMap2024: Map[String, Census], + indexTractMap2025: Map[String, Census], modifiedLarRepo: ModifiedLarRepository, readRawData: ActorSystem[_] => SubmissionId => Source[LineAdded, NotUsed] = as => id => HmdaQuery.readRawData(id)(as) ): Behavior[ModifiedLarCommand] =