Skip to content

Commit c66072e

Browse files
authored
Merge branch 'develop' into 4907-ps-refactors-december24
2 parents f969efe + 61071bf commit c66072e

File tree

9 files changed

+21
-32
lines changed

9 files changed

+21
-32
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2385,7 +2385,7 @@ Accepted External Pull Requests: 11
23852385

23862386
# SEED Version 2.0.0 (2016-06-11 to 2016-10-01)
23872387

2388-
losed Issues: 21
2388+
Closed Issues: 21
23892389
- Fixed [#30]( https://github.com/SEED-platform/seed/issues/30 ), Multiple Data Files per Building Record
23902390
- Fixed [#59]( https://github.com/SEED-platform/seed/issues/59 ), Column Reordering allowed in Matching Edit Columns view
23912391
- Fixed [#66]( https://github.com/SEED-platform/seed/issues/66 ), Add Ability to handle multiple years of data

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SEED Platform™, Copyright (c) 2017, 2024 Alliance for Sustainable Energy, LLC, and other contributors.
1+
SEED Platform™, Copyright (c) 2017, 2025 Alliance for Sustainable Energy, LLC, and other contributors.
22
All rights reserved.
33

44
Redistribution and use in source and binary forms, with or without modification, are permitted

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@
7373

7474
# General information about the project.
7575
project = "SEED Platform"
76-
copyright = "2017, 2024, Alliance for Sustainable Energy, LLC, and other contributors."
76+
copyright = "2017, 2025, Alliance for Sustainable Energy, LLC, and other contributors."
7777
author = "Alliance for Sustainable Energy, LLC, and other contributors."
7878

7979
# The version info for the project you're documenting, acts as replacement for

seed/analysis_pipelines/bsyncr.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,13 @@ def _prepare_all_properties(self, analysis_view_ids_by_property_view_id, analysi
135135
for analysis_property_view in analysis_property_views:
136136
meters = Meter.objects.annotate(readings_count=Count("meter_readings")).filter(
137137
property=analysis_property_view.property,
138-
type__in=[Meter.ELECTRICITY_GRID, Meter.ELECTRICITY_SOLAR, Meter.ELECTRICITY_WIND, Meter.ELECTRICITY_UNKNOWN],
138+
type__in=[
139+
Meter.ELECTRICITY,
140+
Meter.ELECTRICITY_GRID,
141+
Meter.ELECTRICITY_SOLAR,
142+
Meter.ELECTRICITY_WIND,
143+
Meter.ELECTRICITY_UNKNOWN,
144+
],
139145
readings_count__gte=12,
140146
)
141147
if meters.count() == 0:

seed/analysis_pipelines/upgrade_recommendation.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def get_value(name):
9797

9898
# check if this is a pint, if so get value
9999
if isinstance(gross_floor_area, Quantity):
100-
gross_floor_area = gross_floor_area.to_base_units().magnitude
100+
gross_floor_area = gross_floor_area.magnitude
101101

102102
# calc eui
103103
if total_eui:
@@ -119,7 +119,7 @@ def get_value(name):
119119
if target_gas_eui is None or target_electric_eui is None:
120120
return "Missing Data (ASHRAE Target Gas EUI/ASHRAE Target Electric EUI)"
121121
else:
122-
benchmark = (float(target_gas_eui) + float(target_electric_eui)) / 0.8
122+
total_target_eui = float(target_gas_eui) + float(target_electric_eui)
123123

124124
# if young building:
125125
retrofit_threshold_year = config.get("year_built_threshold")
@@ -134,7 +134,7 @@ def get_value(name):
134134
# has_bas = ddc_control_panel_count.order_by("ddc_control_panel_count").first().ddc_control_panel_count > 0
135135

136136
fair_actual_to_benchmark_eui_ratio = config.get("fair_actual_to_benchmark_eui_ratio")
137-
if ((eui / benchmark) > fair_actual_to_benchmark_eui_ratio) and has_bas is True:
137+
if ((eui / total_target_eui) > fair_actual_to_benchmark_eui_ratio) and has_bas is True:
138138
return "Re-tuning"
139139
else:
140140
return "NO DER project recommended"
@@ -146,7 +146,7 @@ def get_value(name):
146146
# if big and actual to benchmark eui ratio is "poor"
147147
poor_actual_to_benchmark_eui_ratio = config.get("poor_actual_to_benchmark_eui_ratio")
148148
building_sqft_threshold = config.get("building_sqft_threshold")
149-
if ((eui / benchmark) > poor_actual_to_benchmark_eui_ratio) and gross_floor_area > building_sqft_threshold:
149+
if ((eui / total_target_eui) > poor_actual_to_benchmark_eui_ratio) and gross_floor_area > building_sqft_threshold:
150150
return "Deep Energy Retrofit"
151151

152152
# for this next step, we will need condition_index

seed/landing/forms.py

-14
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,10 @@
55

66
from django import forms
77
from django.contrib.auth.forms import UserCreationForm
8-
from django.utils.translation import gettext_lazy as _
98

109
from seed.landing.models import SEEDUser
1110

1211

13-
class LoginForm(forms.Form):
14-
email = forms.EmailField(
15-
label=_("Email"),
16-
help_text=_("ex: joe@company.com"),
17-
widget=forms.TextInput(attrs={"class": "field", "placeholder": _("Email Address")}),
18-
)
19-
password = forms.CharField(
20-
label=_("Password"),
21-
widget=forms.PasswordInput(attrs={"class": "field", "placeholder": _("Password"), "autocomplete": "off"}),
22-
required=True,
23-
)
24-
25-
2612
class CustomCreateUserForm(UserCreationForm):
2713
class Meta:
2814
model = SEEDUser

seed/landing/templates/two_factor/core/login.html

+2-5
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ <h3>DOE Standard Energy Efficiency Data Platform | NREL Data Terms</h3>
8080
{% if wizard.steps.current == 'auth' %}
8181

8282
<a class="forgot_password" href="{% url "landing:password_reset" %}">{% trans "Forgot password?" %}</a>
83-
{% if request.session.include_acct_reg%}
83+
{% if context.self_registration %}
8484
<div>
8585
<a class="create_account btn btn-secondary" href="{% url "landing:create_account" %}">{% trans "Create my Account" %}</a>
8686
</div>
@@ -107,13 +107,10 @@ <h3>DOE Standard Energy Efficiency Data Platform | NREL Data Terms</h3>
107107

108108
{% block js %}
109109
<script>
110-
const toggleTerms = function () {
110+
const toggleTerms = () => {
111111
const terms = document.getElementById('terms-and-conditions');
112112
const hidden = ['', 'none'].includes(terms.style.display);
113113
terms.style.display = hidden ? 'block' : 'none';
114114
}
115-
const resendToken = function () {
116-
console.log('yup')
117-
}
118115
</script>
119116
{% endblock %}

seed/landing/views.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,8 @@ def handle_2fa_prompt(self, response, user):
222222
user.save()
223223
return HttpResponseRedirect("/app/#/profile/two_factor_profile")
224224

225-
def get(self, request, *args, **kwargs):
226-
# add env var to session for conditional frontend display
227-
request.session["include_acct_reg"] = settings.INCLUDE_ACCT_REG
228-
return super().get(request, *args, **kwargs)
225+
def render(self, form=None, **kwargs):
226+
# Conditionally show the `Create my Account` button
227+
kwargs.setdefault("context", {})["self_registration"] = settings.INCLUDE_ACCT_REG
228+
229+
return super().render(form, **kwargs)

seed/static/seed/partials/inventory_nav.html

-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@
44
<a ng-if="inventory_type === 'properties'" id="inventory_groups" ui-sref="inventory_groups(::{inventory_type: inventory_type})" ui-sref-active="active" translate>Groups</a>
55
<a id="inventory-cycles" ui-sref="inventory_cycles(::{inventory_type: inventory_type})" ui-sref-active="active" translate>Cross-Cycles</a>
66
<a id="inventory-map" ui-sref="inventory_map(::{inventory_type: inventory_type})" ui-sref-active="active" translate>Map</a>
7-
<a id="inventory-data" ui-sref="custom_reports(::{inventory_type: inventory_type})" ui-sref-active="active" translate>Data</a>
87
<a id="inventory-summary" ui-sref="inventory_summary(::{inventory_type: inventory_type})" ui-sref-active="active" translate>Summary</a>

0 commit comments

Comments
 (0)