{"action":"created","comment":{"url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/comments/74067198","id":74067198,"diff_hunk":"@@ -0,0 +1,89 @@\n+package hmda.validation.rules.lar.validity\n+\n+import hmda.model.fi.ts.{ Parent, TransmittalSheet }\n+import hmda.model.institution.InstitutionType._\n+import hmda.model.institution.{ Agency, Institution, InstitutionType }\n+import hmda.validation.rules.EditCheck\n+import hmda.validation.rules.ts.TsEditCheckSpec\n+import org.scalacheck.Gen\n+\n+class V110Spec extends TsEditCheckSpec {\n+\n+  private var institution: Institution = _\n+\n+  override def check: EditCheck[TransmittalSheet] = new V110(institution)\n+\n+  private val applicableTypes: Set[InstitutionType] = Set(DependentMortgageCompany, Affiliate)\n+\n+  property(\"any TS must pass for Institution of type other than MBS or Affiliate\") {\n+    forAll(tsGen, Gen.oneOf(InstitutionType.values)) { (ts, instType) =>\n+      whenever(!applicableTypes.contains(instType)) {\n+        whenInstitutionTypeIs(instType)\n+        ts.mustPass\n+      }\n+    }\n+  }\n+\n+  // TODO fix generator so that the previous test will cover this case too. (then remove this one.)\n+  property(\"any TS, even with empty parent info, must pass for Institution of type other than MBS or Affiliate\") {\n+    forAll(tsGen, Gen.oneOf(InstitutionType.values)) { (ts, instType) =>\n+      whenever(!applicableTypes.contains(instType)) {\n+        whenInstitutionTypeIs(instType)\n+        val noParentTS = ts.copy(parent = Parent(\"\", \"\", \"\", \"\", \"\"))\n+        noParentTS.mustPass\n+      }\n+    }\n+  }\n+\n+  property(\"TS must pass if parent info is populated and Institution is dependent MBS or Affiliate\") {\n+    forAll(tsGen, Gen.oneOf(applicableTypes.toList)) { (ts, instType) =>","path":"validation/src/test/scala/hmda/validation/rules/lar/validity/V110Spec.scala","position":39,"original_position":39,"commit_id":"1b55136528f6d5e0166807e056cb44ebe1a18488","original_commit_id":"6b8a0e733b028d2197818a366f7d1cbec08caa21","user":{"login":"Kibrael","id":8459164,"avatar_url":"https://avatars.githubusercontent.com/u/8459164?v=3","gravatar_id":"","url":"https://api.github.com/users/Kibrael","html_url":"https://github.com/Kibrael","followers_url":"https://api.github.com/users/Kibrael/followers","following_url":"https://api.github.com/users/Kibrael/following{/other_user}","gists_url":"https://api.github.com/users/Kibrael/gists{/gist_id}","starred_url":"https://api.github.com/users/Kibrael/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kibrael/subscriptions","organizations_url":"https://api.github.com/users/Kibrael/orgs","repos_url":"https://api.github.com/users/Kibrael/repos","events_url":"https://api.github.com/users/Kibrael/events{/privacy}","received_events_url":"https://api.github.com/users/Kibrael/received_events","type":"User","site_admin":false},"body":"@lgdean Are these the institution types that you're asking about being correct:\r\n'dependent MBS or Affiliate'?","created_at":"2016-08-09T14:20:57Z","updated_at":"2016-08-09T14:20:57Z","html_url":"https://github.com/cfpb/hmda-platform/pull/486#discussion_r74067198","pull_request_url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486","_links":{"self":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/comments/74067198"},"html":{"href":"https://github.com/cfpb/hmda-platform/pull/486#discussion_r74067198"},"pull_request":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486"}}},"pull_request":{"url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486","id":80523057,"html_url":"https://github.com/cfpb/hmda-platform/pull/486","diff_url":"https://github.com/cfpb/hmda-platform/pull/486.diff","patch_url":"https://github.com/cfpb/hmda-platform/pull/486.patch","issue_url":"https://api.github.com/repos/cfpb/hmda-platform/issues/486","number":486,"state":"open","locked":false,"title":"fill out Institution Types needed for edits","user":{"login":"lgdean","id":371459,"avatar_url":"https://avatars.githubusercontent.com/u/371459?v=3","gravatar_id":"","url":"https://api.github.com/users/lgdean","html_url":"https://github.com/lgdean","followers_url":"https://api.github.com/users/lgdean/followers","following_url":"https://api.github.com/users/lgdean/following{/other_user}","gists_url":"https://api.github.com/users/lgdean/gists{/gist_id}","starred_url":"https://api.github.com/users/lgdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgdean/subscriptions","organizations_url":"https://api.github.com/users/lgdean/orgs","repos_url":"https://api.github.com/users/lgdean/repos","events_url":"https://api.github.com/users/lgdean/events{/privacy}","received_events_url":"https://api.github.com/users/lgdean/received_events","type":"User","site_admin":false},"body":"addresses #438\r\naddresses #105\r\naddresses #178\r\n\r\nThis PR adds `InstitutionType`s as mentioned in #438 and needed for edits V110 and Q033.  It does not yet add parent info.\r\n\r\nThe current plan for parent info is to create a `hasParent` boolean on the `Institution` as part of #438, and to create a new issue for determining how to represent parent institutions (potentially non-filers) and their relationships with filers, as needed by other parts of the system.  This is enough to un-block the two edits here, and it may make merge conflicts with #481 smaller (and easier to deal with).\r\n\r\nFeedback requested from @Kibrael, @debseidner, and/or @lesgou:\r\n * are the institution types in the code the correct ones needed by these edits?\r\n * do you have suggestions for better names for them? (Sometimes I used one phrasing in the name, and another in the test description. Which one sounds better? And, importantly, are they accurate?)\r\n * is V110 implemented as intended? There was some back-and-forth on that one, and I took [this comment](https://github.com/cfpb/hmda-platform/issues/105#issuecomment-231726829) as the latest.\r\n * for Q033, does the test description look correct?\r\n\r\nNote that this code is incomplete: Q033 is not fully implemented, and neither edit is hooked up to run as part of validation.  It is, however, safe to merge if it helps reduce future conflicts; it won't break anything, and it won't prematurely close the issues listed above.","created_at":"2016-08-08T21:13:14Z","updated_at":"2016-08-09T14:20:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1145ff402c209456f2c0925ece44e810356dd36a","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486/commits","review_comments_url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486/comments","review_comment_url":"https://api.github.com/repos/cfpb/hmda-platform/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cfpb/hmda-platform/issues/486/comments","statuses_url":"https://api.github.com/repos/cfpb/hmda-platform/statuses/1b55136528f6d5e0166807e056cb44ebe1a18488","head":{"label":"lgdean:institution-type","ref":"institution-type","sha":"1b55136528f6d5e0166807e056cb44ebe1a18488","user":{"login":"lgdean","id":371459,"avatar_url":"https://avatars.githubusercontent.com/u/371459?v=3","gravatar_id":"","url":"https://api.github.com/users/lgdean","html_url":"https://github.com/lgdean","followers_url":"https://api.github.com/users/lgdean/followers","following_url":"https://api.github.com/users/lgdean/following{/other_user}","gists_url":"https://api.github.com/users/lgdean/gists{/gist_id}","starred_url":"https://api.github.com/users/lgdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgdean/subscriptions","organizations_url":"https://api.github.com/users/lgdean/orgs","repos_url":"https://api.github.com/users/lgdean/repos","events_url":"https://api.github.com/users/lgdean/events{/privacy}","received_events_url":"https://api.github.com/users/lgdean/received_events","type":"User","site_admin":false},"repo":{"id":50669709,"name":"hmda-platform","full_name":"lgdean/hmda-platform","owner":{"login":"lgdean","id":371459,"avatar_url":"https://avatars.githubusercontent.com/u/371459?v=3","gravatar_id":"","url":"https://api.github.com/users/lgdean","html_url":"https://github.com/lgdean","followers_url":"https://api.github.com/users/lgdean/followers","following_url":"https://api.github.com/users/lgdean/following{/other_user}","gists_url":"https://api.github.com/users/lgdean/gists{/gist_id}","starred_url":"https://api.github.com/users/lgdean/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lgdean/subscriptions","organizations_url":"https://api.github.com/users/lgdean/orgs","repos_url":"https://api.github.com/users/lgdean/repos","events_url":"https://api.github.com/users/lgdean/events{/privacy}","received_events_url":"https://api.github.com/users/lgdean/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/lgdean/hmda-platform","description":"","fork":true,"url":"https://api.github.com/repos/lgdean/hmda-platform","forks_url":"https://api.github.com/repos/lgdean/hmda-platform/forks","keys_url":"https://api.github.com/repos/lgdean/hmda-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lgdean/hmda-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lgdean/hmda-platform/teams","hooks_url":"https://api.github.com/repos/lgdean/hmda-platform/hooks","issue_events_url":"https://api.github.com/repos/lgdean/hmda-platform/issues/events{/number}","events_url":"https://api.github.com/repos/lgdean/hmda-platform/events","assignees_url":"https://api.github.com/repos/lgdean/hmda-platform/assignees{/user}","branches_url":"https://api.github.com/repos/lgdean/hmda-platform/branches{/branch}","tags_url":"https://api.github.com/repos/lgdean/hmda-platform/tags","blobs_url":"https://api.github.com/repos/lgdean/hmda-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lgdean/hmda-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lgdean/hmda-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/lgdean/hmda-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lgdean/hmda-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/lgdean/hmda-platform/languages","stargazers_url":"https://api.github.com/repos/lgdean/hmda-platform/stargazers","contributors_url":"https://api.github.com/repos/lgdean/hmda-platform/contributors","subscribers_url":"https://api.github.com/repos/lgdean/hmda-platform/subscribers","subscription_url":"https://api.github.com/repos/lgdean/hmda-platform/subscription","commits_url":"https://api.github.com/repos/lgdean/hmda-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/lgdean/hmda-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/lgdean/hmda-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/lgdean/hmda-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/lgdean/hmda-platform/contents/{+path}","compare_url":"https://api.github.com/repos/lgdean/hmda-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lgdean/hmda-platform/merges","archive_url":"https://api.github.com/repos/lgdean/hmda-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lgdean/hmda-platform/downloads","issues_url":"https://api.github.com/repos/lgdean/hmda-platform/issues{/number}","pulls_url":"https://api.github.com/repos/lgdean/hmda-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/lgdean/hmda-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/lgdean/hmda-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lgdean/hmda-platform/labels{/name}","releases_url":"https://api.github.com/repos/lgdean/hmda-platform/releases{/id}","deployments_url":"https://api.github.com/repos/lgdean/hmda-platform/deployments","created_at":"2016-01-29T15:06:27Z","updated_at":"2016-02-23T01:42:55Z","pushed_at":"2016-08-08T20:50:26Z","git_url":"git://github.com/lgdean/hmda-platform.git","ssh_url":"git@github.com:lgdean/hmda-platform.git","clone_url":"https://github.com/lgdean/hmda-platform.git","svn_url":"https://github.com/lgdean/hmda-platform","homepage":"","size":4514,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"cfpb:master","ref":"master","sha":"bc4173b9af86327aaae467e5f04a1681e3ea316f","user":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"repo":{"id":50141662,"name":"hmda-platform","full_name":"cfpb/hmda-platform","owner":{"login":"cfpb","id":1071563,"avatar_url":"https://avatars.githubusercontent.com/u/1071563?v=3","gravatar_id":"","url":"https://api.github.com/users/cfpb","html_url":"https://github.com/cfpb","followers_url":"https://api.github.com/users/cfpb/followers","following_url":"https://api.github.com/users/cfpb/following{/other_user}","gists_url":"https://api.github.com/users/cfpb/gists{/gist_id}","starred_url":"https://api.github.com/users/cfpb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cfpb/subscriptions","organizations_url":"https://api.github.com/users/cfpb/orgs","repos_url":"https://api.github.com/users/cfpb/repos","events_url":"https://api.github.com/users/cfpb/events{/privacy}","received_events_url":"https://api.github.com/users/cfpb/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/cfpb/hmda-platform","description":"","fork":false,"url":"https://api.github.com/repos/cfpb/hmda-platform","forks_url":"https://api.github.com/repos/cfpb/hmda-platform/forks","keys_url":"https://api.github.com/repos/cfpb/hmda-platform/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cfpb/hmda-platform/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cfpb/hmda-platform/teams","hooks_url":"https://api.github.com/repos/cfpb/hmda-platform/hooks","issue_events_url":"https://api.github.com/repos/cfpb/hmda-platform/issues/events{/number}","events_url":"https://api.github.com/repos/cfpb/hmda-platform/events","assignees_url":"https://api.github.com/repos/cfpb/hmda-platform/assignees{/user}","branches_url":"https://api.github.com/repos/cfpb/hmda-platform/branches{/branch}","tags_url":"https://api.github.com/repos/cfpb/hmda-platform/tags","blobs_url":"https://api.github.com/repos/cfpb/hmda-platform/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cfpb/hmda-platform/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cfpb/hmda-platform/git/refs{/sha}","trees_url":"https://api.github.com/repos/cfpb/hmda-platform/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cfpb/hmda-platform/statuses/{sha}","languages_url":"https://api.github.com/repos/cfpb/hmda-platform/languages","stargazers_url":"https://api.github.com/repos/cfpb/hmda-platform/stargazers","contributors_url":"https://api.github.com/repos/cfpb/hmda-platform/contributors","subscribers_url":"https://api.github.com/repos/cfpb/hmda-platform/subscribers","subscription_url":"https://api.github.com/repos/cfpb/hmda-platform/subscription","commits_url":"https://api.github.com/repos/cfpb/hmda-platform/commits{/sha}","git_commits_url":"https://api.github.com/repos/cfpb/hmda-platform/git/commits{/sha}","comments_url":"https://api.github.com/repos/cfpb/hmda-platform/comments{/number}","issue_comment_url":"https://api.github.com/repos/cfpb/hmda-platform/issues/comments{/number}","contents_url":"https://api.github.com/repos/cfpb/hmda-platform/contents/{+path}","compare_url":"https://api.github.com/repos/cfpb/hmda-platform/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cfpb/hmda-platform/merges","archive_url":"https://api.github.com/repos/cfpb/hmda-platform/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cfpb/hmda-platform/downloads","issues_url":"https://api.github.com/repos/cfpb/hmda-platform/issues{/number}","pulls_url":"https://api.github.com/repos/cfpb/hmda-platform/pulls{/number}","milestones_url":"https://api.github.com/repos/cfpb/hmda-platform/milestones{/number}","notifications_url":"https://api.github.com/repos/cfpb/hmda-platform/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cfpb/hmda-platform/labels{/name}","releases_url":"https://api.github.com/repos/cfpb/hmda-platform/releases{/id}","deployments_url":"https://api.github.com/repos/cfpb/hmda-platform/deployments","created_at":"2016-01-21T22:39:17Z","updated_at":"2016-08-03T19:57:25Z","pushed_at":"2016-08-09T12:59:31Z","git_url":"git://github.com/cfpb/hmda-platform.git","ssh_url":"git@github.com:cfpb/hmda-platform.git","clone_url":"https://github.com/cfpb/hmda-platform.git","svn_url":"https://github.com/cfpb/hmda-platform","homepage":"","size":6031,"stargazers_count":5,"watchers_count":5,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":120,"forks":9,"open_issues":120,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486"},"html":{"href":"https://github.com/cfpb/hmda-platform/pull/486"},"issue":{"href":"https://api.github.com/repos/cfpb/hmda-platform/issues/486"},"comments":{"href":"https://api.github.com/repos/cfpb/hmda-platform/issues/486/comments"},"review_comments":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486/comments"},"review_comment":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cfpb/hmda-platform/pulls/486/commits"},"statuses":{"href":"https://api.github.com/repos/cfpb/hmda-platform/statuses/1b55136528f6d5e0166807e056cb44ebe1a18488"}}}}
{"actor":{"display_login":"Kibrael"}}