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

Add Standard Data Release YAML to GitHub Actions #1329

Open
wants to merge 20 commits into
base: develop
Choose a base branch
from
Open

Conversation

afontani
Copy link
Contributor

@afontani afontani commented Dec 6, 2024

Pull Request Description

This pull request introduces the Standard Data Release (SDR) YAML file into the "develop" branch of ResStock and into GitHub Actions integration-tests. This PR will give contributors on the SDR measures a place to commit changes and aid in completing an end-to-end workflow in CI.

Workflow changes

  1. National Upgrades and Testing Upgrades have been removed
  2. Path upload errors added to .github/workflows/config.yml. Previously was defaulted to "warn" and wasn't catching that a file was missing. This is done by adding if-no-files-found: error to the actions/upload-artifact@v4 action. Example:
    - name: Upload precomputed buildstocks
    uses: actions/upload-artifact@v4
    with:
    name: precomputed_buildstocks
    path: test/tests_yml_files/yml_precomputed*/buildstock*.csv
    if-no-files-found: error
  3. The SDR project file tests have been added similar to the tests for the project national and project testing upgrade files.

Test Modifications

  1. The tests have been updated to remove the tests around the National Upgrades and Testing Upgrades and switch the tests to the SDR project file.
  2. In test/test_analysis_tools.rb: BuildStockBatch sometimes has some extra columns that are blank. Removing these columns from the test as they are blank.
    # Test if BuildStockBatch has extra columns that are not empty
    buildstockbatch_extras = buildstockbatch.headers - run_analysis.headers
    buildstockbatch_extras -= ['simulation_output_report.applicable'] # buildstockbatch contains simulation_output_report.applicable (old workflow)
    empty_columns.each do |col| # Remove empty columns from the diff. BuildStockBatch sometimes has empty blank columns
    buildstockbatch_extras -= [col]
    end

Area for improved testing

This PR is meant to introduce the SDR project file and do some elementary testing (similar to project national, project testing, and national upgrades). At this point, the tests make sure there is some data and columns. Improving the tests that exist today, building out functional tests, and regression testing are important areas for improvement moving forward. Example: using only 2 datapoints being simulated some upgrades do not get run because the upgrade is invalid for the two units.

Related Pull Requests

None.

Related Issues

Closes #1261 -- "Commit ResStock 2024.2 data release yaml to develop"

Checklist

Required:

Optional (not all items may apply):

@afontani afontani self-assigned this Dec 6, 2024
@afontani afontani added this to the ResStock v3.5.0 milestone Dec 6, 2024
@joseph-robertson
Copy link
Contributor

Remove some tests? For example, remove national/testing upgrade ymls in favor of SDR upgrade yml.

@afontani afontani changed the title Add Standard Data Release YAML to Integration Tests Add Standard Data Release YAML to GitHub Actions Jan 6, 2025
afontani and others added 3 commits January 7, 2025 22:47
Update changelog

Add workflow generator version

update number of allowable upgrades

Add files to .gitignore

update input and output directories

Update options lookup arguments
afontani and others added 11 commits January 8, 2025 11:30
rename sdr yaml file

Unzip and upload sdr upgrade artifact

Add testing for sdr upgrade run with bsb

Reduce upgrade datapoints on national and testing upgrades ymls

revert data point changes and reduce sdr datapoints.

Remove testing and national upgrades

Update process_bsb_analysis

Updates. test_bsb_analysis passing

Fix test_run_analysis

Update testing yml_valid

Update expected warnings

Remove testing_upgrades from gitignore

Update buildstock_missing.csv

Make sdr tests an upgrade

Add the upgrade osw and xml files as requested from SDR

Update the package name

load only headers for comparison

Add commented out production number of data points

remove Zone People Occupant Count: Conditioned Space from timeseries contents

New tsvs with updated well pump

update changelog

update tsvs
Increase n_datapoints

Fix option name change from well pump PR

Typo

reduce datapoints
Update test_upgrade_results

Update test_upgrade_columns

Fix paths

Fix number of expected files

Fix run_analysis file path

Fix missing upgrade results file in run_analysis results

Fix missing upgrade results file in run_analysis results, try 2

Add path errors during artifact upload

Cleanup

Update the expected number of expected results

Switch upgrade to one that applies to all units
Fix bsb sdr results csv
args:
# Annual simulation and timestep
build_existing_model:
simulation_control_timestep: 15
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it necessary to have 15 instead of 60 here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We might need to for CI to get a couple more datapoints simulated. 15 min is what we run for the dataset publication.


# Outputs to include
simulation_output_report:
timeseries_frequency: timestep
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this be hourly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is what we run for the dataset publication. I would like this to be as close as possible to the simulated version. If we forget to change this then we have to re-simulate the entire dataset. Yes, the downside is limiting the number of data points. Can we make the change later if we figure out a solution to the memory limitations?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Commit ResStock 2024.2 data release yaml to develop
3 participants