Skip to content

Bug fixes for commercial post-processing helper script and associated files#126

Open
simularis wants to merge 8 commits intosound-data:mainfrom
simularis:dev-psql-template-com-update
Open

Bug fixes for commercial post-processing helper script and associated files#126
simularis wants to merge 8 commits intosound-data:mainfrom
simularis:dev-psql-template-com-update

Conversation

@simularis
Copy link
Copy Markdown
Contributor

@simularis simularis commented Sep 30, 2025

Pull Request (PR) Description

Bug fixes for commercial post-processing helper script and associated files. This is not an overhaul but incremental improvements for usability and reliability.

  • Fix errors in PSQL helper script commands using variable filename (postgres-template-com.psql)
  • PSQL helper script shows generated commands and progress more clearly, with formatting
  • Adapt to new commercial support table schema (files in new folder, some column names were previously changed)
  • Support table script filename revised for consistency (create_current_msr_mat.sql)
  • Apply primary keys for commercial support tables. This helps user avoid accidentally loading duplicate data records.
  • Update renamed columns to be consistent in wts_com_bldg download script (DEER_weights_extraction.py)
  • Bump wts_com_bldg data to version DEER2026 (previously, used version DEER2020. Also DEER table may have been updated since previous version of script.)

Repo owner

  • Assign pull request assignee and reviewer
  • Label the PR with at least one of the following: New Measure, Bug, or Feature.

PR Author

  • Make sure the PR branch is up to date with main branch at the time of the PR submission
  • Craft a succinct title that effectively encapsulates the essence of the pull request, providing a general overview of the proposed changes.
  • Provide a concise description of the measure, bug, or feature. Submit one PR per measure.
  • N/A For a new measure, attach a workbook named DEER_EnergyPlus_Modelkit_Measure_list_working.xlsx, containing only rows used for post-processing the measure.
  • Add comments in the code when necessary to facilitate the review process.
  • Add a comment before the added code, including the author's full name, company, and specifying if it's a bug fix, new measure, or feature.
  • N/A For a new feature or bug, demonstrate the impact on energy consumption for selected cases with justification using plots and descriptions.
  • N/A For a new measure, add a summary table showing total energy consumption per simulated case.

PR Reviewer

  • Conduct a thorough code review.
  • If the branch is behind the main, merge the branch locally to check for potential conflicts.
  • If a bug, locally reproduce it and compare energy consumptions before and after.
  • Explore creative ways to stress-test the code.
  • Locally check the error file and other outputs.

@nfette
Copy link
Copy Markdown
Contributor

nfette commented Oct 1, 2025

Sample console session (powershell)

PS > $env:PGPASSWORD=Read-Host -AsSecureString | ConvertFrom-SecureString -AsPlainText
PS > $env:PATH+=';C:\Program Files\PostgreSQL\15\bin'
PS > cd "C:\DEER2026\DEER-Prototypes-EnergyPlus\scripts\energy savings\commercial"
PS > dir ./results -Name
current_msr_mat.csv
sim_annual.csv
sim_hourly_wb.csv
PS > psql -d "deerusers" -U "deeruser1"  -f .\postgres-template-com.psql
PS > $env:PGPASSWORD = $null
Screenshot 2025-09-30 at 19-56-21

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants