Skip to content

Commit 7a47cc8

Browse files
committed
Resolve merge conflicts
2 parents 3ed6bd8 + 93ff201 commit 7a47cc8

File tree

8 files changed

+17
-10
lines changed

8 files changed

+17
-10
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,11 @@ Alternatively, these dependencies (`Cassandra`, `Zookeeper` and `PostgreSQL`) ca
148148

149149
`docker-compose -f docker-dev.yml up`
150150

151+
* If you want to use the sample files in this repo for testing the app, run the edits in demo mode. Otherwise, edit S025 will trigger for all files.
152+
153+
```shell
154+
export EDITS_DEMO_MODE=true
155+
```
151156

152157
* Start `sbt`
153158

api/src/main/resources/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ hmda {
6262
timeout = 10
6363
timeout = ${?HMDA_HTTP_TIMEOUT}
6464
}
65-
isDemo = true
65+
isDemo = false
6666
isDemo = ${?HMDA_IS_DEMO}
6767
zookeeperHost = "192.168.99.100"
6868
zookeeperHost = ${?ZOOKEEPER_HOST}

build.sbt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ lazy val hmda = (project in file("."))
5252
query,
5353
platformTest,
5454
validation,
55-
census)
55+
census,
56+
publication)
5657

5758
lazy val model = (crossProject in file("model"))
5859
.settings(hmdaBuildSettings: _*)

docker-compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ services:
2020
CASSANDRA_CLUSTER_HOSTS: cassandra
2121
CASSANDRA_CLUSTER_PORT: 9042
2222
HMDA_IS_DEMO: 'true'
23+
EDITS_DEMO_MODE: 'true'
2324
# lb settings
2425
EXCLUDE_PORTS: '8080, 8081' # 8080 proxied through auth_proxy; 8081 (Admin API) doesn't need proxy
2526
VIRTUAL_HOST: 'https://*:4443/public/*'

persistence-model/src/main/resources/application.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,6 @@ cassandra-query-journal {
101101
hmda {
102102
actor-lookup-timeout = 5
103103
persistent-actor-timeout = 3600
104-
isDemo = true
104+
isDemo = false
105105
isDemo = ${?HMDA_IS_DEMO}
106106
}

publication/src/main/scala/hmda/publication/reports/disclosure/D51.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import akka.NotUsed
66
import akka.stream.scaladsl.Source
77
import hmda.model.publication.reports.ApplicantIncomeEnum._
88
import hmda.publication.reports._
9-
import hmda.model.publication.reports.ReportTypeEnum.Disclosure
109
import hmda.model.publication.reports._
1110
import hmda.publication.reports.util.DateUtil._
1211
import hmda.publication.reports.util.DispositionType._

validation/src/main/scala/hmda/validation/rules/lar/macro/Q061.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ object Q061 extends AggregateEditCheck[LoanApplicationRegisterSource, LoanApplic
2020

2121
override def apply[as: AS, mat: MAT, ec: EC](lars: LoanApplicationRegisterSource): Future[Result] = {
2222

23-
val firstLienHoepaLoans =
24-
count(lars.filter(lar => lar.hoepaStatus == 1 && lar.actionTakenType == 1 && lar.lienStatus == 1 && lar.rateSpread != "NA")
25-
.filter(lar => lar.rateSpread.toInt >= 5))
23+
val firstLienPropertyLoans =
24+
count(lars.filter(lar => lar.loan.propertyType == 1 && lar.actionTakenType == 1 && lar.lienStatus == 1 && lar.rateSpread != "NA")
25+
.filter(lar => lar.rateSpread.toDouble > 5.0))
2626

2727
val total = count(lars.filter(lar => lar.actionTakenType == 1))
2828

2929
for {
30-
f <- firstLienHoepaLoans
30+
f <- firstLienPropertyLoans
3131
t <- total
3232
} yield {
3333
f.toDouble is lessThanOrEqual(t * multiplier)

validation/src/test/scala/hmda/validation/rules/lar/macro/Q061Spec.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ class Q061Spec extends LessThanOrEqualToPropertyMacroSpec {
1010

1111
override def irrelevantLar(lar: LoanApplicationRegister) = lar.copy(rateSpread = "NA").copy(actionTakenType = 1)
1212
override def relevantLar(lar: LoanApplicationRegister) = {
13-
lar.copy(actionTakenType = 1).copy(hoepaStatus = 1).copy(rateSpread = "5").copy(lienStatus = 1).copy(actionTakenType = 1)
13+
val newLoan = lar.loan.copy(propertyType = 1)
14+
lar.copy(actionTakenType = 1).copy(loan = newLoan).copy(rateSpread = "5.01").copy(lienStatus = 1).copy(actionTakenType = 1)
1415
}
1516

16-
lessThanOrEqualToPropertyTests("first lien hoepa loans", multiplier, relevantLar, irrelevantLar)
17+
lessThanOrEqualToPropertyTests("first lien property type loans", multiplier, relevantLar, irrelevantLar)
1718

1819
override def check: AggregateEditCheck[LoanApplicationRegisterSource, LoanApplicationRegister] = Q061
1920
}

0 commit comments

Comments
 (0)