Skip to content

Commit

Permalink
Merge pull request #1041 from schbetsy/demo-bank0
Browse files Browse the repository at this point in the history
WIP: Fix demo data bug for Bank0
  • Loading branch information
Nick Grippin authored Jul 14, 2017
2 parents eca44cd + 2bb2a24 commit f68285c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 73 deletions.
6 changes: 3 additions & 3 deletions persistence/src/main/resources/demoFilings.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
2017|6999998|in-progress|true|1484842271000|1487520671000
2017|6999999|not-started|false|1484842271000|1484842271000
2016|6999999|not-started|false|1484842271000|1484842271000
2017|6999998|true|1484842271000|1487520671000
2017|6999999|false|1484842271000|1484842271000
2016|6999999|false|1484842271000|1484842271000
3 changes: 0 additions & 3 deletions persistence/src/main/resources/demoSubmissions.csv

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,12 @@ object DemoData {

val demoFilings = DemoFilings.values

val demoSubmissions = DemoSubmissions.values

implicit val timeout = Timeout(5.seconds)

def loadDemoData(system: ActorSystem): Unit = {
Thread.sleep(500)
loadInstitutions(demoInstitutions, system)
loadFilings(demoFilings, system)
loadSubmissions(demoSubmissions, system)
}

def loadTestData(system: ActorSystem): Unit = {
Expand Down
18 changes: 4 additions & 14 deletions persistence/src/main/scala/hmda/persistence/demo/DemoFilings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,19 @@ object DemoFilings extends ResourceUtils {
val values = line.split('|').map(_.trim)
val period = values(0)
val institutionId = values(1)
val filingStatus = toFilingStatus(values(2))
val filingRequired = values(3).toBoolean
val start = values(4).toLong
val end = values(5).toLong
val filingRequired = values(2).toBoolean
val start = values(3).toLong
val end = values(4).toLong

Filing(
period,
institutionId,
filingStatus,
NotStarted,
filingRequired,
start,
end
)
}.toSeq
}

def toFilingStatus(text: String): FilingStatus = {
text match {
case "not-started" => NotStarted
case "in-progress" => InProgress
case "completed" => Completed
case "cancelled" => Cancelled
}
}

}

This file was deleted.

0 comments on commit f68285c

Please sign in to comment.