Skip to content

Commit

Permalink
Merge branch 'develop' into task/update-redis-py
Browse files Browse the repository at this point in the history
  • Loading branch information
axelstudios authored Jan 11, 2024
2 parents 2fb533f + 3e1cb89 commit 5eb84b6
Show file tree
Hide file tree
Showing 54 changed files with 917 additions and 685 deletions.
2 changes: 2 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@
"lokalize",
"lookup",
"lte",
"lxml",
"MapItem",
"mappable",
"mapquest",
Expand Down Expand Up @@ -236,6 +237,7 @@
"noqa",
"npm",
"nrows",
"nsmap",
"num",
"Octant",
"officedocument",
Expand Down
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# SEED Version 2.21.0

<!-- Release notes generated using configuration in .github/release.yml at develop -->

## What's Changed
### New Features 🎉
* Provide environment variable to disable wait-for-it condition in deployments by @dhaley in https://github.com/SEED-platform/seed/pull/4377
* Add healthcheck to docker web container by @axelstudios in https://github.com/SEED-platform/seed/pull/4374
* Audit Template report submission endpoint by @kflemin in https://github.com/SEED-platform/seed/pull/4411
* Remove Summary charts by @haneslinger in https://github.com/SEED-platform/seed/pull/4402
* Add count to default reports by @haneslinger in https://github.com/SEED-platform/seed/pull/4423
### Improvements 📈
* Property Insights UI enhancements by @kflemin in https://github.com/SEED-platform/seed/pull/4384
* Add distance to target in table under property insights graph by @kflemin in https://github.com/SEED-platform/seed/pull/4386
* Populate default report using cycles by @haneslinger in https://github.com/SEED-platform/seed/pull/4420
* Analyses performance improvement by @haneslinger in https://github.com/SEED-platform/seed/pull/4434
* Additional analyses performance improvement by @haneslinger in https://github.com/SEED-platform/seed/pull/4438
### Maintenance 🧹
* Updated developer resources documentation by @axelstudios in https://github.com/SEED-platform/seed/pull/4373
* Bump django from 3.2.20 to 3.2.23 in /requirements by @dependabot in https://github.com/SEED-platform/seed/pull/4379
* Updated salesforce pg_restore docs by @axelstudios in https://github.com/SEED-platform/seed/pull/4382
### Bug Fixes 🐛
* Fix CO2 analysis column naming by @ebeers-png in https://github.com/SEED-platform/seed/pull/4410
* Salesforce scheduling issues by @axelstudios in https://github.com/SEED-platform/seed/pull/4387
* Custom report name field location by @kflemin in https://github.com/SEED-platform/seed/pull/4385
* Order cycles by start date on program setup by @kflemin in https://github.com/SEED-platform/seed/pull/4428
* Property Insights tooltip refinement by @kflemin in https://github.com/SEED-platform/seed/pull/4425


**Full Changelog**: https://github.com/SEED-platform/seed/compare/v2.20.1...v2.21.0

# SEED Version 2.20.1

<!-- Release notes generated using configuration in .github/release.yml at develop -->
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
SEED Platform™, Copyright (c) 2017, 2023 Alliance for Sustainable Energy, LLC, and other contributors.
SEED Platform™, Copyright (c) 2017, 2024 Alliance for Sustainable Energy, LLC, and other contributors.
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ services:
- seed_media:/seed/media
ports:
- "80:80"
healthcheck:
test: curl -f http://localhost/api/health_check/ || exit 1
interval: 1m
timeout: 10s
retries: 1
start_period: 45s
logging:
options:
max-size: 50m
Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ services:
- seed_media:/seed/media
ports:
- "80:80"
healthcheck:
test: curl -f http://localhost/api/health_check/ || exit 1
interval: 1m
timeout: 10s
retries: 1
start_period: 45s
logging:
options:
max-size: 50m
Expand Down
56 changes: 28 additions & 28 deletions docker/start_celery_docker.sh
Original file line number Diff line number Diff line change
@@ -1,35 +1,35 @@
#!/bin/bash

cd /seed

echo "Waiting for postgres to start"
if [ -v POSTGRES_HOST ];
then
POSTGRES_ACTUAL_HOST=$POSTGRES_HOST
# Check if 'DISABLE_SERVICE_CHECKS_ON_START' is not set or if its value is 'TRUE'
if [[ "${DISABLE_SERVICE_CHECKS_ON_START}" == "on" ]]; then
echo "'DISABLE_SERVICE_CHECKS_ON_START' is set and equal to 'on'. Skipping wait-for-it.sh execution."
else
POSTGRES_ACTUAL_HOST=db-postgres
cd /seed

echo "Waiting for postgres to start"
if [ -v POSTGRES_HOST ]; then
POSTGRES_ACTUAL_HOST=$POSTGRES_HOST
else
POSTGRES_ACTUAL_HOST=db-postgres
fi
/usr/local/wait-for-it.sh --strict -t 0 $POSTGRES_ACTUAL_HOST:$POSTGRES_PORT

echo "Waiting for redis to start"
if [ -v REDIS_HOST ]; then
REDIS_ACTUAL_HOST=$REDIS_HOST
else
REDIS_ACTUAL_HOST=db-redis
fi
/usr/local/wait-for-it.sh --strict -t 0 $REDIS_ACTUAL_HOST:6379

echo "Waiting for web to start"
if [ -v WEB_HOST ]; then
WEB_ACTUAL_HOST=$WEB_HOST
else
WEB_ACTUAL_HOST=web
fi
/usr/local/wait-for-it.sh --strict -t 0 $WEB_ACTUAL_HOST:80
fi
/usr/local/wait-for-it.sh --strict -t 0 $POSTGRES_ACTUAL_HOST:$POSTGRES_PORT

echo "Waiting for redis to start"
if [ -v REDIS_HOST ];
then
REDIS_ACTUAL_HOST=$REDIS_HOST
else
REDIS_ACTUAL_HOST=db-redis
fi

/usr/local/wait-for-it.sh --strict -t 0 $REDIS_ACTUAL_HOST:6379

echo "Waiting for web to start"
if [ -v WEB_HOST ];
then
WEB_ACTUAL_HOST=$WEB_HOST
else
WEB_ACTUAL_HOST=web
fi

/usr/local/wait-for-it.sh --strict -t 0 $WEB_ACTUAL_HOST:80

# check if the number of workers is set in the env
if [ -z ${NUMBER_OF_WORKERS} ]; then
Expand Down
37 changes: 21 additions & 16 deletions docker/start_uwsgi_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,29 @@

cd /seed

echo "Waiting for postgres to start"
if [ -v POSTGRES_HOST ];
then
POSTGRES_ACTUAL_HOST=$POSTGRES_HOST
# Check if 'DISABLE_SERVICE_CHECKS_ON_START' is not set or if its value is 'TRUE'
if [[ "${DISABLE_SERVICE_CHECKS_ON_START}" == "on" ]]; then
echo "'DISABLE_SERVICE_CHECKS_ON_START' is set and equal to 'on'. Skipping wait-for-it.sh execution."
else
POSTGRES_ACTUAL_HOST=db-postgres
cd /seed

echo "Waiting for postgres to start"
if [ -v POSTGRES_HOST ]; then
POSTGRES_ACTUAL_HOST=$POSTGRES_HOST
else
POSTGRES_ACTUAL_HOST=db-postgres
fi
/usr/local/wait-for-it.sh --strict $POSTGRES_ACTUAL_HOST:$POSTGRES_PORT

echo "Waiting for redis to start"
if [ -v REDIS_HOST ]; then
REDIS_ACTUAL_HOST=$REDIS_HOST
else
REDIS_ACTUAL_HOST=db-redis
fi

/usr/local/wait-for-it.sh --strict $REDIS_ACTUAL_HOST:6379
fi
/usr/local/wait-for-it.sh --strict $POSTGRES_ACTUAL_HOST:$POSTGRES_PORT

echo "Waiting for redis to start"
if [ -v REDIS_HOST ];
then
REDIS_ACTUAL_HOST=$REDIS_HOST
else
REDIS_ACTUAL_HOST=db-redis
fi

/usr/local/wait-for-it.sh --strict $REDIS_ACTUAL_HOST:6379

# collect static resources before starting and compress the assets
./manage.py collectstatic --no-input -i package.json -i npm-shrinkwrap.json -i node_modules/openlayers-ext/index.html
Expand Down
2 changes: 1 addition & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

# General information about the project.
project = 'SEED Platform'
copyright = '2017, 2023, Alliance for Sustainable Energy, LLC, and other contributors.'
copyright = '2017, 2024, Alliance for Sustainable Energy, LLC, and other contributors.'
author = 'Alliance for Sustainable Energy, LLC, and other contributors.'

# The version info for the project you're documenting, acts as replacement for
Expand Down
11 changes: 10 additions & 1 deletion docs/source/developer_resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -341,8 +341,10 @@ Restoring a Database Dump
--password=password \
--organization=testorg
If restoring a production backup to a different deployment update the site settings for password reset emails, and disable celerybeat Salesforce updates/emails:

.. code-block:: bash
# 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 All @@ -351,6 +353,13 @@ Restoring a Database Dump
site.name = 'SEED Dev1'
site.save()
from seed.models import Organization
Organization.objects.filter(salesforce_enabled=True).update(salesforce_enabled=False)
from django_celery_beat.models import PeriodicTask, PeriodicTasks
PeriodicTask.objects.filter(enabled=True, name__startswith='salesforce_sync_org-').update(enabled=False)
PeriodicTasks.update_changed()
Migrating the Database
----------------------
Expand Down
4 changes: 4 additions & 0 deletions docs/source/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@ local_untracked.py file
),
)
Version 2.21.0
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.

Version 2.20.1
--------------
- There are no special migrations needed for this version. Simply run `./manage.py migrate`.
Expand Down
Binary file modified locale/en_US/LC_MESSAGES/django.mo
Binary file not shown.
18 changes: 18 additions & 0 deletions locale/en_US/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,9 @@ msgstr "Buildings"
msgid "By clicking the Log In button you accept the NREL Data Terms."
msgstr "By clicking the Log In button you accept the NREL Data Terms."

msgid "CLICK_LEGEND"
msgstr "Click a label below to show/hide it on the chart"

msgid "COLUMN_NAME_DUPLICATE_ERROR"
msgstr "Error: New column name cannot match previous name."

Expand Down Expand Up @@ -424,6 +427,9 @@ msgstr "Normally when an imported record is merged into another record the newes
msgid "COMPLETE_AND_REFRESH"
msgstr "Complete and Refresh Page"

msgid "CONFIGURE_PROGRAM"
msgstr "Need to configure your Program?"

msgid "CONFIRMING_DELETE_PROFILE"
msgstr "Are you sure you want to delete the profile"

Expand Down Expand Up @@ -484,6 +490,9 @@ msgstr "Changed By"
msgid "Chart Legend"
msgstr "Chart Legend"

msgid "Chart Options"
msgstr "Chart Options"

msgid "Choose Existing Organization:"
msgstr "Choose Existing Organization:"

Expand Down Expand Up @@ -1440,6 +1449,9 @@ msgstr "Include in your Tax Lot List all tax lots shared with you."
msgid "INDIVIDUAL_MATCH_MERGE_ROUND_ALERT"
msgstr "This action will kick off a match and merge round for the resulting record. This record's values will be given precedence in the event that any merges occur. Multiple matching records are merged beforehand with precedence given to more recently imported records."

msgid "INSIGHTS_HELP_TEXT"
msgstr "Use the controls below to display a subset of properties on the graph. The chart legend can also be used to display or hide properties based on compliance status. The 'Update Property Labels' button can then be used to edit the labels applied to the properties visible on the graph."

msgid "INTERNAL"
msgstr "INTERNAL"

Expand Down Expand Up @@ -2304,6 +2316,9 @@ msgstr "Profile Name"
msgid "Program"
msgstr "Program"

msgid "Program Configuration page"
msgstr "Program Configuration page"

msgid "Program Definition"
msgstr "Program Definition"

Expand Down Expand Up @@ -3385,6 +3400,9 @@ msgstr "Update Charts"
msgid "Update Filters"
msgstr "Update Filters"

msgid "Update Property Labels"
msgstr "Update Property Labels"

msgid "Update Salesforce"
msgstr "Update Salesforce"

Expand Down
Binary file modified locale/fr_CA/LC_MESSAGES/django.mo
Binary file not shown.
18 changes: 18 additions & 0 deletions locale/fr_CA/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,9 @@ msgstr "Bâtiments"
msgid "By clicking the Log In button you accept the NREL Data Terms."
msgstr "En cliquant sur le bouton Connexion, vous acceptez les conditions d'utilisation des données NREL."

msgid "CLICK_LEGEND"
msgstr "Cliquez sur une étiquette ci-dessous pour l'afficher/masquer sur le graphique"

msgid "COLUMN_NAME_DUPLICATE_ERROR"
msgstr "Erreur: Le nom de la nouvelle colonne ne peut pas correspondre au nom précédent."

Expand Down Expand Up @@ -430,6 +433,9 @@ msgstr "Normalement, lorsqu'un enregistrement importé est fusionné dans un aut
msgid "COMPLETE_AND_REFRESH"
msgstr "Complétez et Actualisez la Page"

msgid "CONFIGURE_PROGRAM"
msgstr "Besoin de configurer votre programme?"

msgid "CONFIRMING_DELETE_PROFILE"
msgstr "Êtes-vous sûr de vouloir supprimer le profil"

Expand Down Expand Up @@ -491,6 +497,9 @@ msgstr "Changé par"
msgid "Chart Legend"
msgstr "Légende du graphique"

msgid "Chart Options"
msgstr "Options du graphique"

msgid "Choose Existing Organization:"
msgstr "Choisissez Organisation Existante:"

Expand Down Expand Up @@ -1453,6 +1462,9 @@ msgstr "Inclure dans votre Liste de Lots d'Impôt tous les lots d'impôt partag
msgid "INDIVIDUAL_MATCH_MERGE_ROUND_ALERT"
msgstr "Cette action lancera un match et fusionnera pour l’enregistrement résultant. Les valeurs de cet enregistrement auront la priorité dans l'éventualité d'une fusion. Plusieurs enregistrements correspondants sont préalablement fusionnés, la priorité étant donnée aux enregistrements récemment importés."

msgid "INSIGHTS_HELP_TEXT"
msgstr "Utilisez les commandes ci-dessous pour afficher un sous-ensemble de propriétés sur le graphique. La légende du graphique peut également être utilisée pour afficher ou masquer des propriétés en fonction de l'état de conformité. Le bouton 'Mettre à jour les étiquettes des propriétés' peut ensuite être utilisé pour modifier les étiquettes appliquées aux propriétés visibles sur le graphique."

msgid "INTERNAL"
msgstr "INTERNE"

Expand Down Expand Up @@ -2320,6 +2332,9 @@ msgstr "Nom de profil"
msgid "Program"
msgstr "Programme"

msgid "Program Configuration page"
msgstr "Page de configuration du programme"

msgid "Program Definition"
msgstr "Définition du programme"

Expand Down Expand Up @@ -3412,6 +3427,9 @@ msgstr "Mettre à jour les graphiques"
msgid "Update Filters"
msgstr "Mise à jour les filtres"

msgid "Update Property Labels"
msgstr "Mettre à jour les étiquettes de propriété"

msgid "Update Salesforce"
msgstr "Mettre à jour Salesforce"

Expand Down
4 changes: 2 additions & 2 deletions package-lock.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.20.1",
"version": "2.21.0",
"description": "Standard Energy Efficiency Data (SEED) Platform™",
"license": "SEE LICENSE IN LICENSE.md",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Django
django==3.2.20
django==3.2.23

django-autoslug==1.9.8
# Used by django-filter. See here: https://github.com/carltongibson/django-filter/blob/fe90e3a5fdeaff0983d1325a3e9dcf3458ef078f/docs/guide/rest_framework.txt#L210
Expand Down
4 changes: 2 additions & 2 deletions seed/analysis_pipelines/co2.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,8 +357,8 @@ def _run_analysis(self, meter_readings_by_analysis_property_view, analysis_id):
table_name='PropertyState',
)
if created:
column.display_name = 'Average Annual CO2 (kgCO2e)',
column.column_description = 'Average Annual CO2 (kgCO2e)',
column.display_name = 'Average Annual CO2 (kgCO2e)'
column.column_description = 'Average Annual CO2 (kgCO2e)'
column.save()

column, created = Column.objects.get_or_create(
Expand Down
Loading

0 comments on commit 5eb84b6

Please sign in to comment.