Skip to content

Commit

Permalink
Accountability Hierarchy (#4186)
Browse files Browse the repository at this point in the history
* Init Accountability Hierarchy (#4068)

* Init Accountibilty Hiarchary

* Clean up

* Fix tests

* Fix tests

* Fix tests

* Fix max depth test

---------

Co-authored-by: Alex Swindler <[email protected]>

* 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 <[email protected]>
Co-authored-by: Hannah Eslinger <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Katherine Fleming <[email protected]>

* Add permissions to ColumnListProfileViewSet (#4121)

* Add permissions to ColumnListProfileViewSet

* Update seed/tests/test_column_list_profiles_views.py

Co-authored-by: Katherine Fleming <[email protected]>

---------

Co-authored-by: Katherine Fleming <[email protected]>

* Add Permissions to ColumnViewSet (#4119)

* Add Permissions to ColumnViewSet

* Fix other tests

* Update seed/tests/test_column_views.py

Co-authored-by: Katherine Fleming <[email protected]>

---------

Co-authored-by: Katherine Fleming <[email protected]>

* 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 <[email protected]>

* Fix typo

* Enforce inclusion of root

* Add new case

---------

Co-authored-by: Katherine Fleming <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

---------

Co-authored-by: Katherine Fleming <[email protected]>

* 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 <[email protected]>
Co-authored-by: kflemin <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Add Permissions to TaxlotViewViewSet (#4298)

Co-authored-by: kflemin <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Ross Perry <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* Delete alis with als (#4543)

* Delete alis with als

* add translation, make label clickable

---------

Co-authored-by: kflemin <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Katherine Fleming <[email protected]>

* 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 <[email protected]>
Co-authored-by: Ross Perry <[email protected]>
Co-authored-by: Alex Swindler <[email protected]>

* Disallow changing nonroot users to owner (#4545)

* Disallow changing nonroot users to owner

* Fix new member modal

* update tests

---------

Co-authored-by: Ross Perry <[email protected]>

* Fix portfolio summary editable cells (#4557)

* refactor editable cell permissions

* precommit

* 2nd filter also contains goal note details

* Permission (#4378)

Co-authored-by: kflemin <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>

* 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 <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Alex Swindler <[email protected]>

* Fixed typos (#4564)

* Fixed historical note backfilling

* Fix portfolio summary layout (#4566)

* Several miscellaneous fixes

---------

Co-authored-by: Alex Swindler <[email protected]>
Co-authored-by: Katherine Fleming <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
Co-authored-by: Ross Perry <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>
  • Loading branch information
6 people authored Mar 14, 2024
1 parent b636c65 commit 211f829
Show file tree
Hide file tree
Showing 267 changed files with 17,884 additions and 1,471 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
branches:
- "develop"
- "main"
- "AH/develop"

jobs:
# Currently GH Actions provides no simple method for "sharing"
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- develop
- AH/develop
tags:
- "*"
workflow_dispatch:
Expand Down Expand Up @@ -43,6 +44,8 @@ jobs:
if [[ ${GITHUB_EVENT_NAME} == "push" ]]; then
if [[ "${GITHUB_REF}" == "refs/heads/develop" ]]; then
SEED_TAG=seedplatform/seed:develop
elif [[ "${GITHUB_REF}" == "refs/heads/AH/develop" ]]; then
SEED_TAG=seedplatform/seed:develop-ah
elif [[ "${GITHUB_REF}" =~ "refs/tags/v" ]]; then
# you can have multiple tags, separated by commas
SEED_TAG=seedplatform/seed:${GITHUB_REF#refs/tags/v},seedplatform/seed:latest
Expand Down
2 changes: 1 addition & 1 deletion config/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@
'crispy_forms', # needed to squash warnings around collectstatic with rest_framework
'post_office',
'django_celery_beat',
'treebeard',
)


Expand Down Expand Up @@ -148,7 +149,6 @@
],
'js': [
'compressor.filters.jsmin.JSMinFilter',
'compressor.filters.yuglify.YUglifyJSFilter',
]
}
STATICFILES_DIRS = [
Expand Down
Binary file modified locale/en_US/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit 211f829

Please sign in to comment.