This PR makes a number of different tweaks to our dbt tests following review from other teams (#308):
Refactor the tests that check for class codes in pardat to ensure that they filter for residential parcels only using a new generic test called res_class_matches_pardat
Expand the list of accepted values for a number of characteristics:
Exterior walls: 1,2,3,4,6,7,8,9
Basement type: 1,2.3,4,5,6,7
Basement finish: 1,2,3,4,5,6
Attic type: 1,2,3,4,5
Garage size: 1-10
Add tests to ensure that new calculated occupancy and proration fields are not 0
Add a test to fail any records in asmt_all that have a rolltype of RR
Update the description for nbhd must be contained in town_nbhd test to make the purpose of the test clearer
Update address tests to check against legdat instead of owndat
Add tests to ensure entries in legdat with missing addresses have at least a 0 in address number and a municipality
Add test to ensure that 234s have partial finished basements
A couple to-do items from the issue still remain:
I haven't yet figured out how to test that addn.value matches asmt_all.tot30 when addn.lline > 0. The required join between these two tables is just too complex for my current understanding of the data model. If you know how to do it I'd be happy to add that test as part of this PR, and otherwise I'm going to spin it out into a separate issue and work with Mirella to clarify exactly how best to perform the join.
I'm still waiting to hear back from Ray about what "no minor classes on PINs where there's a major class component" means, but I don't want that to hold up this PR
This PR makes a number of different tweaks to our dbt tests following review from other teams (#308):
pardat
to ensure that they filter for residential parcels only using a new generic test calledres_class_matches_pardat
asmt_all
that have a rolltype ofRR
nbhd must be contained in town_nbhd
test to make the purpose of the test clearerlegdat
instead ofowndat
legdat
with missing addresses have at least a 0 in address number and a municipalityA couple to-do items from the issue still remain:
addn.value
matchesasmt_all.tot30
whenaddn.lline > 0
. The required join between these two tables is just too complex for my current understanding of the data model. If you know how to do it I'd be happy to add that test as part of this PR, and otherwise I'm going to spin it out into a separate issue and work with Mirella to clarify exactly how best to perform the join.Connects https://github.com/ccao-data/data-architecture/issues/308.