Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apply unit conversion to extra data #4496

Merged
merged 23 commits into from
Feb 27, 2024
Merged

Conversation

perryr16
Copy link
Contributor

@perryr16 perryr16 commented Jan 19, 2024

Any background context you want to provide?

There are 4 different data types outside the normal float, int, string... These are eui, area, ghg, and ghg_intensity. PropertyState fields associated with these four types are given a pint unit and saved in the db as <Quantity (value, 'unit')>. Before displaying values on the Inventory List table the quantity values are converted based on org display unit settings.

Extra data fields are not given a pint unit and are saved in whatever format they were imported as (string or number). Because they don't have pint units they are ignored when the unit conversion takes place allowing data to be misrepresented.

What's this PR do?

Adds a pint unit to extra data columns that have been assigned a data type in column settings.

How should this be manually tested?

  • upload property data with both canonical area columns and extra data area columns (or eui, ghg, ghg_intensity)
  • on column settings change the data type of the extra area field to area
  • on org settings, change the default display units of area from ft2 to m2
  • ensure inventory list values are updated (this should also be visible on the mapping page of the import process)

What are the relevant tickets?

#4494

Screenshots (if appropriate)

Inventory List
Screenshot 2024-01-19 at 2 54 58 PM
Screenshot 2024-01-19 at 2 54 37 PM

Mapping Screen
Screenshot 2024-01-19 at 3 39 06 PM
Screenshot 2024-01-19 at 3 38 11 PM

@perryr16
Copy link
Contributor Author

Timing note:
properties /filter endpoint timing on develop: ~0.8 s
properties /filter endpoint with new changes: ~1.0 s

@perryr16 perryr16 marked this pull request as ready for review January 23, 2024 16:50
@perryr16 perryr16 requested a review from kflemin February 6, 2024 20:57
@kflemin kflemin merged commit 79f1575 into develop Feb 27, 2024
8 checks passed
@kflemin kflemin deleted the 4494-exta-data-unit-conversion branch February 27, 2024 20:47
axelstudios added a commit that referenced this pull request Mar 9, 2024
* Reject import file if it contains braces (#4537)

reject import file if it contains braces

* Update default dates on data quality rules (#4538)

* new default dates for dq rules

* make year dynamic

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Apply unit conversion to extra data (#4496)

* eeej small files

* option 1

* precommit

* revert

* apply optional units to serialized properties

* precommit

* import unit lookup and apply to mapping

* precommit

* formatting

* taxlots

* precommit

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Fix unit conversion for non numeric values (#4555)

* guard against none

* guard against all exceptions

* more robust type checking

* db patterns

* Fixed several issues with tests

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Update GitHub Actions for Node v20 (#4550)

* squash AH migrations

* Fixed precommit issues

* Added missing run_python code to AH migrations

* Improve AH migration performance

* Additional performance improvements

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>
axelstudios added a commit that referenced this pull request Mar 14, 2024
* Init Accountability Hierarchy (#4068)

* Init Accountibilty Hiarchary

* Clean up

* Fix tests

* Fix tests

* Fix tests

* Fix max depth test

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* AH test case class, decorator, and compliance_metric tests (#4108)

* start of perm test

* fix factories

* add new ALI test helpers and decorator, fix compliance_metric tests

* add decorator to update and destroy endpoints

* cleanup

* small fixes

* Default to root in fake property

* add ali tests for compliance-metric update and delete endpoints

* Fix isort

---------

Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add Permisions for DataLoggerViewSet (#4099)

* Add Permisions for DataLoggerViewSet

* Clean merge

* Add AH Permissions to MeterViewSet (#4116)

* Add AH Permissions to MeterViewSet

* Fix test

* Add AH Permissions to Scenarios (#4115)

* Import ah from file (#4061)

* css updates

* start of upload access level instances file

* process access level instances from file

* add test and edit access level capabilities

* cleanup

* ran translation scripts

* cleanup print statements!!

* error when headers are missing and check for blank cells in import

* updates to support bad files and additional access levels

* Add permissions to CycleViewSet (#4118)

* Add permissions to CycleViewSet

* Use permissions

* Apply suggestions from code review

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to ColumnListProfileViewSet (#4121)

* Add permissions to ColumnListProfileViewSet

* Update seed/tests/test_column_list_profiles_views.py

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add Permissions to ColumnViewSet (#4119)

* Add Permissions to ColumnViewSet

* Fix other tests

* Update seed/tests/test_column_views.py

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Accountability Hierarchy Page Formatting (#4067)

* wip not working accordion tree

* working tree

* Add permissions to FilterGroup (#4129)

* Fix FilterGroup Tests

* Ah permissions/import file view set (#4126)

* Add Ah to import process

* Add Permissions to ImportFileViewSet

* Apply suggestions from code review

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Fix typo

* Enforce inclusion of root

* Add new case

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to DataViewViewSet (#4131)

* Ah bug fixes (#4138)

* update typos; fix ali dropdown in new member modal

* display ali in top right of app

* fix tests

* Fix

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add aln contraints (#4134)

* Add aln contraints

* Fix

* Fix

* Add permissions to DerivedColumnViewSet (#4140)

* Add permissions to DerivedColumnViewSet

* fix comments

* Fix ali rename (#4141)

* Add access level instance visualisation to inventory list and detail (#4133)

* add ali serializer into to property serailizer

* ali table on inv det

* display ali on inv list

* basic filtering on ALI

* refactor

* sorting functional with errors

* filtering on !=

* functional but needs refactoring

* basic filter testing for alis

* refactor the filter expression logic for clarity

* show hide alis on inv list

* update ali pinning levels

* update tests for sorting

* test empty annotations

* precommit

* Update seed/models/tax_lot_properties.py

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* refactor for alns with spaces

* precommit

* mypy fix

* precommit

* add inventory_type as argument to accomodate p/tl

* test for taxlot ali filter

* Update seed/utils/inventory_filter.py

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* cleanup

* remove org key form ali path on inv detail

* guard for tests

* guard against undefined

* simplify ali path

* precommit

* remove alis from current columns

* developer note

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add permissions to ColumnMappingProfileViewSet (#4127)

* Add permissions to ColumnMappingProfileViewSet

* Loosen permissions

* Ah/fix tests (#4182)

* Fix Tests

* Format

* Remove print

* Add permission LabelViewSet (#4163)

* Clean

* Add AH Permissions to PropertyViewSet (#4157)

* Add AH Permissions to PropertyViewSet

* Permission tests for salesforce workflow (#4161)

* adding permission tests for salesforce workflow

* fix tests

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to MeterReadingViewSet (#4193)

* Add permissions to datasetviewset (#4189)

* Add permissions to PropertyMeasuresViewSet (#4183)

* Add permissions to PropertyMesauresViewSet

* Fix frontend

* Ah permissions/note view set (#4191)

* WIP

* Fix for taxlot

* Delete test_green_assessments.py

* Fix

* Add access level name/ column display name constraints (#4171)

* Ah permissions/green assessments view sets (#4194)

* Add permissions to GreenAssessmentViewSet

* Add permissions to GreenAssessmentURLViewSet

* Add permissions to GreenAssessmentPropertyViewSet

* Ah/disallow nonroot owners (#4196)

* Disallow non root owners

* Fix typo

* Add permissions to postofficeviewset (#4201)

* Fix loading ALI to be foreground task only (#4230)

* WIP

* WIP

* remove background task when loading ALI data

* additional fixes to restore functionality

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Ah permissions/salesforce (#4204)

Make salesforce owner only

* Ah permissions/analysis view set (#4224)

* Add Analysis permissions

* Give permissions to analysis message and views

* Clean

* Add TaxLotProperty constraints (#4212)

* Add Permissions to GBRPropertyViewSet (#4205)

* Add Permissions to GBRPropertyViewSet

* Clean

* Add permissions to some org endpoints (#4216)

* Add permissions to some org endpoints

* Fix test?

* Add permissions to TaxlotViewSet (#4162)

* Add AH Permissions to PropertyViewSet

* Add permissions to TaxlotViewSet

* Fix merge

* Clean

* Fix test?

* Remove test

* Add permissions to Taxlot Properties (#4234)

* Add permissions to GeocodeViewSet (#4241)

* Add more Permissions (#4248)

* Add permissions to LabelInventoryViewSet (#4246)

* Ah/import frontend (#4170)

* Add ah info to import front end

* Fix

* Clean

* Fix tests

* Fix user creation bug (#4235)

* http request type

* user creation updates

* superuser page to have dynamic ali selection

* precommit

* style

* unused property

* naming

* update tests:

* update tests

* new user role is owner not member

* Renumber migrations

* Lint fixes

* Ah fix analysis list (#4285)

Fix list analysis?

* Build docker container for accountability branch (#4283)

* build docker container for AH

* build docker container for AH

* Fix tests (#4303)

* Fix tests

* Fix more tests

* Add option to delete alis (#4284)

* Add option to delete alis

* Add delete AL button

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* update modal step ID (#4289)

* Remove unauthorized items from + menu for lower-level users (#4290)

* update modal step ID

* remove options from + menu for non-root users

* Permission UploadViewSet (#4297)

* Permission UploadViewSet

* Fix

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Add Permissions to TaxlotViewViewSet (#4298)

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Display error message on failed invite (#4370)

display error message on failed invite

* Ah permissions/ubid view set (#4302)

* get and create tested

* destroy tested

* update existing tests

* test decode by ids

* test ubid list endpoint

* test ubid decode_results endpoint

* test ubids by view and add taxlot testing

* remove unused args

* precommit

* formatting

* update tests

* filter over decorate

* precommit

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Fix upload (#4392)

* Disallow nonroot user from CUD column list profile (#4271)

* Disallow nonroot user from CUD column list profile

* Throw on a couple more

* Fix test

* Squash migrations (#4395)

* Test disallow nonroot users to create columns (#4394)

* Clean up _column_fields_to_columns

* Disallow column creation while mapping data

* Disallow column creation while mapping data

* add access_level_names to fake org

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>

* Fix analysis bug (#4383)

* 4137 fix anl error message (#4417)

* 4137 Fix anl error message

* Update message

* Remove hannahs docker images

* Fix ali tree permissions (#4435)

* Fix ali tree permissions

* Filter tree names

* Include ancestors

* Add permissions to BuildingFile (#4443)

* Add permissions to BuildingFile

* Fix test

* FIx 4450 (#4451)

* Fix ah import messages (#4445)

* Fix ah import messages

* Remove old function

* Fix Tests (#4457)

* Fix column names errors (#4455)

* Fix test

* UX updates - access tree view updates (#4486)

* update UX for access level tree setup

* fix 0-based levels in modal

* Update ALI table on inventory details page (#4489)

update ali table on ininv details page

* Enable force ali delete (#4492)

* Enable force ali delete

* style the warning

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* AH - update dialog text on Upload ALIs modal and collapse help section by default (#4493)

* hide cycle msg on modal for ali import

* default access tree help section to collapsed

* update import access levels dialog text

* AH UI Fixes for access level modals (#4501)

* ah ui fixes

* Small fixes

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Add Cross Cycle Tabular View for Portfolio Summary Goals (#4440)

* import data review frontend

* filter for ALI properties

* naming

* data review controller

* starting labels functional

* displaying labels by property not property_view

* dynamically add starting and ending labels

* formatting

* ending style

* styles

* rename data review to portfolio summary

* reorganize - functional

* pm property id sorted as number

* endpoint for summary stats

* change starting ending to baseline current

* debugging

* loading for both tables

* refactor for faster load times

* returning 100 matching properties

* pagination working, sorting not

* sorting working on cannonical columns

* ali as an argument for get properties

* portfolio endpoint using ali argument

* change site_eui for source_eui with prefered order for summary

* generic eui display

* formatting

* list endpoints for goal db table

* goal delete tested

* goal create tested

* update endpoint and decorators for standard endpoints

* goal crud tested

* begin development on portfolio_summary endpoint

* portfolio_summary endpoint

* reusing filter endpoint for second cycle property call

* imports

* base for goal modal

* update column validation

* create endpoint from frontned

* goal serializes level name, delete and list integrated into frontend modal

* update goal via modal

* troubleshooting org ownership

* functional goal select, needs refactoring

* reformat goal details display

* reformat goal details display

* goal passed between parent page and child modal

* guard against organization mismatches

* cleanup, using backend logic  over frontend logic

* filtering on cycle_sqft and cycle_eui

* on modal close

* portfolio summary with extra data

* save sort and filters

* display goal errors

* allow filtering one one cycle column at a time

* extra data tested

* precommit

* cleanup

* no goals and error display

* remove restricted level names

* oneline

* formatting

* column ids over profile and initialize columns refactor

* protect against null values in summary

* label click bug

* dc's cannot be filtered or sorted

* clarify naming

* export current page to csv

* precommit

* toast notifications on save and delete

* rename goal column to eui_column

* add area column selection to goal

* add units and unit conversion - still fails with extra data

* guard against none values for kbtu and area

* migration order

* provide links to update column in column settings

* precommit

* precommit

* added help text and translations

* visibility issues, sorting, info text

* phrasing

* units

* precommit

* type check

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* AH - Fix label creation UI (#4510)

* fix add label modal

* remove duplicate ngif

* Hierarchy tree/modal improvements (#4515)

Fixed several issues with the AH tree and modals

* Restrict leaf user permissions for goals (#4512)

* add user.is_ali_leaf

* remove frontend permissions for leaves

* decorator to deny leaf user permissions

* precommit

* cleanup

* Add year built to goal table (#4514)

* add year built to table

* prefer non-null values for cross cycle columns

* Set default property if goal property is undefined (#4516)

set default if property is undefined

* Ah/fix ali assignment (#4517)

* AH refinements and bug fixes

* cleanup

* Hierarchy data type improvements (#4518)

* Optimized ali help image

* Lint fixes

* Fixed is_ali_root/is_ali_leaf data types

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Rename goal detail headers (#4520)

naming

* Add Permissions to PropertyViewSet (#4202)

* Add Permissions to PropertyViewSet

* fix test

* fix failing test

* Fix test

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Enable background progress for uploading AH levels (#4522)

Enable background processing and progress for the hierarchy levels upload

* Disallow manual merge of records with different alis (#4495)

* Disallow manual merge of records with different alis

* Fix error catch

* Does match merge link records with different alis

* Disallow merge of records with different alis

* Disallow merges that cause bad links

* Disallow  match merge link records with different ali

* Disallow updates that cause bad merges and links

* Handle ali links during import (#4519)

* Make match_merge_link take state

* Change link_views to link_states

* Communicate links in import process

* WIP

* Fix function name

* reorder migrations
migration order

* Mypy fixes

* Fix test_unicode_matching test

* AH - display matching criteria warning when user uploads data to the org for the first time (#4540)

* add deprecation warning

* add matching criteria warning on data upload modal

* display column settings link when user has owner permissions

* restores seed/utils/inventory_filter.py

* add ci to ah/develop

* update tests

* formatting

* restore test_filter_groups.py

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>

* AH - Add deprecation warning when user creates a Sub Organization (#4536)

* add deprecation warning

* update translations

* AH - Fix level 1 Access Level display in Inventory Details Page table (#4541)

fix inventory details page access levels table display

* Add notes related to goals (#4532)

* add year built to table

* prefer non-null values for cross cycle columns

* base for goal notes

* goal crd tested

* update tested

* refactor to only permit update

* attatch goal note to property on goal property filter and display

* permissioning

* backfill historical notes

* post save goal to create goal notes

* create historical notes on property creation

* historical note view

* precommit

* access historical notes and refactor ui grid edit cells

* precommit

* migration order

* migration order

* migration order

* update property retrieval

* precommit

* colors

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Fix default report X and Y axis selectors (#4542)

* fix default reports and code duplication in inventory_filter

* fix default dropdown selections

* remove old test

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Delete alis with als (#4543)

* Delete alis with als

* add translation, make label clickable

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Several AH bug fixes (#4546)

Several AH fixes

* Handle empty cycles on portfolio summary (#4554)

* refactors for empty cycles

* precommit

* documentation

* formatting

* documentation

* documentation

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* AH - Revise analysis permissions for creating columns (#4551)

* update analyses to only create columns for root owner

* update to allow root owners and members to create analysis columns

* restore co2 analysis modal

* fix test

* make can_create a method on analysis class

* tox

* fix test

* can_create function call

* Allow change of ali (#4552)

* Allow change of ali

* update tests

* fix typo

* chain user updates

* fix test

* precommit

* update tests

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* review viewer permissions (#4556)

* review viewer permissions

* update ubid create ali arg

* Fix note permissions

* pass menu object in notes modal

* Fixed notes permissions for viewers

* pin left permission for viewers

* Fixed column list settings permissions for viewers

* De-duplicated users list code

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Disallow changing nonroot users to owner (#4545)

* Disallow changing nonroot users to owner

* Fix new member modal

* update tests

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>

* Fix portfolio summary editable cells (#4557)

* refactor editable cell permissions

* precommit

* 2nd filter also contains goal note details

* Permission (#4378)

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Squash Accountability Hierarchy Migrations (#4560)

* Reject import file if it contains braces (#4537)

reject import file if it contains braces

* Update default dates on data quality rules (#4538)

* new default dates for dq rules

* make year dynamic

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Apply unit conversion to extra data (#4496)

* eeej small files

* option 1

* precommit

* revert

* apply optional units to serialized properties

* precommit

* import unit lookup and apply to mapping

* precommit

* formatting

* taxlots

* precommit

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Fix unit conversion for non numeric values (#4555)

* guard against none

* guard against all exceptions

* more robust type checking

* db patterns

* Fixed several issues with tests

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Update GitHub Actions for Node v20 (#4550)

* squash AH migrations

* Fixed precommit issues

* Added missing run_python code to AH migrations

* Improve AH migration performance

* Additional performance improvements

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Fixed typos (#4564)

* Fixed historical note backfilling

* Fix portfolio summary layout (#4566)

* Several miscellaneous fixes

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>
Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
dhaley pushed a commit that referenced this pull request Mar 18, 2024
* Init Accountability Hierarchy (#4068)

* Init Accountibilty Hiarchary

* Clean up

* Fix tests

* Fix tests

* Fix tests

* Fix max depth test

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* AH test case class, decorator, and compliance_metric tests (#4108)

* start of perm test

* fix factories

* add new ALI test helpers and decorator, fix compliance_metric tests

* add decorator to update and destroy endpoints

* cleanup

* small fixes

* Default to root in fake property

* add ali tests for compliance-metric update and delete endpoints

* Fix isort

---------

Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add Permisions for DataLoggerViewSet (#4099)

* Add Permisions for DataLoggerViewSet

* Clean merge

* Add AH Permissions to MeterViewSet (#4116)

* Add AH Permissions to MeterViewSet

* Fix test

* Add AH Permissions to Scenarios (#4115)

* Import ah from file (#4061)

* css updates

* start of upload access level instances file

* process access level instances from file

* add test and edit access level capabilities

* cleanup

* ran translation scripts

* cleanup print statements!!

* error when headers are missing and check for blank cells in import

* updates to support bad files and additional access levels

* Add permissions to CycleViewSet (#4118)

* Add permissions to CycleViewSet

* Use permissions

* Apply suggestions from code review

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to ColumnListProfileViewSet (#4121)

* Add permissions to ColumnListProfileViewSet

* Update seed/tests/test_column_list_profiles_views.py

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add Permissions to ColumnViewSet (#4119)

* Add Permissions to ColumnViewSet

* Fix other tests

* Update seed/tests/test_column_views.py

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Accountability Hierarchy Page Formatting (#4067)

* wip not working accordion tree

* working tree

* Add permissions to FilterGroup (#4129)

* Fix FilterGroup Tests

* Ah permissions/import file view set (#4126)

* Add Ah to import process

* Add Permissions to ImportFileViewSet

* Apply suggestions from code review

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Fix typo

* Enforce inclusion of root

* Add new case

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to DataViewViewSet (#4131)

* Ah bug fixes (#4138)

* update typos; fix ali dropdown in new member modal

* display ali in top right of app

* fix tests

* Fix

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add aln contraints (#4134)

* Add aln contraints

* Fix

* Fix

* Add permissions to DerivedColumnViewSet (#4140)

* Add permissions to DerivedColumnViewSet

* fix comments

* Fix ali rename (#4141)

* Add access level instance visualisation to inventory list and detail (#4133)

* add ali serializer into to property serailizer

* ali table on inv det

* display ali on inv list

* basic filtering on ALI

* refactor

* sorting functional with errors

* filtering on !=

* functional but needs refactoring

* basic filter testing for alis

* refactor the filter expression logic for clarity

* show hide alis on inv list

* update ali pinning levels

* update tests for sorting

* test empty annotations

* precommit

* Update seed/models/tax_lot_properties.py

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* refactor for alns with spaces

* precommit

* mypy fix

* precommit

* add inventory_type as argument to accomodate p/tl

* test for taxlot ali filter

* Update seed/utils/inventory_filter.py

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* cleanup

* remove org key form ali path on inv detail

* guard for tests

* guard against undefined

* simplify ali path

* precommit

* remove alis from current columns

* developer note

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Add permissions to ColumnMappingProfileViewSet (#4127)

* Add permissions to ColumnMappingProfileViewSet

* Loosen permissions

* Ah/fix tests (#4182)

* Fix Tests

* Format

* Remove print

* Add permission LabelViewSet (#4163)

* Clean

* Add AH Permissions to PropertyViewSet (#4157)

* Add AH Permissions to PropertyViewSet

* Permission tests for salesforce workflow (#4161)

* adding permission tests for salesforce workflow

* fix tests

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Add permissions to MeterReadingViewSet (#4193)

* Add permissions to datasetviewset (#4189)

* Add permissions to PropertyMeasuresViewSet (#4183)

* Add permissions to PropertyMesauresViewSet

* Fix frontend

* Ah permissions/note view set (#4191)

* WIP

* Fix for taxlot

* Delete test_green_assessments.py

* Fix

* Add access level name/ column display name constraints (#4171)

* Ah permissions/green assessments view sets (#4194)

* Add permissions to GreenAssessmentViewSet

* Add permissions to GreenAssessmentURLViewSet

* Add permissions to GreenAssessmentPropertyViewSet

* Ah/disallow nonroot owners (#4196)

* Disallow non root owners

* Fix typo

* Add permissions to postofficeviewset (#4201)

* Fix loading ALI to be foreground task only (#4230)

* WIP

* WIP

* remove background task when loading ALI data

* additional fixes to restore functionality

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Ah permissions/salesforce (#4204)

Make salesforce owner only

* Ah permissions/analysis view set (#4224)

* Add Analysis permissions

* Give permissions to analysis message and views

* Clean

* Add TaxLotProperty constraints (#4212)

* Add Permissions to GBRPropertyViewSet (#4205)

* Add Permissions to GBRPropertyViewSet

* Clean

* Add permissions to some org endpoints (#4216)

* Add permissions to some org endpoints

* Fix test?

* Add permissions to TaxlotViewSet (#4162)

* Add AH Permissions to PropertyViewSet

* Add permissions to TaxlotViewSet

* Fix merge

* Clean

* Fix test?

* Remove test

* Add permissions to Taxlot Properties (#4234)

* Add permissions to GeocodeViewSet (#4241)

* Add more Permissions (#4248)

* Add permissions to LabelInventoryViewSet (#4246)

* Ah/import frontend (#4170)

* Add ah info to import front end

* Fix

* Clean

* Fix tests

* Fix user creation bug (#4235)

* http request type

* user creation updates

* superuser page to have dynamic ali selection

* precommit

* style

* unused property

* naming

* update tests:

* update tests

* new user role is owner not member

* Renumber migrations

* Lint fixes

* Ah fix analysis list (#4285)

Fix list analysis?

* Build docker container for accountability branch (#4283)

* build docker container for AH

* build docker container for AH

* Fix tests (#4303)

* Fix tests

* Fix more tests

* Add option to delete alis (#4284)

* Add option to delete alis

* Add delete AL button

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* update modal step ID (#4289)

* Remove unauthorized items from + menu for lower-level users (#4290)

* update modal step ID

* remove options from + menu for non-root users

* Permission UploadViewSet (#4297)

* Permission UploadViewSet

* Fix

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Add Permissions to TaxlotViewViewSet (#4298)

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Display error message on failed invite (#4370)

display error message on failed invite

* Ah permissions/ubid view set (#4302)

* get and create tested

* destroy tested

* update existing tests

* test decode by ids

* test ubid list endpoint

* test ubid decode_results endpoint

* test ubids by view and add taxlot testing

* remove unused args

* precommit

* formatting

* update tests

* filter over decorate

* precommit

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Fix upload (#4392)

* Disallow nonroot user from CUD column list profile (#4271)

* Disallow nonroot user from CUD column list profile

* Throw on a couple more

* Fix test

* Squash migrations (#4395)

* Test disallow nonroot users to create columns (#4394)

* Clean up _column_fields_to_columns

* Disallow column creation while mapping data

* Disallow column creation while mapping data

* add access_level_names to fake org

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>

* Fix analysis bug (#4383)

* 4137 fix anl error message (#4417)

* 4137 Fix anl error message

* Update message

* Remove hannahs docker images

* Fix ali tree permissions (#4435)

* Fix ali tree permissions

* Filter tree names

* Include ancestors

* Add permissions to BuildingFile (#4443)

* Add permissions to BuildingFile

* Fix test

* FIx 4450 (#4451)

* Fix ah import messages (#4445)

* Fix ah import messages

* Remove old function

* Fix Tests (#4457)

* Fix column names errors (#4455)

* Fix test

* UX updates - access tree view updates (#4486)

* update UX for access level tree setup

* fix 0-based levels in modal

* Update ALI table on inventory details page (#4489)

update ali table on ininv details page

* Enable force ali delete (#4492)

* Enable force ali delete

* style the warning

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* AH - update dialog text on Upload ALIs modal and collapse help section by default (#4493)

* hide cycle msg on modal for ali import

* default access tree help section to collapsed

* update import access levels dialog text

* AH UI Fixes for access level modals (#4501)

* ah ui fixes

* Small fixes

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Add Cross Cycle Tabular View for Portfolio Summary Goals (#4440)

* import data review frontend

* filter for ALI properties

* naming

* data review controller

* starting labels functional

* displaying labels by property not property_view

* dynamically add starting and ending labels

* formatting

* ending style

* styles

* rename data review to portfolio summary

* reorganize - functional

* pm property id sorted as number

* endpoint for summary stats

* change starting ending to baseline current

* debugging

* loading for both tables

* refactor for faster load times

* returning 100 matching properties

* pagination working, sorting not

* sorting working on cannonical columns

* ali as an argument for get properties

* portfolio endpoint using ali argument

* change site_eui for source_eui with prefered order for summary

* generic eui display

* formatting

* list endpoints for goal db table

* goal delete tested

* goal create tested

* update endpoint and decorators for standard endpoints

* goal crud tested

* begin development on portfolio_summary endpoint

* portfolio_summary endpoint

* reusing filter endpoint for second cycle property call

* imports

* base for goal modal

* update column validation

* create endpoint from frontned

* goal serializes level name, delete and list integrated into frontend modal

* update goal via modal

* troubleshooting org ownership

* functional goal select, needs refactoring

* reformat goal details display

* reformat goal details display

* goal passed between parent page and child modal

* guard against organization mismatches

* cleanup, using backend logic  over frontend logic

* filtering on cycle_sqft and cycle_eui

* on modal close

* portfolio summary with extra data

* save sort and filters

* display goal errors

* allow filtering one one cycle column at a time

* extra data tested

* precommit

* cleanup

* no goals and error display

* remove restricted level names

* oneline

* formatting

* column ids over profile and initialize columns refactor

* protect against null values in summary

* label click bug

* dc's cannot be filtered or sorted

* clarify naming

* export current page to csv

* precommit

* toast notifications on save and delete

* rename goal column to eui_column

* add area column selection to goal

* add units and unit conversion - still fails with extra data

* guard against none values for kbtu and area

* migration order

* provide links to update column in column settings

* precommit

* precommit

* added help text and translations

* visibility issues, sorting, info text

* phrasing

* units

* precommit

* type check

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* AH - Fix label creation UI (#4510)

* fix add label modal

* remove duplicate ngif

* Hierarchy tree/modal improvements (#4515)

Fixed several issues with the AH tree and modals

* Restrict leaf user permissions for goals (#4512)

* add user.is_ali_leaf

* remove frontend permissions for leaves

* decorator to deny leaf user permissions

* precommit

* cleanup

* Add year built to goal table (#4514)

* add year built to table

* prefer non-null values for cross cycle columns

* Set default property if goal property is undefined (#4516)

set default if property is undefined

* Ah/fix ali assignment (#4517)

* AH refinements and bug fixes

* cleanup

* Hierarchy data type improvements (#4518)

* Optimized ali help image

* Lint fixes

* Fixed is_ali_root/is_ali_leaf data types

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Rename goal detail headers (#4520)

naming

* Add Permissions to PropertyViewSet (#4202)

* Add Permissions to PropertyViewSet

* fix test

* fix failing test

* Fix test

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Enable background progress for uploading AH levels (#4522)

Enable background processing and progress for the hierarchy levels upload

* Disallow manual merge of records with different alis (#4495)

* Disallow manual merge of records with different alis

* Fix error catch

* Does match merge link records with different alis

* Disallow merge of records with different alis

* Disallow merges that cause bad links

* Disallow  match merge link records with different ali

* Disallow updates that cause bad merges and links

* Handle ali links during import (#4519)

* Make match_merge_link take state

* Change link_views to link_states

* Communicate links in import process

* WIP

* Fix function name

* reorder migrations
migration order

* Mypy fixes

* Fix test_unicode_matching test

* AH - display matching criteria warning when user uploads data to the org for the first time (#4540)

* add deprecation warning

* add matching criteria warning on data upload modal

* display column settings link when user has owner permissions

* restores seed/utils/inventory_filter.py

* add ci to ah/develop

* update tests

* formatting

* restore test_filter_groups.py

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>

* AH - Add deprecation warning when user creates a Sub Organization (#4536)

* add deprecation warning

* update translations

* AH - Fix level 1 Access Level display in Inventory Details Page table (#4541)

fix inventory details page access levels table display

* Add notes related to goals (#4532)

* add year built to table

* prefer non-null values for cross cycle columns

* base for goal notes

* goal crd tested

* update tested

* refactor to only permit update

* attatch goal note to property on goal property filter and display

* permissioning

* backfill historical notes

* post save goal to create goal notes

* create historical notes on property creation

* historical note view

* precommit

* access historical notes and refactor ui grid edit cells

* precommit

* migration order

* migration order

* migration order

* update property retrieval

* precommit

* colors

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Fix default report X and Y axis selectors (#4542)

* fix default reports and code duplication in inventory_filter

* fix default dropdown selections

* remove old test

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* Delete alis with als (#4543)

* Delete alis with als

* add translation, make label clickable

---------

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Several AH bug fixes (#4546)

Several AH fixes

* Handle empty cycles on portfolio summary (#4554)

* refactors for empty cycles

* precommit

* documentation

* formatting

* documentation

* documentation

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>

* AH - Revise analysis permissions for creating columns (#4551)

* update analyses to only create columns for root owner

* update to allow root owners and members to create analysis columns

* restore co2 analysis modal

* fix test

* make can_create a method on analysis class

* tox

* fix test

* can_create function call

* Allow change of ali (#4552)

* Allow change of ali

* update tests

* fix typo

* chain user updates

* fix test

* precommit

* update tests

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* review viewer permissions (#4556)

* review viewer permissions

* update ubid create ali arg

* Fix note permissions

* pass menu object in notes modal

* Fixed notes permissions for viewers

* pin left permission for viewers

* Fixed column list settings permissions for viewers

* De-duplicated users list code

---------

Co-authored-by: Hannah Eslinger <heslinge@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Disallow changing nonroot users to owner (#4545)

* Disallow changing nonroot users to owner

* Fix new member modal

* update tests

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>

* Fix portfolio summary editable cells (#4557)

* refactor editable cell permissions

* precommit

* 2nd filter also contains goal note details

* Permission (#4378)

Co-authored-by: kflemin <2205659+kflemin@users.noreply.github.com>

* Squash Accountability Hierarchy Migrations (#4560)

* Reject import file if it contains braces (#4537)

reject import file if it contains braces

* Update default dates on data quality rules (#4538)

* new default dates for dq rules

* make year dynamic

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Apply unit conversion to extra data (#4496)

* eeej small files

* option 1

* precommit

* revert

* apply optional units to serialized properties

* precommit

* import unit lookup and apply to mapping

* precommit

* formatting

* taxlots

* precommit

---------

Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>

* Fix unit conversion for non numeric values (#4555)

* guard against none

* guard against all exceptions

* more robust type checking

* db patterns

* Fixed several issues with tests

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Update GitHub Actions for Node v20 (#4550)

* squash AH migrations

* Fixed precommit issues

* Added missing run_python code to AH migrations

* Improve AH migration performance

* Additional performance improvements

---------

Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>

* Fixed typos (#4564)

* Fixed historical note backfilling

* Fix portfolio summary layout (#4566)

* Several miscellaneous fixes

---------

Co-authored-by: Alex Swindler <Alex.Swindler@nrel.gov>
Co-authored-by: Katherine Fleming <2205659+kflemin@users.noreply.github.com>
Co-authored-by: Nicholas Long <nicholas.long@nrel.gov>
Co-authored-by: Ross Perry <perryr16@gmail.com>
Co-authored-by: Nicholas Long <1907354+nllong@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants