Skip to content

Commit

Permalink
Merge pull request #4761 from jaredb96/log-cleanup
Browse files Browse the repository at this point in the history
Log cleanup
  • Loading branch information
rkovalik-raft authored Feb 6, 2024
2 parents a39744d + f05dba1 commit dbfa4c4
Show file tree
Hide file tree
Showing 34 changed files with 33 additions and 69 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hmda.uli.api.http

import akka.event.{LoggingAdapter, NoLogging}
import akka.http.scaladsl.model.StatusCodes
import akka.http.scaladsl.testkit.ScalatestRouteTest
import akka.util.Timeout
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package hmda.messages

import akka.kafka.ConsumerMessage.{CommittableMessage, CommittableOffset}
import com.typesafe.config.{Config, ConfigFactory}
import com.typesafe.scalalogging.StrictLogging

import scala.concurrent.{ExecutionContext, Future}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,9 @@ package hmda.query.ts

import com.softwaremill.diffx
import com.softwaremill.diffx.{ Diff, DiffResult, Identical }
import com.softwaremill.diffx.instances.DiffForString
import hmda.model.filing.ts.TsGenerators.tsGen
import hmda.parser.filing.ts.TsCsvParser.{ dateFromString, dateToString }
import hmda.utils.DiffxMatcher
import org.scalacheck.{ Arbitrary, Gen }
import org.scalatest.{ FunSuite, MustMatchers, PropSpec }
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalacheck.ScalacheckShapeless._

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package hmda.dataBrowser.services

import cats.implicits._
import hmda.dataBrowser.models.HealthCheckStatus._
import hmda.dataBrowser.models.State._
import hmda.dataBrowser.models.{ Commas, HealthCheckResponse, HealthCheckStatus, QueryField }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import akka.http.scaladsl.testkit.ScalatestRouteTest
import de.heikoseeberger.akkahttpcirce.FailFastCirceSupport
import hmda.dataBrowser.api.DataBrowserHttpApi
import hmda.dataBrowser.models.HealthCheckStatus.{ Down, Up }
import hmda.dataBrowser.models.{ AggregationResponse, FilerInstitutionResponseLatest, HealthCheckResponse, Statistic }
import hmda.dataBrowser.models.{ AggregationResponse, HealthCheckResponse, Statistic }
import hmda.dataBrowser.repositories._
import hmda.dataBrowser.services.{ DataBrowserQueryService, HealthCheckService, S3FileService }
import hmda.utils.EmbeddedPostgres
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import akka.testkit.TestKit
import hmda.dataBrowser.models._
import hmda.dataBrowser.repositories._
import hmda.dataBrowser.services.DataBrowserQueryService
import hmda.dataBrowser.api.DataBrowserDirectives._
import monix.eval.Task
import monix.execution.ExecutionModel
import monix.execution.schedulers.TestScheduler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ package hmda.analytics.query
import hmda.model.filing.lar.LoanApplicationRegister
import hmda.parser.derivedFields._
import hmda.model.census.CountyLoanLimit
import hmda.census.records._
import hmda.census.records.CountyLoanLimitRecords._
import hmda.model.census.Census
import hmda.census.records.CensusRecords._
import com.typesafe.config.ConfigFactory
import java.security.MessageDigest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import hmda.model.filing.submission.SubmissionId
import hmda.utils.EmbeddedPostgres
import hmda.utils.YearUtils.Period
import org.scalatest.{ AsyncWordSpec, MustMatchers }
import slick.dbio.DBIO

class SubmissionHistoryComponentSpec extends AsyncWordSpec with SubmissionHistoryComponent with EmbeddedPostgres with MustMatchers {
"SubmissionHistoryRepository" must {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
package hmda.publisher.query.component

import hmda.model.publication.Msa

import java.sql.Timestamp
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{QAEntity, QARepository, QATableBase}
import hmda.publisher.query.lar.{LarEntityImpl2018, _}
import hmda.publisher.query.panel.{InstitutionAltEntity, InstitutionEntity}
import hmda.publisher.query.panel.{InstitutionEntity}
import hmda.publisher.validation.{LarData, PanelData, TsData}
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{DatabaseConfig, DatabasePublisher}
import slick.jdbc.{JdbcProfile, ResultSetConcurrency, ResultSetType}

import scala.concurrent.{ExecutionContext, Future}
import scala.concurrent.{Future}
// $COVERAGE-OFF$
trait PublisherComponent2018 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
package hmda.publisher.query.component

import hmda.model.publication.Msa

import java.sql.Timestamp
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{QAEntity, QARepository, QATableBase}
import hmda.publisher.query.lar.{LarEntityImpl2019, _}
import hmda.publisher.query.panel.{InstitutionAltEntity, InstitutionEntity}
import hmda.publisher.query.panel.{InstitutionEntity}
import hmda.publisher.validation.{LarData, PanelData, TsData}
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{DatabaseConfig, DatabasePublisher}
import slick.jdbc.{JdbcProfile, ResultSetConcurrency, ResultSetType}

import scala.concurrent.{ExecutionContext, Future}
import scala.concurrent.{Future}
// $COVERAGE-OFF$
trait PublisherComponent2019 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package hmda.publisher.query.component

import java.sql.Timestamp
import hmda.model.publication.Msa
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{ QAEntity, QARepository, QATableBase }
import hmda.publisher.qa.{ QAEntity, QATableBase }
import hmda.publisher.query.lar.{ LarEntityImpl2020, _ }
import hmda.publisher.query.panel.{ InstitutionAltEntity, InstitutionEntity }
import hmda.publisher.query.panel.{ InstitutionEntity }
import hmda.publisher.validation.{ LarData, PanelData, TsData }
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{ DatabaseConfig, DatabasePublisher }
import slick.jdbc.{ JdbcProfile, ResultSetConcurrency, ResultSetType }

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ Future }
// $COVERAGE-OFF$
trait PublisherComponent2020 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package hmda.publisher.query.component

import java.sql.Timestamp
import hmda.model.publication.Msa
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{ QAEntity, QARepository, QATableBase }
import hmda.publisher.qa.{ QAEntity, QATableBase }
import hmda.publisher.query.lar.{ LarEntityImpl2021, _ }
import hmda.publisher.query.panel.{ InstitutionAltEntity, InstitutionEntity }
import hmda.publisher.query.panel.{ InstitutionEntity }
import hmda.publisher.validation.{ LarData, PanelData, TsData }
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{ DatabaseConfig, DatabasePublisher }
import slick.jdbc.{ JdbcProfile, ResultSetConcurrency, ResultSetType }

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ Future }
// $COVERAGE-OFF$
trait PublisherComponent2021 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package hmda.publisher.query.component

import java.sql.Timestamp
import hmda.model.publication.Msa
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{ QAEntity, QARepository, QATableBase }
import hmda.publisher.qa.{ QAEntity, QATableBase }
import hmda.publisher.query.lar.{ LarEntityImpl2022, _ }
import hmda.publisher.query.panel.{ InstitutionAltEntity, InstitutionEntity }
import hmda.publisher.query.panel.{ InstitutionEntity }
import hmda.publisher.validation.{ LarData, PanelData, TsData }
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{ DatabaseConfig, DatabasePublisher }
import slick.jdbc.{ JdbcProfile, ResultSetConcurrency, ResultSetType }

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ Future }
// $COVERAGE-OFF$
trait PublisherComponent2022 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
package hmda.publisher.query.component

import java.sql.Timestamp
import hmda.model.publication.Msa
import hmda.publisher.helper.PGTableNameLoader
import hmda.publisher.qa.{ QAEntity, QARepository, QATableBase }
import hmda.publisher.qa.{ QAEntity, QATableBase }
import hmda.publisher.query.lar.{ LarEntityImpl2023, _ }
import hmda.publisher.query.panel.{ InstitutionAltEntity, InstitutionEntity }
import hmda.publisher.query.panel.{ InstitutionEntity }
import hmda.publisher.validation.{ LarData, PanelData, TsData }
import hmda.query.DbConfiguration._
import hmda.query.repository.TableRepository
import hmda.query.ts.TransmittalSheetEntity
import slick.basic.{ DatabaseConfig, DatabasePublisher }
import slick.jdbc.{ JdbcProfile, ResultSetConcurrency, ResultSetType }

import scala.concurrent.{ ExecutionContext, Future }
import scala.concurrent.{ Future }
// $COVERAGE-OFF$
trait PublisherComponent2023 extends PGTableNameLoader {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import hmda.util.conversion.ColumnDataFormatter
import io.chrisdavenport.cormorant
import io.chrisdavenport.cormorant.CSV
import io.chrisdavenport.cormorant.implicits._
import cormorant.generic.semiauto._
import hmda.parser.filing.ts.TsCsvParser.extractOpt
import hmda.publisher.query.component.YearPeriod
import hmda.util.PsvParsingCompanion

case class ModifiedLarPartOne(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import akka.stream.alpakka.s3.scaladsl.S3
import akka.stream.scaladsl.Source
import akka.util.ByteString
import hmda.actor.HmdaActor
import hmda.publisher.helper.CronConfigLoader.{CronString, combinedMlarCron, combinedMlarYears, larPublicCron, larPublicYears}
import hmda.publisher.helper.CronConfigLoader.{CronString, combinedMlarCron, combinedMlarYears}
import hmda.publisher.helper._
import hmda.publisher.query.component._
import hmda.publisher.query.lar.ModifiedLarEntityImpl
Expand All @@ -20,7 +20,7 @@ import hmda.publisher.util.PublishingReporter.Command.FilePublishingCompleted
import hmda.publisher.util.ScheduleCoordinator.Command._
import hmda.publisher.util.{PublishingReporter, ScheduleCoordinator}
import hmda.publisher.validation.PublishingGuard
import hmda.publisher.validation.PublishingGuard.{Period, Scope}
import hmda.publisher.validation.PublishingGuard.{Scope}
import hmda.query.DbConfiguration.dbConfig
import hmda.util.BankFilterUtils._
import slick.basic.DatabasePublisher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import hmda.publisher.util.{ PublishingReporter, ScheduleCoordinator }
import hmda.publisher.util.PublishingReporter.Command.FilePublishingCompleted
import hmda.publisher.util.ScheduleCoordinator.Command._
import hmda.publisher.validation.PublishingGuard
import hmda.publisher.validation.PublishingGuard.{ Period, Scope }
import hmda.publisher.validation.PublishingGuard.{ Scope }
import hmda.query.DbConfiguration.dbConfig
import hmda.util.BankFilterUtils._
import slick.basic.DatabasePublisher
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ import hmda.model.publication.Msa
import hmda.publisher.helper.CronConfigLoader.{CronString, larCron, larQuarterlyCron, larQuarterlyYears, larYears, loanLimitCron, loanLimitYears, specificLarCron, specificLarYears}
import hmda.publisher.helper._
import hmda.publisher.query.component.{PublisherComponent, PublisherComponent2018, PublisherComponent2019, PublisherComponent2020, PublisherComponent2021, PublisherComponent2022, PublisherComponent2023, YearPeriod}
import hmda.publisher.query.lar.{LarEntityImpl, LarEntityImpl2019, LarEntityImpl2020, LarEntityImpl2021, LarEntityImpl2022}
import hmda.publisher.query.lar.{LarEntityImpl}
import hmda.publisher.scheduler.schedules.{Schedule, ScheduleWithYear}
import hmda.publisher.scheduler.schedules.Schedules._
import hmda.publisher.util.{PublishingReporter, ScheduleCoordinator}
import hmda.publisher.util.PublishingReporter.Command.FilePublishingCompleted
import hmda.publisher.util.ScheduleCoordinator.Command._
import hmda.publisher.validation.PublishingGuard
import hmda.publisher.validation.PublishingGuard.{Period, Scope}
import hmda.publisher.validation.PublishingGuard.{Scope}
import hmda.query.DbConfiguration.dbConfig
import hmda.util.BankFilterUtils._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import hmda.publisher.helper.CronConfigLoader.{ CronString, tsPublicCron, tsPubl
import hmda.publisher.scheduler.schedules.{ Schedule, ScheduleWithYear }
import hmda.publisher.util.{ PublishingReporter, ScheduleCoordinator }
import hmda.publisher.validation.PublishingGuard
import hmda.publisher.validation.PublishingGuard.{ Period, Scope }
import hmda.publisher.validation.PublishingGuard.{ Scope }

import scala.concurrent.Future
import scala.util.{ Failure, Success }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import hmda.query.ts.TransmittalSheetEntity
import hmda.utils.EmbeddedPostgres
import org.scalatest.concurrent.{ PatienceConfiguration, ScalaFutures }
import org.scalatest.time.{ Millis, Minutes, Span }
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach, FreeSpecLike, FunSuite, Matchers }
import org.scalatest.{ BeforeAndAfterAll, BeforeAndAfterEach, FreeSpecLike, Matchers }

import scala.concurrent.duration.DurationInt
import scala.concurrent.{ Await, Future }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package hmda.publisher.helper

import java.time.{Clock, Instant, LocalDate, ZoneId, ZoneOffset}
import java.time.{Clock, Instant, LocalDate, ZoneId}

import hmda.publisher.validation.PublishingGuard.Period
import org.scalatest.FreeSpec
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hmda.publisher.helper

import org.scalatest.concurrent.ScalaFutures.convertScalaFuture
import org.scalatest.{FreeSpec, FunSuite}
import org.scalatest.{FreeSpec}

import scala.concurrent.Future
import scala.concurrent.duration.DurationInt
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package hmda.publisher.query.lar

import org.scalatest.{ FreeSpecLike, MustMatchers, PropSpec }
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalacheck.ScalacheckShapeless._
import org.scalacheck._

class LarEntityImpl2018Test extends PropSpec with ScalaCheckPropertyChecks with MustMatchers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
package hmda.publisher.query.lar

import hmda.model.publication.Msa
import org.scalatest.{ FreeSpecLike, MustMatchers, PropSpec }
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalacheck.ScalacheckShapeless._
import org.scalacheck._

class LarEntityImpl2019Test extends PropSpec with ScalaCheckPropertyChecks with MustMatchers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
package hmda.publisher.query.lar

import hmda.model.publication.Msa
import org.scalatest.{ FreeSpecLike, MustMatchers, PropSpec }
import org.scalatest.{ MustMatchers, PropSpec }
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalacheck.ScalacheckShapeless._
import org.scalacheck._

class LarEntityImpl2020Test extends PropSpec with ScalaCheckPropertyChecks with MustMatchers {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
package hmda.publisher.query.panel

import com.softwaremill.diffx.Diff
import hmda.publisher.query.lar.{LarEntityImpl2020, LarPartSeven2020}
import hmda.utils.DiffxMatcher
import org.scalatest.{FunSuite, MustMatchers, PropSpec}
import org.scalatest.{ MustMatchers, PropSpec}
import org.scalatestplus.scalacheck.ScalaCheckPropertyChecks
import org.scalacheck.ScalacheckShapeless._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import hmda.api.http.utils.ParserErrorUtils._
import hmda.auth.OAuth2Authorization
import hmda.messages.submission.SubmissionCommands.GetSubmission
import hmda.messages.submission.SubmissionProcessingCommands.GetParsingErrors
import hmda.messages.submission.SubmissionProcessingEvents.HmdaRowParsedError
import hmda.model.filing.submission.{Submission, SubmissionId}
import hmda.model.processing.state.HmdaParserErrorState
import hmda.persistence.submission.{HmdaParserError, SubmissionPersistence}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ import hmda.validation.rules.lar.quality._2019._
import hmda.validation.rules.lar.quality.{_2020 => quality2020, _2021 => quality2021, _2022 => quality2022}
import hmda.validation.rules.lar.quality.common._
import hmda.validation.rules.lar.syntactical.{S300, S301}
import hmda.validation.rules.lar.validity.{_2020, _2022, _2023, _2024, _}
import hmda.validation.rules.lar.validity.{_2020, _2022, _2024, _}
import hmda.census.records.CensusRecords
import hmda.validation.rules.lar.quality
import hmda.validation.rules.lar.quality._2024._

private[engine] object LarEngine2024 extends ValidationEngine[LoanApplicationRegister] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package hmda.validation.rules.lar.quality._2024

import hmda.model.filing.lar.LoanApplicationRegister
import hmda.model.filing.lar.enums._
import hmda.validation.dsl.PredicateCommon._
import hmda.validation.dsl.PredicateSyntax._
import hmda.validation.dsl.{ValidationFailure, ValidationResult, ValidationSuccess}
import hmda.validation.rules.EditCheck

import scala.util.Try

object Q660_1 extends EditCheck[LoanApplicationRegister] {
override def name: String = "Q660-1"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
package hmda.validation.rules.lar.validity._2020
import hmda.census.records.CensusRecords
import hmda.model.census.{Census, State}
import hmda.model.filing.lar.LoanApplicationRegister
import hmda.validation.dsl.{ValidationFailure, ValidationResult, ValidationSuccess}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package hmda.validation.rules.lar.quality._2021

import hmda.model.filing.lar.LarGenerators._
import hmda.model.filing.lar.LoanApplicationRegister
import hmda.model.filing.lar.enums._
import hmda.validation.rules.EditCheck
import hmda.validation.rules.lar.LarEditCheckSpec

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import io.circe.generic.auto._
import slick.basic.DatabaseConfig
import slick.jdbc.JdbcProfile
import hmda.api.http.EmailUtils._
import hmda.query.ts.TransmittalSheetEntity
import org.slf4j.LoggerFactory

import scala.concurrent.{ExecutionContext, Future}
Expand Down
Loading

0 comments on commit dbfa4c4

Please sign in to comment.