Skip to content

Commit

Permalink
Release 2.17.1 (#3798)
Browse files Browse the repository at this point in the history
* typos

* Style expot buttons as in mockups

* Switch to created filter group after creation

* Custom Reports: Add 'ghg' and 'ghg_intensity' to 'valid_column_data_types'
Fixes #3567

* Fixed typo

* Revise the error checks to ensure that the actual column is also selected if the target column is selected
Fixes #3571

* Property Insights: Use the same column for the name between hovering over data point and in the table at the bottom
Fixes #3555

* exempt all milestones

* 3331: add r^2 vaules in messages

* bug fix in sidebar

* Toggle cycles for cutom data view

* Final version of the BPS sample data files

* Use the same color for each axis per filter group

* remove unused closing tag and something else

* Send column "name", not "column_name" thur api

* Output proper error message

* On FilterGroup delete, filter groups don't filter≈y

* report plots with the correct colors

* reports, convert use_description to property_type

* fix axis labels

* compile y columns via api result

* linting

* move BPS data to own directory, add readme

* cleanup readme

* add export column mappings to csv

* linting

* Fix update labels and label selected

* remove nosetests in favor of pytests

* fix name of address normalization test

* Allow filtering on all columns

* linting

* precommit flake8 from gitlab to github

* auto update pre-commit versions

* add in pytest-django to the requirements

* Bump django from 3.2.15 to 3.2.16 in /requirements

Bumps [django](https://github.com/django/django) from 3.2.15 to 3.2.16.
- [Release notes](https://github.com/django/django/releases)
- [Commits](django/django@3.2.15...3.2.16)

---
updated-dependencies:
- dependency-name: django
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

* remove use of campus on the property model (#3614)

* Fix permissions for viewers to see program overview (#3620)

* FIX Viewers can see program overview

* Add some mypy types

* Fix mypy types

* Fix some tests

* Fix more tests

* Fix More tests

* Fix returning ESPM templates with no children (#3632)

* Fix note's API result to not include related model's view ID (#3635)

* overload to_representation to not show null field of the related model
* update API documentation

* Apply label to only selected (#3637)

* Added the ability to create multiple compliance programs (#3623)

* Added filter group selection and started with CRUD UI
* Making progress in adding CRUD features similar to 'Custom Reports'
* Updated link to program setup from "+" dropdown
* Program setup page and revised test
* Added filter group selection and started with CRUD UI
* Add programs selector to program overview and property insights pages (#3636)
* Rework form, fix left nav refresh issue, and make filter groups work on charts
* Fix for no filter group applied
* Route to programs not program_setup
* Use field instead of column in text

Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Katherine Fleming <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* Add create, update, retrieve, and delete to Meter API (#3639)

* add crud operations for meters
* remove unused imports with updated precommit of autoflake
* add in alias to meters, cleanup get_source_display() method
* skip passing property_id to meter create
* Add delete meters UI (#3640)
* Add refresh_readings back in

Co-authored-by: Hannah Eslinger <[email protected]>

* Finishing touches (#3646)

Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* update alt text, remove metric from program (#3647)

* update alt text, remove metric from program
* update general settings

* 2.16.0 release prep (#3650)

* bump version

* update ci and publish to use latest versions

* FIX filtering on other inventory type

* update publish seed-tags output var

* update docker publish versions

* Update contribution information and enforce PR labels (#3654)

* update contribution proposal, add pr label checks, and update contributing workflow documentation
* Update .github/workflows/pr-labels.yml
* Update docs/source/developer_resources.rst

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

* Refactor meter selection (#3649)

* Refactor meter selection
* Remove scenario filtering

* Return only need columns in compliance evaluate (#3664)

* Fix swagger loading the Meter endpoints (#3666)

* return no empty meter queryset to fix swagger
* Update seed/views/v3/meters.py

* Disable sorting by derived column (#3669)

* Sort legend on custom reports (#3671)

* Refactor properties_across_cycles_with_filters so it only makes one PropertyViews query

* Fix legend

* Fix tooltip in insights legend (#3678)

* import "spacey" csv file (#3680)

* Ensure that filter group/agg pairs share a color

* Fix spinner

* fixing getting display id by org

* adding x-axis column ids to list of columns to return

* Fix switching filter group

* ESPM requests have changed. Report list now returned as JSON

* custom report edit mode changes

* remove portfolio manager v2.1 api and parse_template

* handle #VALUE! and #NAME! errors in Excel files

* handle #VALUE! and #NAME! errors in Excel files

* flake8

* add test

* typos

* Revised the property name of AT files and
added disclaimer in readme about AT files
Fixes #3478

* Add spinner to model deletion

* Update links for support (#3681)

* pin to ubuntu 20.04 for publishing

* Nav property on click in property insight page

* pin shapely to version prior to 2.0 release

* add in missing resourceuse tag

* Delete derived columns before org (#3700)

* Refactor properties_across_cycles_with_filters so it only makes one PropertyViews query

* Fix spinner

* Make sure the left and right axis have the same range

* Fix typo at end of line 574

* Fix #VALUE! errors when importing xlsx files (#3685)

* Fix issue with evaluating compliance metric (#3715)

Fixes #3697

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

* Reorder the metric type drop down text in Program Configuration (#3719)

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

* ESPM formatting changes (#3716)

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

* bump release versions (#3717)

* Resolve conflicts on main merge to develop (#3724)

* Fix stacked property points (#3725)

* Fix filter group with extra column work on revised programs (#3727)

* Allow users to create columns (#3730)

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

* Fix filter on nulls and empty strings

* Address comments

* Add the @has_perm_class permission to program metric api endpoints (#3729)

Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* fix meter service route for units in organization settings (#3738)

update meter service route

* Fix custom report legend sort for chrome (#3740)

* Fix custom report legend sort for chrome

* Removed the console log statement

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

* Sort column mappings in profile before export (#3748)

* Update derived column migration to prevent conflicting column names and prevent duplicate column names (#3728)

* update derived column migration to create unique names for derived columns

* prevent derived column names that are duplicated with column names

* disable create/save on error

* update and add test

* Fixed issue with overlapping meter readings with new ESPM format (#3745)

* Fix custom report legend sort for chrome

* Removed the console log statement

* Removed startswith method and instead stripped
units off end of field string and checked equal
to header_string

* Fixed the failing tests

* Remove all extra spaces in headers from XLSX files (#3747)

use strip in MCM parser for XLSX headers

* Revise code to make it work more generically and
added a new test for new format of ESPM data

Co-authored-by: Hannah Eslinger <[email protected]>
Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* Show portfolio manager errors (#3735)

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

* Allow users to hide property insight dataset (#3726)

Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Nicholas Long <[email protected]>

* remove references to prod server, as needed (#3781)

* Update help text (#3782)

help text

* Fix filtering on "" and !"" for all data types (#3765)

* Fix filter None not empty string on non strings

* Apease mypy

* Make is_null_filter_value bools (?????)

* - isnull filtering related to (non-)empty strings now correctly uses booleans
- querying extra_data keys no longer removes all double-quotes from the data
- querying extra_data keys now correctly matches non-existent keys, null values, and empty strings when filtering for empty values (`=""`), and similarly can match all non-empty values
- test_search fixes

* - Fixed numeric comparisons where filter input had decimals
- Fixed empty string filtering on columns with no data type (assumes text filtering)
- Fixed `>` and `>=` bugs when deleting filters
- Fixed parsing extra_data numeric fields with comma separators in the raw values
- Fixed front-end bug that would hide all grid data in numeric columns that couldn't explicitly be parsed as a number

* Test fixes

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

* Fix bug where compliance calculations were not being cast to the right data types (#3789)

* move cast method from search to column object for reuse

* year_ending is a date field, not datetime

* remove placeholder f-string

* add unit tests for converting strings with commas for thousand separators

* Mark icebox-labeled issues as stale after 180 days (#3790)

flag ice box issues as stale after 180 days

* Bump future from 0.18.2 to 0.18.3 in /requirements (#3792)

Bumps [future](https://github.com/PythonCharmers/python-future) from 0.18.2 to 0.18.3.
- [Release notes](https://github.com/PythonCharmers/python-future/releases)
- [Changelog](https://github.com/PythonCharmers/python-future/blob/master/docs/changelog.rst)
- [Commits](PythonCharmers/python-future@v0.18.2...v0.18.3)

---
updated-dependencies:
- dependency-name: future
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Prep release 2.17.1 (#3793)

* bump version

* update changelog

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Hannah Eslinger <[email protected]>
Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Alex Chapin <[email protected]>
Co-authored-by: Alex Swindler <[email protected]>
Co-authored-by: Viveiros <[email protected]>
Co-authored-by: Austin <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Katherine Fleming <[email protected]>
Co-authored-by: isalanglois <[email protected]>
  • Loading branch information
10 people authored Jan 26, 2023
1 parent 265eff5 commit 992862f
Show file tree
Hide file tree
Showing 61 changed files with 999 additions and 316 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Verify PR label action
uses: mheap/github-action-required-labels@v1
uses: mheap/github-action-required-labels@v3
with:
mode: exactly
mode: minimum
count: 1
labels: "Feature, Bug, Enhancement, Maintenance, Documentation, Performance, Do not publish"
add_comment: true
19 changes: 19 additions & 0 deletions .github/workflows/stale-ice-box.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: "Close stale issues and PRs"
on:
schedule:
- cron: "30 1 * * *"
permissions:
issues: write

jobs:
stale:
runs-on: ubuntu-22.04
steps:
- uses: actions/stale@v4
with:
days-before-stale: 180
any-of-labels: Icebox
stale-issue-message: "This issue has been automatically marked as stale because it has been in the icebox for more than 180 days. It will be closed if no further activity occurs. Thank you for your contributions."
close-issue-message: "This issue has been in the icebox for over 180 days and has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it."
exempt-all-milestones: true
operations-per-run: 500
1 change: 1 addition & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
steps:
- uses: actions/stale@v4
with:
days-before-stale: 60
stale-issue-message: "This issue has been automatically marked as stale because it has not had recent activity within 60 days. It will be closed if no further activity occurs. Thank you for your contributions."
close-issue-message: "This issue has been closed automatically. If this still affects you please re-open this issue with a comment or contact us so we can look into resolving it."
exempt-all-milestones: true
Expand Down
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ exclude: |
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.4.0
hooks:
- id: trailing-whitespace
- id: check-added-large-files
Expand Down Expand Up @@ -43,12 +43,12 @@ repos:
"--remove-unused-variable",
]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
args: ["--ignore=F401,E402,E501,E731,W503,W504"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.0-alpha.4
hooks:
- id: prettier
# for now ignoring html, javascript
Expand Down
88 changes: 87 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,89 @@
# SEED Version 2.17.1

## What's Changed
### New Features 🎉
* Allow users to create columns by @haneslinger in https://github.com/SEED-platform/seed/pull/3730
### Improvements 📈
* Show portfolio manager errors by @haneslinger in https://github.com/SEED-platform/seed/pull/3735
* Allow users to hide property insight dataset by @haneslinger in https://github.com/SEED-platform/seed/pull/3726
### Maintenance 🧹
* Bump future from 0.18.2 to 0.18.3 in /requirements by @dependabot in https://github.com/SEED-platform/seed/pull/3792
### Bug Fixes 🐛
* Fix stacked property points by @haneslinger in https://github.com/SEED-platform/seed/pull/3725
* Fix filter group with extra column work on revised programs by @haneslinger in https://github.com/SEED-platform/seed/pull/3727
* Fix filter on nulls and empty strings by @haneslinger in https://github.com/SEED-platform/seed/pull/3733
* Add the @has_perm_class permission to program metric api endpoints by @anchapin in https://github.com/SEED-platform/seed/pull/3729
* fix meter service route for units in organization settings by @kflemin in https://github.com/SEED-platform/seed/pull/3738
* Fix custom report legend sort for chrome by @haneslinger in https://github.com/SEED-platform/seed/pull/3740
* Sort column mappings in profile before export by @nllong in https://github.com/SEED-platform/seed/pull/3748
* Update derived column migration to prevent conflicting column names and prevent duplicate column names by @nllong in https://github.com/SEED-platform/seed/pull/3728
* Fixed issue with overlapping meter readings with new ESPM format by @anchapin in https://github.com/SEED-platform/seed/pull/3745
* Fix filtering on "" and !"" for all data types by @haneslinger in https://github.com/SEED-platform/seed/pull/3765
* Fix bug where compliance calculations were not being cast to the right data types by @nllong in https://github.com/SEED-platform/seed/pull/3789

**Full Changelog**: https://github.com/SEED-platform/seed/compare/v2.17.0...v2.17.1

# SEED Version 2.17.0

## What's Changed
### New Features 🎉
* Switch to created filter group after creation by @haneslinger in https://github.com/SEED-platform/seed/pull/3569
* Use the same color for each axis per filter group by @haneslinger in https://github.com/SEED-platform/seed/pull/3587
* Add 'ghg' and 'ghg_intensity' to 'valid_column_data_types' for Custom Report by @anchapin in https://github.com/SEED-platform/seed/pull/3570
* Add export column mappings by @nllong in https://github.com/SEED-platform/seed/pull/3611
* Allow filtering on all columns including related taxlots/properties by @haneslinger in https://github.com/SEED-platform/seed/pull/3618
* Add the ability to create multiple compliance programs by @anchapin in https://github.com/SEED-platform/seed/pull/3623
* Add create, update, retrieve, and delete to Meter API by @nllong in https://github.com/SEED-platform/seed/pull/3639
* Nav property on click in property insight page by @haneslinger in https://github.com/SEED-platform/seed/pull/3679
### Improvements 📈
* Refactor meter selection by @haneslinger in https://github.com/SEED-platform/seed/pull/3649
* Disable sorting by derived column by @haneslinger in https://github.com/SEED-platform/seed/pull/3669
* Sort legend on custom reports by @haneslinger in https://github.com/SEED-platform/seed/pull/3671
* Fix legend by @haneslinger in https://github.com/SEED-platform/seed/pull/3682
* Add spinner to model deletion by @haneslinger in https://github.com/SEED-platform/seed/pull/3713
* Make sure the left and right axis have the same range by @haneslinger in https://github.com/SEED-platform/seed/pull/3695
* Enter edit mode state on any change in custom report by @kflemin in https://github.com/SEED-platform/seed/pull/3710
* Reorder the metric type drop down text in Program Configuration by @anchapin in https://github.com/SEED-platform/seed/pull/3719
### Maintenance 🧹
* Output proper error message by @haneslinger in https://github.com/SEED-platform/seed/pull/3592
* Final version of the BPS sample data files by @anchapin in https://github.com/SEED-platform/seed/pull/3584
* Remove nosetests and fix precommit by @nllong in https://github.com/SEED-platform/seed/pull/3619
* BPS Data Final Updates by @anchapin in https://github.com/SEED-platform/seed/pull/3646
* Update ci and publish to use latest versions by @nllong in https://github.com/SEED-platform/seed/pull/3656
* Update contribution information and enforce PR labels by @nllong in https://github.com/SEED-platform/seed/pull/3654
* Update links for support by @nllong in https://github.com/SEED-platform/seed/pull/3681
* Refactor properties_across_cycles_with_filters so it only makes one P… by @haneslinger in https://github.com/SEED-platform/seed/pull/3674
* ESPM formatting changes by @anchapin in https://github.com/SEED-platform/seed/pull/3716
### Bug Fixes 🐛
* Add error check for blank Actual Column in Program Setup by @anchapin in https://github.com/SEED-platform/seed/pull/3572
* Use the same column for the names used in Property Insights by @anchapin in https://github.com/SEED-platform/seed/pull/3578
* On FilterGroup delete, filter groups don't filter≈y by @haneslinger in https://github.com/SEED-platform/seed/pull/3596
* Update inventory reporting charts by @nllong in https://github.com/SEED-platform/seed/pull/3604
* Fix update labels and label selected by @haneslinger in https://github.com/SEED-platform/seed/pull/3615
* Fix ESPM get template with no children by @haneslinger in https://github.com/SEED-platform/seed/pull/3632
* Fix note's API result to not include related model's view ID by @nllong in https://github.com/SEED-platform/seed/pull/3635
* Apply label to only selected by @haneslinger in https://github.com/SEED-platform/seed/pull/3637
* Update alt text, remove metric from program by @nllong in https://github.com/SEED-platform/seed/pull/3647
* Fix filtering on other inventory type by @haneslinger in https://github.com/SEED-platform/seed/pull/3658
* Fix swagger loading the Meter endpoints by @nllong in https://github.com/SEED-platform/seed/pull/3666
* Fix tooltip in insights legend by @haneslinger in https://github.com/SEED-platform/seed/pull/3678
* Support import of a csv file that has lots of spaces by @nllong in https://github.com/SEED-platform/seed/pull/3680
* Fix SEED to work with updated ESPM API, remove SEED ESPM API v2.1 by @nllong in https://github.com/SEED-platform/seed/pull/3709
* Fix evaluate request by @haneslinger in https://github.com/SEED-platform/seed/pull/3699
* Fix switching filter group by @haneslinger in https://github.com/SEED-platform/seed/pull/3702
* Delete Derived Columns Before Org by @axelstudios in https://github.com/SEED-platform/seed/pull/3700
* Fix #VALUE! errors when importing xlsx files by @nllong in https://github.com/SEED-platform/seed/pull/3685
* Update the BPS Sample Data AT Files by @anchapin in https://github.com/SEED-platform/seed/pull/3711
* Fix issue with evaluating compliance metric by @anchapin in https://github.com/SEED-platform/seed/pull/3715
### Other Changes
* Bump django from 3.2.15 to 3.2.16 in /requirements by @dependabot in https://github.com/SEED-platform/seed/pull/3622
* Remove use of campus on the property model by @nllong in https://github.com/SEED-platform/seed/pull/3614
* Fix permissions for viewers to see program overview by @haneslinger in https://github.com/SEED-platform/seed/pull/3620
* Return only need columns in compliance evaluate by @haneslinger in https://github.com/SEED-platform/seed/pull/3664


**Full Changelog**: https://github.com/SEED-platform/seed/compare/v2.16.0...v2.17.0

# SEED Version 2.16.0

This release contains new functionality to help track building-portfolio programs such as Benchmarking and basic-Building Performance Standards. In order to track programs, SEED was updated with a program configuration page with the selection of two metrics to track (an energy and emissions metric). The tracking requires an actual and a goal column to be defined allowing the program to determine if a property is in compliance.
Expand Down Expand Up @@ -433,7 +519,7 @@ Closed Issues and Features (Total: 54):
- Fixed [#2374]( https://github.com/SEED-platform/seed/issues/2374 ), Import spreadsheets without a raw header results in an error
- Maintenance [#2379]( https://github.com/SEED-platform/seed/issues/2379 ), Refactor perms for several API v3 views
- Fixed [#2410]( https://github.com/SEED-platform/seed/issues/2410 ), Merge and Link Matches -- didn't seem to merge records that should have merged
- Maintenance [#2432]( https://github.com/SEED-platform/seed/issues/2432 ), Migrate seedv2 to helm and upgrade to latest approved version
- Maintenance [#2432]( https://github.com/SEED-platform/seed/issues/2432 ), Migrate production to helm and upgrade to latest approved version
- Fixed [#2434]( https://github.com/SEED-platform/seed/issues/2434 ), Ensure Sentry is working on all of our instances
- Feature [#2440]( https://github.com/SEED-platform/seed/issues/2440 ), Add API v3 endpoints /analyses GET and /analyses/{id}/ GET
- Feature [#2455]( https://github.com/SEED-platform/seed/issues/2455 ), Implement front-end for Analyses summary page for Property
Expand Down
2 changes: 1 addition & 1 deletion bin/drop_create_db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# drops the ``seed`` DB, then creates it. Add a super_user
# demo@seed.lbl.gov with password demo
# demo@seed-platform.org with password demo

dropdb seed
createdb seed
Expand Down
4 changes: 2 additions & 2 deletions docs/source/developer_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ Restoring a Database Dump
psql -d seed -c 'SELECT timescaledb_pre_restore();'
# restore a previous database dump (must be pg_restore 12+)
/usr/lib/postgresql/12/bin/pg_restore -U seeduser -d seed /backups/prod-backups/seedv2_20191203_000002.dump
/usr/lib/postgresql/12/bin/pg_restore -U seeduser -d seed /backups/prod-backups/prod_20191203_000002.dump
# if any errors appear during the pg_restore process check that the `installed_version` of the timescaledb extension where the database was dumped matches the extension version where it's being restored
# `SELECT default_version, installed_version FROM pg_available_extensions WHERE name = 'timescaledb';`
Expand All @@ -342,7 +342,7 @@ Restoring a Database Dump
--organization=testorg
# if restoring a seedv2 backup to a different deployment update the site settings for password reset emails
# if restoring a production backup to a different deployment update the site settings for password reset emails
./manage.py shell
from django.contrib.sites.models import Site
Expand Down
3 changes: 1 addition & 2 deletions docs/source/help.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,10 @@ The SEED Users Forum is where you can review user announcements, workflow questi

https://lists.buildingenergytools.org/g/SEEDusers/topics

For direct help on a specific problem, please fill out a request on the building data tools website help desk:
For general inquiries or help on a specific problem, please fill out a request on the building data tools website help desk and select SEED as the relevant tool:

https://buildingdata.energy.gov/#/help-desk


For SEED Platform Developers
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down
18 changes: 11 additions & 7 deletions docs/source/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,32 +47,36 @@ local_untracked.py file
),
)
Version 2.17.1
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.17.0
-----------------------
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.16.0
-----------------------
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.15.2
-----------------------
--------------
- There are no migrations needed for this version.

Version 2.15.1
-----------------------
--------------
- There are no migrations needed for this version.

Version 2.15.0
-----------------------
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.14.0
-----------------------
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.13.0
-----------------------
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.12.0 - 2.12.4
Expand Down
2 changes: 1 addition & 1 deletion docs/source/setup_osx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ can also create other superusers.

.. code-block:: console
./manage.py create_default_user --username=demo@seed.lbl.gov --organization=lbl --password=demo123
./manage.py create_default_user --username=demo@seed-platform.org --organization=lbl --password=demo123
Prerequisites
Expand Down
4 changes: 2 additions & 2 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "seed",
"version": "2.17.0",
"version": "2.17.1",
"description": "Standard Energy Efficiency Data (SEED) Platform™",
"license": "SEE LICENSE IN LICENSE",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@ django-braces==1.14.0
-e git+https://github.com/SEED-platform/jwt-oauth2.git@9726367db36b332c84fb1288a7df32196509c06d#egg=jwt-oauth2
django-oauth-toolkit==1.2.0

future==0.18.2
future==0.18.3
15 changes: 7 additions & 8 deletions seed/data_importer/meters_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -465,11 +465,7 @@ class with the data.

results = []
for raw_reading in raw_data:
# December 16, 2022 updated code to match ESPM formatting changes
try:
start_date = datetime.strptime(raw_reading['Month'], '%b-%y')
except KeyError:
start_date = datetime.strptime(raw_reading['Month '], '%b-%y')
start_date = datetime.strptime(raw_reading['Month'], '%b-%y')

_, days_in_month = monthrange(start_date.year, start_date.month)
end_date = datetime(
Expand All @@ -491,9 +487,12 @@ class with the data.
raise Exception(f'Failed to parse meter type and units from "{reading_type}"')

meter_type_match = type_and_units_match.group('meter_type').strip()
meter_type = Meter.ENERGY_TYPE_BY_HEADER_STRING.get(meter_type_match)
if meter_type is None:
raise Exception(f'Invalid meter type "{meter_type_match}"')
for energy_type in Meter.ENERGY_TYPE_BY_HEADER_STRING.keys():
if meter_type_match.startswith(energy_type):
meter_type = Meter.ENERGY_TYPE_BY_HEADER_STRING.get(energy_type)
continue
if not meter_type:
raise Exception(f'Invalid units "{meter_type_match}"')

units_match = type_and_units_match.group('units').strip()
units = METER_UNITS_MAPPING.get(units_match)
Expand Down
Binary file not shown.
Binary file not shown.
28 changes: 27 additions & 1 deletion seed/data_importer/tests/test_meters_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,33 @@ def setUp(self):
self.tz_obj = timezone(TIME_ZONE)

def test_parse_meter_preprocess_raw_pm_data_request(self):
with open(Path(__file__).resolve().parent / "data/example-pm-data-request-with-meters.xlsx") as meters_file:
with open(Path(__file__).resolve().parent / "data" / "example-pm-data-request-with-meters.xlsx") as meters_file:
parser = reader.MCMParser(meters_file, sheet_name='Monthly Usage')

raw_meter_data = MetersParser.preprocess_raw_pm_data_request(parser.data)
self.assertEqual(raw_meter_data, [
{
'Start Date': '2016-01-01 00:00:00',
'End Date': '2016-02-01 00:00:00',
'Portfolio Manager ID': '4544232',
'Portfolio Manager Meter ID': 'Unknown',
'Meter Type': 'Electric - Grid',
'Usage/Quantity': '85887.1',
'Usage Units': 'kBtu (thousand Btu)'
},
{
'Start Date': '2016-02-01 00:00:00',
'End Date': '2016-03-01 00:00:00',
'Portfolio Manager ID': '4544232',
'Portfolio Manager Meter ID': 'Unknown',
'Meter Type': 'Electric - Grid',
'Usage/Quantity': '175697.3',
'Usage Units': 'kBtu (thousand Btu)'
}
])

def test_parse_meter_preprocess_raw_pm_data_request_new(self):
with open(Path(__file__).resolve().parent / "data" / "example-pm-data-request-with-meters-new-format.xlsx") as meters_file:
parser = reader.MCMParser(meters_file, sheet_name='Monthly Usage')

raw_meter_data = MetersParser.preprocess_raw_pm_data_request(parser.data)
Expand Down
2 changes: 1 addition & 1 deletion seed/docs/faq/industry involvement/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ You can find more information about organizations contributing to SEED Platform

- [SEED Platform Collaborative](https://www.energy.gov/eere/buildings/seed-platform-collaborative)
- [SEED Platform Contributing Developers](https://github.com/SEED-platform/seed/blob/develop/AUTHORS.md)
- [SEED Technical Allies](http://seedinfo.lbl.gov/SEED-Technical-Allies)
- [SEED Technical Allies](https://seed-platform.org/technical_ally/)
- [Open Efficiency Platform](https://github.com/OpenEfficiencyPlatform/OEP)
- [BayREN Integrated Commercial Retrofits (BRICR)](https://www.energy.gov/sites/prod/files/2018/05/f52/24293_Hooper_050318-900.pdf)
- [Energy Data Vault (EDV)](https://www.energy.gov/eere/buildings/energy-data-vault)
Loading

0 comments on commit 992862f

Please sign in to comment.