Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove residential default workflow generator #370

Merged
merged 7 commits into from May 23, 2023

Conversation

nmerket
Copy link
Member

@nmerket nmerket commented May 19, 2023

Pull Request Description

Remove the residential default workflow generator and modifies tests to continue to work. Also some cleanup of other unnecessary files.

Checklist

Not all may apply

  • Code changes (must work)
  • Tests exercising your feature/bug fix (check coverage report on Checks -> BuildStockBatch Tests -> Artifacts)
  • Coverage has increased or at least not decreased. Update minimum_coverage in .github/workflows/ci.yml as necessary.
  • All other unit and integration tests passing
  • Update validation for project config yaml file changes
  • Update existing documentation
  • Run a small batch run on Eagle to make sure it all works if you made changes that will affect Eagle
  • Add to the changelog_dev.rst file and propose migration text in the pull request

@github-actions
Copy link

github-actions bot commented May 19, 2023

File Coverage
All files 83%
base.py 88%
eagle.py 75%
exc.py 57%
local.py 50%
postprocessing.py 84%
utils.py 96%
sampler/base.py 79%
sampler/downselect.py 33%
sampler/precomputed.py 93%
sampler/residential_quota.py 61%
test/test_docker.py 33%
test/test_validation.py 97%
workflow_generator/base.py 90%
workflow_generator/commercial.py 53%
workflow_generator/residential_hpxml.py 76%

Minimum allowed coverage is 33%

Generated by 🐒 cobertura-action against 282eeb4

Comment on lines +10 to +11
- `ResStock National Baseline <https://github.com/NREL/resstock/blob/develop/project_national/national_baseline.yml>`_
- `ResStock National with Upgrades <https://github.com/NREL/resstock/blob/develop/project_national/national_upgrades.yml>`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Comment on lines +89 to +94
@classmethod
def validate_output_directory_eagle(cls, project_file):
cfg = get_project_configuration(project_file)
output_dir = path_rel_to_file(project_file, cfg['output_directory'])
if not (output_dir.startswith('/scratch') or output_dir.startswith('/projects')):
raise ValidationError(f"`output_directory` must be in /scratch or /projects, `output_directory` = {output_dir}")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this check because I accidentally set up a run to put my outputs in /home/nmerket. I should know better and made this mistake. This is a very common error for new people as well who aren't used to Eagle, so I made it so it won't let you try to save your outputs somewhere that doesn't make sense.

@nmerket
Copy link
Member Author

nmerket commented May 22, 2023

I just successfully ran a small run on Eagle to make sure I didn't break anything and it worked.

@nmerket
Copy link
Member Author

nmerket commented May 22, 2023

@joseph-robertson Could you take a quick look and approve if it looks good to you?

docs/changelog/changelog_dev.rst Outdated Show resolved Hide resolved
@@ -16,5 +16,4 @@ and documentation updates. See :doc:`changelog_0_21` for details.
Schema Updates
==============

Minor updates were made to the residential workflow generator. See
:doc:`../workflow_generators/residential_default` for details.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to point to an older branch here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Meh. Sounds like too much trouble.

@@ -22,7 +22,7 @@ Residential HPXML Workflow Changes
Two new optional arguments were added to the Residential HPXML Workflow
Generator: ``timeseries_num_decimal_places`` and
``include_timeseries_unmet_hours``. See
:doc:`../workflow_generators/residential_default` for details about their usage.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this previously wrong?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it. The text above is for the HPXML workflow generator, so I changed the link.

Comment on lines +16 to +46
build_existing_model:
simulation_control_timestep: 60
simulation_control_run_period_begin_month: 1
simulation_control_run_period_begin_day_of_month: 1.5 # intentional bad input data type for unit testing input validation
simulation_control_run_period_end_month: 12
simulation_control_run_period_end_day_of_month: 31
simulation_control_run_period_calendar_year: 2007

emissions:
- scenario_name: LRMER_MidCase_15
type: CO2e
elec_folder: data/cambium/LRMER_MidCase_15

utility_bills:
- scenario_name: Bills

simulation_output_report:
timeseries_frequency: huorly # intentionally misspelled for unit testing input validation
include_timeseries_total_consumptions: true
include_timeseries_fuel_consumptions: true
include_timeseries_end_use_consumptions: true
include_timeseries_emissions: true
include_timeseries_emission_fuels: true
include_timeseries_emission_end_uses: true
include_timeseries_hot_water_uses: true
include_timeseries_total_loads: true
include_timeseries_component_loads: true
include_timeseries_unmet_hours: true
include_timeseries_zone_temperatures: true
include_timeseries_airflows: true
include_timeseries_weather: true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like you could probably (based on what you're testing) trim a lot of this as it may have no bearing on the actual test... (same comment for test ymls below)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I wasn't sure what that should be so I left it with what works. You're welcome to trim it down, or I'm happy to leave it as is.

spell validator correctly
@nmerket nmerket added this to the v2023.05.0 milestone May 23, 2023
@joseph-robertson joseph-robertson self-requested a review May 23, 2023 16:29
Copy link
Contributor

@joseph-robertson joseph-robertson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making all these updates/changes!

@nmerket nmerket merged commit 25eb174 into develop May 23, 2023
6 checks passed
@nmerket nmerket deleted the remove_res_default_workflow_generator branch May 23, 2023 22:56
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.

None yet

2 participants