Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
There were a number of issues with the current UBID implementation
UBID was not considered when linking across cycles
If UBID was None it was discarded from the matching criteria. This it caused incorrect merging of properties. For reference, when other matching criteria is None it is not discarded.
UBID history was not preserved if a property with 2 UBIDs separated by a ';' was imported on top of existing properties.
UBID threshold lower limit was 0. This would allow matches to any UBID, defeating the purpose of it as a matching criterion.
What's this PR do?
Adds UBID jaccard checking to the linking step.
If incoming or existing UBID is None, it will not be discarded as matching criteria and be returned as "not a match".
Preserves UBID history if imported file has multiple UBIDs per row.
Limits UBID threshold to 0.0001 to 0.1
Removes UBID as a default matching field
How should this be manually tested?
The following are sample files that may make testing simpler. The table matches the contents of the file with the suffix '_0'. The other files are identical except for their UBIDs: in file '_1' the UBIDs end with '1', in file '_none' the UBIDs are blank, and in file '_2ubids' each property has 2 UBIDs separated by ';' (85FPPRRG+5V-0-0-0-0;85FPPRRG+5V-0-0-0-5)
2props_ubids_0.xlsx2props_ubids_1.xlsx2props_ubids_none.xlsx2props_2ubids.xlsx
_2props_ubids0.xlsx
PM Property ID
Property Name
UBID
Street Address
Site EUI
1001
NREL CAFE
85FPPRRG+5V-0-0-0-0
15459-15593 Denver W Pkwy...
1
1002
NREL FTLB
85FPPRRG+F2-0-0-0-0
15201-15697 Denver W Pkwy...
2
For each of these testing procedures, set a strict UBID threshold (1.0) and make sure matching criteria includes pm_property_id and ubid. It's recommended to remove inventory between tests.
Procedure 1: Testing UBID linking issues
Upload '_0' to cycle 1
Upload '_1' to cycle 2. Ensure these properties are not linked. On develop, they will be linked. The simplest way to check is > inventory detail > cycle dropdown > only current cycle should be listed
Upload '_1' to cycle 1. Ensure properties ending in '_1' are linked across cycles, and properties ending in '_0' only exist in cycle 1. On develop, this will cause an IntegrityError as it attempts to link to multiple properties within a cycle.
Procedure 2: Testing when UBID is None
Upload '_0' to cycle 1
Upload '_1' to cycle 1. Ensure they are not merged
Upload '_none' to cycle 1. Ensure they are not merged. On develop, all three will be merged into a single record.
Procedure 3: Testing with multiple UBIDs
Upload '_0' to cycle 1
Upload '_2ubids' to cycle 1. Ensure the UBID history is preserved in the inventory detail > UBIDs tab. On develop, only the UBID ending with '0' is preserved
Any background context you want to provide?
There were a number of issues with the current UBID implementation
None
it was discarded from the matching criteria. This it caused incorrect merging of properties. For reference, when other matching criteria isNone
it is not discarded.What's this PR do?
None
, it will not be discarded as matching criteria and be returned as "not a match".How should this be manually tested?
The following are sample files that may make testing simpler. The table matches the contents of the file with the suffix '_0'. The other files are identical except for their UBIDs: in file '_1' the UBIDs end with '1', in file '_none' the UBIDs are blank, and in file '_2ubids' each property has 2 UBIDs separated by ';' (85FPPRRG+5V-0-0-0-0;85FPPRRG+5V-0-0-0-5) 2props_ubids_0.xlsx 2props_ubids_1.xlsx 2props_ubids_none.xlsx 2props_2ubids.xlsx
For each of these testing procedures, set a strict UBID threshold (1.0) and make sure matching criteria includes
pm_property_id
andubid
. It's recommended to remove inventory between tests.Procedure 1: Testing UBID linking issues
IntegrityError
as it attempts to link to multiple properties within a cycle.Procedure 2: Testing when UBID is None
Procedure 3: Testing with multiple UBIDs
What are the relevant tickets?
4764
4774
4775
4786
Screenshots (if appropriate)