-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #827 from NREL/develop
v2.5.0 release
- Loading branch information
Showing
1,217 changed files
with
1,127,321 additions
and
1,857,962 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,31 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: ci | ||
|
||
# Controls when the action will run. | ||
on: [push] | ||
on: | ||
push: | ||
branches: [ main, develop ] | ||
pull_request: | ||
types: [ synchronize, opened ] | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# This workflow contains a single job called "build" | ||
build: | ||
# The type of runner that the job will run on | ||
unit-tests: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker://nrel/openstudio:2.9.0 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
image: docker://nrel/openstudio:3.3.0 | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Show environment | ||
run: | | ||
bundle -v | ||
ruby -v | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install gems | ||
run: | | ||
rm -f Gemfile.lock && bundle install | ||
- name: Apply rubocop | ||
run: | | ||
rubocop --format simple --only Layout --debug | ||
- name: Update all measures | ||
run: | | ||
rake update_measures | ||
- name: Regenerate test osms | ||
run: | | ||
rake test:regenerate_osms | ||
|
@@ -39,60 +34,218 @@ jobs: | |
run: | | ||
rake test:unit_tests | ||
- name: Run all regression tests | ||
- name: Run all project tests | ||
run: | | ||
rake test:regression_tests | ||
rake test:project_tests | ||
- name: Store example osws | ||
- name: Upload feature samples | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: workflows/results/results.csv | ||
name: example_osws.csv | ||
path: resources/buildstock.csv | ||
name: samples | ||
|
||
- name: Store measures osws | ||
- name: Upload schedules | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: test/test_measures_osw/results/results.csv | ||
name: measures_osws.csv | ||
path: resources/measures/ResidentialScheduleGenerator/tests/output/test_sweep_building_ids_and_num_occupants | ||
name: schedules | ||
|
||
- name: Store buildstock csv | ||
uses: actions/upload-artifact@v2 | ||
analysis-tests: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: docker://nrel/openstudio:3.3.0 | ||
steps: | ||
- name: Show environment | ||
run: | | ||
bundle -v | ||
ruby -v | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Install gems | ||
run: | | ||
rm -f Gemfile.lock && bundle install | ||
- name: Run run_analysis.rb | ||
run: | | ||
rake test:analysis_tests | ||
integration-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Show environment | ||
run: | | ||
ruby -v | ||
python -v | ||
- uses: actions/checkout@v2 | ||
with: | ||
path: test/test_measures_osw/buildstock.csv | ||
name: buildstock.csv | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Store schedules | ||
- name: Run buildstockbatch | ||
run: | | ||
pip install git+https://github.com/NREL/[email protected] | ||
buildstock_docker project_national/national_baseline.yml | ||
buildstock_docker project_testing/testing_baseline.yml | ||
buildstock_docker project_national/national_upgrades.yml | ||
buildstock_docker project_testing/testing_upgrades.yml | ||
- name: Run tests | ||
run: | | ||
ruby test/test_bsb_analysis.rb | ||
- name: Process results | ||
run: | | ||
gunzip -v project_national/national_baseline/results_csvs/*.csv.gz | ||
gunzip -v project_testing/testing_baseline/results_csvs/*.csv.gz | ||
gunzip -v project_national/national_upgrades/results_csvs/*.csv.gz | ||
gunzip -v project_testing/testing_upgrades/results_csvs/*.csv.gz | ||
tar -xvf project_national/national_baseline/simulation_output/*.tar.gz -C project_national/national_baseline/simulation_output | ||
tar -xvf project_testing/testing_baseline/simulation_output/*.tar.gz -C project_testing/testing_baseline/simulation_output | ||
tar -xvf project_national/national_upgrades/simulation_output/*.tar.gz -C project_national/national_upgrades/simulation_output | ||
tar -xvf project_testing/testing_upgrades/simulation_output/*.tar.gz -C project_testing/testing_upgrades/simulation_output | ||
pip install pandas | ||
python test/util.py | ||
- name: Upload integration results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: resources/measures/ResidentialScheduleGenerator/tests/output/test_sweep_building_ids_and_num_occupants | ||
name: schedules | ||
path: | | ||
baseline | ||
upgrades | ||
name: results | ||
|
||
docs: | ||
# The type of runner that the job will run on | ||
compare-results: | ||
if: github.event_name == 'pull_request' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
strategy: | ||
matrix: | ||
python-version: [3.8.4] | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
needs: [unit-tests, analysis-tests, integration-tests] | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Show environment | ||
run: | | ||
ruby -v | ||
python -v | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.base.sha }} | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
- name: Upload base samples and results | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
path: test/base_results | ||
name: base | ||
|
||
- name: Build documentation | ||
run: | | ||
cd docs/read_the_docs | ||
pip install -r requirements.txt | ||
make html | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
|
||
- name: Download base samples and results | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: base | ||
name: base | ||
|
||
- name: Store docs | ||
- name: Download feature samples | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: samples | ||
name: samples | ||
|
||
- name: Download feature results | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: results | ||
name: results | ||
|
||
- name: Compare samples and results | ||
run: | | ||
pip install numpy | ||
pip install pandas | ||
pip install plotly | ||
pip install kaleido | ||
mkdir test/base_results/comparisons | ||
mkdir test/base_results/comparisons/baseline | ||
mkdir test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a samples -b base/baseline/annual -f samples -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a results -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a results -af sum -ac geometry_building_type_recs -x results_output_building_type_sum.csv -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a visualize -dc geometry_building_type_recs -x results_output_building_type.html -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a visualize -dc geometry_foundation_type -x results_output_foundation_type.html -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a visualize -dc census_region -x results_output_cr.html -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
python test/compare.py -a visualize -dc geometry_building_type_recs -ac census_region -af sum -x results_output_cr_sum.html -b base/baseline/annual -f results/baseline/annual -e test/base_results/comparisons/baseline/annual | ||
mkdir test/base_results/comparisons/baseline/timeseries | ||
python test/compare.py -a timeseries -b base/baseline/timeseries -f results/baseline/timeseries -e test/base_results/comparisons/baseline/timeseries | ||
mkdir test/base_results/comparisons/upgrades | ||
mkdir test/base_results/comparisons/upgrades/annual | ||
python test/compare.py -a results -b base/upgrades/annual -f results/upgrades/annual -e test/base_results/comparisons/upgrades/annual | ||
python test/compare.py -a visualize -b base/upgrades/annual -f results/upgrades/annual -e test/base_results/comparisons/upgrades/annual | ||
mkdir test/base_results/comparisons/upgrades/timeseries | ||
python test/compare.py -a timeseries -b base/upgrades/timeseries -f results/upgrades/timeseries -e test/base_results/comparisons/upgrades/timeseries | ||
- name: Upload comparisons | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
path: docs/read_the_docs/build | ||
name: readthedocs | ||
path: test/base_results/comparisons | ||
name: comparisons | ||
|
||
update-results: | ||
runs-on: ubuntu-latest | ||
needs: [unit-tests, analysis-tests, integration-tests] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Download feature samples | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: samples | ||
name: samples | ||
|
||
- name: Download feature results | ||
uses: actions/download-artifact@v2 | ||
with: | ||
path: results | ||
name: results | ||
|
||
- name: Commit latest results | ||
shell: bash | ||
run: | | ||
branch_name="${{ github.head_ref }}" | ||
git pull origin $branch_name | ||
cp -r samples/buildstock*.csv test/base_results/baseline/annual | ||
cp -r results/baseline/annual/results*.csv test/base_results/baseline/annual | ||
cp -r results/baseline/timeseries/results*.csv test/base_results/baseline/timeseries | ||
cp -r results/upgrades/annual/results*.csv test/base_results/upgrades/annual | ||
cp -r results/upgrades/timeseries/results*.csv test/base_results/upgrades/timeseries | ||
git add test/base_results | ||
git status | ||
if [[ $(git diff --cached --exit-code) ]]; then | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "GitHub Action" | ||
git commit -m "Latest results." | ||
echo "Pushing to branch: $branch_name" | ||
git push -u origin $branch_name | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,7 @@ | ||
faraday.log | ||
.temp/* | ||
/*.pem | ||
/*.pub | ||
/res_stock.json | ||
*.project | ||
*.pydevproject | ||
*.pyc | ||
Gemfile.lock | ||
|
||
coverage | ||
/test/reports | ||
/log | ||
/.bundle | ||
/download_files.rb | ||
.DS_Store | ||
.idea/*.* | ||
.vscode | ||
/run | ||
/test/osw_files/out.osw | ||
/test/osw_files/run | ||
/files/schedules.csv | ||
|
||
/resources/buildstock.csv | ||
/project_national/housing_characteristics/buildstock.csv | ||
/project_testing/housing_characteristics/buildstock.csv | ||
|
||
build/ | ||
node_modules/ | ||
|
||
.ipynb_checkpoints/ | ||
|
||
/measures/*/tests/output | ||
/resources/measures/*/tests/output | ||
/workflows/reports | ||
/workflows/run | ||
/workflows/out.osw | ||
/workflows/results | ||
/workflows/generated_files | ||
|
||
/coverage | ||
/docs/read_the_docs/_build | ||
/lib | ||
/resources/buildstock.csv | ||
/weather | ||
/test/test_measures_osw/buildstock.csv | ||
/test/test_measures_osw/generated_files | ||
/test/test_measures_osw/measures_osw | ||
/test/test_measures_osw/measures_upgrade_osw | ||
/test/test_measures_osw/results | ||
/test/test_measures_osw/out.osw | ||
/workflow/* | ||
!/workflow/run_analysis.rb |
Oops, something went wrong.