Skip to content

Commit

Permalink
Merge pull request #3408 from SEED-platform/develop
Browse files Browse the repository at this point in the history
Merge to main for 2.15.1
  • Loading branch information
nllong authored Jul 20, 2022
2 parents e1c3dca + 449f54d commit 09736c1
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 17 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,23 @@ jobs:
- name: Build Docker dev image
run: /usr/bin/docker buildx build --tag seedplatform/seed:develop --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache,mode=max --load --file Dockerfile-dev .
- name: Start the stack
env:
DJANGO_LOG_LEVEL: ERROR
run: |
docker volume create --name=seed_pgdata
docker volume create --name=seed_media
docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d
- name: Migrate
env:
DJANGO_LOG_LEVEL: ERROR
run: |
# verify no migrations need to be made...
docker exec seed_web python manage.py makemigrations --check --dry-run
# run migrations
docker exec seed_web ./manage.py migrate
docker exec seed_web ./manage.py create_default_user [email protected] --password=demo123
docker exec seed_web /bin/bash -c 'echo "y" | ./manage.py make_superuser --user [email protected]'
docker exec --env DJANGO_LOG_LEVEL seed_web ./manage.py migrate
docker exec --env DJANGO_LOG_LEVEL seed_web ./manage.py create_default_user [email protected] --password=demo123
docker exec --env DJANGO_LOG_LEVEL seed_web /bin/bash -c 'echo "y" | ./manage.py make_superuser --user [email protected]'
- uses: actions/setup-node@v1
- name: Install dependencies
run: |
Expand All @@ -63,9 +67,10 @@ jobs:
SEED_PM_UN: ${{ secrets.SEED_PM_UN }}
SEED_PM_PW: ${{ secrets.SEED_PM_PW }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
DJANGO_LOG_LEVEL: ERROR
run: |
docker exec seed_web touch /seed/config/settings/local_untracked.py
docker exec --env SEED_PM_UN --env SEED_PM_PW seed_web coverage run manage.py test seed --settings=config.settings.docker_dev
docker exec --env SEED_PM_UN --env SEED_PM_PW --env DJANGO_LOG_LEVEL seed_web coverage run manage.py test seed --settings=config.settings.docker_dev
if [[ ! -z "${COVERALLS_REPO_TOKEN}" ]]; then
docker exec --env COVERALLS_REPO_TOKEN seed_web coveralls
else
Expand Down
15 changes: 14 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# SEED Version 2.15.1

This is a quick patch release to address a few issues experienced by users after rolling onto production.

Date Range: 07/18/22 - 07/19/22

Closed Issues and Features (Total: 5):
- Fixed [#3390]( https://github.com/SEED-platform/seed/issues/3390 ), Fix the Tax Lot tab not displaying data from Property List and Property Tab not displaying Tax Lot data
- Feature [#3393]( https://github.com/SEED-platform/seed/issues/3393 ), Control the number of decimal points being displayed in derived columns
- Fixed [#3394]( https://github.com/SEED-platform/seed/issues/3394 ), Fix when selecting delete doesn't delete records in new view
- Fixed [#3401]( https://github.com/SEED-platform/seed/issues/3401 ), Fix breaking query on Property List
- Feature [#3402]( https://github.com/SEED-platform/seed/issues/3402 ), Make "From" address in password-reset emails configurable when using Docker

# SEED Version 2.15.0

Date Range: 03/31/22 - 07/17/22
Date Range: 04/01/22 - 07/17/22

Closed Issues and Features (Total: 61):
- Fixed [#1601]( https://github.com/SEED-platform/seed/issues/1601 ), Improve performance moving between different views (Detail to List, etc)
Expand Down
1 change: 1 addition & 0 deletions config/settings/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
# another backend (e.g., SMTP), then please update this model to support both and
# create a pull request.
EMAIL_BACKEND = os.environ.get('DJANGO_EMAIL_BACKEND', 'django_ses.SESBackend')
PASSWORD_RESET_EMAIL = SERVER_EMAIL # noqa F405
DEFAULT_FROM_EMAIL = SERVER_EMAIL # noqa F405
POST_OFFICE = {
'BACKENDS': {
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ services:
command: python3 manage.py runserver --settings=config.settings.docker_dev 0.0.0.0:80
environment:
- DJANGO_SETTINGS_MODULE=config.settings.docker_dev
- DJANGO_LOG_LEVEL
volumes:
- ref_seed_media:/seed/media
- ./seed/:/seed/seed/
Expand All @@ -34,6 +35,7 @@ services:
command: watchmedo auto-restart --directory=/seed/seed/ --pattern=*.py --recursive -- /seed/docker/start_celery_docker.sh
environment:
- DJANGO_SETTINGS_MODULE=config.settings.docker_dev
- DJANGO_LOG_LEVEL
volumes:
- ref_seed_media:/seed/media
- ./seed:/seed/seed
Expand Down
4 changes: 4 additions & 0 deletions docs/source/migrations.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ local_untracked.py file
),
)
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`.
Expand Down
2 changes: 1 addition & 1 deletion 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.15.0",
"version": "2.15.1",
"description": "Standard Energy Efficiency Data (SEED) Platform™",
"license": "SEE LICENSE IN LICENSE",
"directories": {
Expand Down
15 changes: 11 additions & 4 deletions seed/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,10 +381,17 @@ def _build_extra_data_annotations(column_name: str, data_type: str) -> tuple[str
a dict of annotations
"""
full_field_name = f'state__extra_data__{column_name}'
text_field_name = f'_{column_name}_to_text'
stripped_field_name = f'_{column_name}_stripped'
cleaned_field_name = f'_{column_name}_cleaned'
final_field_name = f'_{column_name}_final'

# annotations require a few characters to be removed...
cleaned_column_name = column_name.replace(' ', '_')
cleaned_column_name = cleaned_column_name.replace("'", '-')
cleaned_column_name = cleaned_column_name.replace('"', '-')
cleaned_column_name = cleaned_column_name.replace('`', '-')
cleaned_column_name = cleaned_column_name.replace(';', '-')
text_field_name = f'_{cleaned_column_name}_to_text'
stripped_field_name = f'_{cleaned_column_name}_stripped'
cleaned_field_name = f'_{cleaned_column_name}_cleaned'
final_field_name = f'_{cleaned_column_name}_final'

annotations: AnnotationDict = {
text_field_name: Cast(full_field_name, output_field=models.TextField()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ angular.module('BE.seed.controller.inventory_detail', [])
.then(res => {
return {
derived_column_id: col.id,
value: res.results[0].value
value: _.round(res.results[0].value, $scope.organization.display_decimal_places)
};
});
});
Expand Down
5 changes: 3 additions & 2 deletions seed/static/seed/js/controllers/inventory_list_controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -741,7 +741,7 @@ angular.module('BE.seed.controller.inventory_list', [])
exclude_ids,
true,
$scope.organization.id,
false,
true,
$scope.column_filters,
$scope.column_sorts
).then(function (data) {
Expand Down Expand Up @@ -774,7 +774,8 @@ angular.module('BE.seed.controller.inventory_list', [])
all_evaluation_results.push(...batched_inventory_ids.map(ids => {
return derived_columns_service.evaluate($scope.organization.id, col.id, $scope.cycle.selected_cycle.id, ids)
.then(res => {
return { derived_column_id: col.id, results: res.results };
formatted_results = res.results.map(x => typeof(x.value) == 'number' ? ({ ...x, 'value': _.round(x.value, $scope.organization.display_decimal_places) }) : x)
return { derived_column_id: col.id, results: formatted_results };
});
}));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,8 @@ angular.module('BE.seed.controller.inventory_list_legacy', [])
all_evaluation_results.push(...batched_inventory_ids.map(ids => {
return derived_columns_service.evaluate($scope.organization.id, col.id, $scope.cycle.selected_cycle.id, ids)
.then(res => {
return {derived_column_id: col.id, results: res.results};
formatted_results = res.results.map(x => typeof (x.value) == 'number' ? ({ ...x, 'value': _.round(x.value, $scope.organization.display_decimal_places) }) : x)
return {derived_column_id: col.id, results: formatted_results};
});
}));
}
Expand Down
9 changes: 7 additions & 2 deletions seed/static/seed/js/services/inventory_service.js
Original file line number Diff line number Diff line change
Expand Up @@ -325,14 +325,19 @@ angular.module('BE.seed.service.inventory', []).factory('inventory_service', [

var params = {
organization_id: organization_id,
page: page,
per_page: per_page || 999999999,
include_related: include_related,
ids_only: ids_only,
...format_column_sorts(column_sorts),
...format_column_filters(column_filters)
};

if (ids_only) {
params.ids_only = true;
} else {
params.page = page;
params.per_page = per_page || 999999999;
}

return cycle_service.get_cycles().then(function (cycles) {
var validCycleIds = _.map(cycles.cycles, 'id');

Expand Down

0 comments on commit 09736c1

Please sign in to comment.