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

Merging changes from nrcan into merge branch #1830

Merged
merged 115 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
593a700
Re-enabling disabled gems for nrcan branch.
ckirney Apr 5, 2024
2c917c7
Merge remote-tracking branch 'origin/nrcan_master_merge' into nrcan_m…
ckirney Apr 8, 2024
049b567
Merge remote-tracking branch 'origin/master' into nrcan_merge_into_nrcan
ckirney Apr 8, 2024
6ab69c8
Fix nokogiri gem version to 1.15.6 as it is the latest version that s…
ckirney Apr 10, 2024
45a9b98
Merge remote-tracking branch 'origin/master' into nrcan_merge_into_nrcan
ckirney Apr 10, 2024
fee3eec
Fix nokogiri gem version to 1.15.6 as it is the latest version that s…
ckirney Apr 10, 2024
04ca66a
Updating SHW unit test results.
ckirney Apr 11, 2024
89769df
Merge remote-tracking branch 'origin/master' into nrcan_merge_into_nrcan
ckirney Apr 11, 2024
4516329
Adding method which resets the primary heating fuel type to either Na…
ckirney Apr 12, 2024
10d1a2d
Merge branch 'master' into nrcan_merge_into_nrcan
ckirney Apr 12, 2024
d4b163b
Modifying method which resets the primary heating fuel type to either…
ckirney Apr 12, 2024
b96f795
Adding qaqc report test.
ckirney Apr 15, 2024
00780a3
Slightly adjusting error message for test_necb_qaqc_reporting.rb.
ckirney Apr 15, 2024
f516f9b
Merging nrcan changes into merge branch with master.
ckirney Apr 15, 2024
d093588
Update LEEPMidriseApartment.osm
phylroy Apr 15, 2024
4ca5b39
added standards building type to LEEP models
Apr 15, 2024
79d1bfd
Updating necb_qaqc.rb to convert construction_base objects to constru…
ckirney Apr 16, 2024
0e4fd82
Replacing the openstudio-standards revision number with "test" in the…
ckirney Apr 16, 2024
28b64e6
Replacing the openstudio-standards revision number with "test" in the…
ckirney Apr 16, 2024
3260ee5
Adjusting VRF code to accommodate changes to COP and EER conversions.
ckirney Apr 18, 2024
89c04ea
Fixing coil_heating_dx_sindle_speed_apply_cop to send correct argumen…
ckirney Apr 24, 2024
99598ef
Merge remote-tracking branch 'origin/nrcan_merge_into_nrcan' into nrc…
ckirney Apr 24, 2024
908bacf
Initial commit
nicholas-pneumaticos-nrcan May 29, 2024
2ef6cbe
Initial implementation and sample test for the generalized tester
nicholas-pneumaticos-nrcan May 29, 2024
147f798
Comments for future reference and refactoring
nicholas-pneumaticos-nrcan May 29, 2024
71fe569
Removed now redundant variable reference_hp
nicholas-pneumaticos-nrcan May 29, 2024
62bf337
Merging changes from master in nrcan_merge_into_nrcan.
ckirney May 30, 2024
9427b76
Including btap_data reporting test.
ckirney May 31, 2024
4384cac
Merge remote-tracking branch 'origin/nrcan_data_test' into nrcan_merg…
ckirney May 31, 2024
3c37aaa
Inculding updated qaqc reporting test and new btap_data.json report t…
ckirney May 31, 2024
93f5b13
Updated the generalized regression helper
nicholas-pneumaticos-nrcan Jun 3, 2024
83f108c
Fixed comma
nicholas-pneumaticos-nrcan Jun 3, 2024
43f6200
Fixed json reader and comments
nicholas-pneumaticos-nrcan Jun 3, 2024
4e8864e
Formatting, removing unnessecary require, adjusting print statement
nicholas-pneumaticos-nrcan Jun 3, 2024
413dda4
Added temporary replacement for getTimeSeries()
nicholas-pneumaticos-nrcan Jun 5, 2024
2c7739b
Adjusted searching algorithm
nicholas-pneumaticos-nrcan Jun 5, 2024
1803d82
Simplified regex
nicholas-pneumaticos-nrcan Jun 5, 2024
fe6d19f
Fixed typos
nicholas-pneumaticos-nrcan Jun 5, 2024
fa84660
Refactored unnecessary file loading into branching case
nicholas-pneumaticos-nrcan Jun 5, 2024
0f03870
Merge pull request #1754 from NREL/nrcan_data_test
ckirney Jun 6, 2024
021db71
Merge pull request #1755 from NREL/nrcan_426
ckirney Jun 6, 2024
c430af0
Generalizing leap year test and updating test_necb_btap_data.rb to ju…
ckirney Jun 6, 2024
8fc2967
Merge pull request #1756 from NREL/nrcan_data_test
ckirney Jun 6, 2024
3310462
Merge remote-tracking branch 'origin/master' into nrcan_merge_into_nrcan
ckirney Jun 6, 2024
7776d2d
Updating merge branch with master with changes to nrcan branch.
ckirney Jun 6, 2024
9f41a8f
Refactoring, modularization, removed JSON reader, added sample test
nicholas-pneumaticos-nrcan Jun 7, 2024
78cd11f
Refactoring and comments
nicholas-pneumaticos-nrcan Jun 7, 2024
302faef
Removed redundant require 'compare_models_helper.rb'
nicholas-pneumaticos-nrcan Jun 7, 2024
644d133
Including tests for ecm_system_types HS08_CCASHP_VRF, HS09_CCASHP_Bas…
ckirney Jun 11, 2024
72cb1cc
Support for devcontainer
phylroy Jun 12, 2024
3a81cb4
Including HS12_ASHP_Baseboard and HS14_CGSHP_FanCoils ECM regression …
ckirney Jun 13, 2024
c861baa
Adding HS13_ASHP_VRF test and including expected results.
ckirney Jun 14, 2024
6d565fd
Adding ecm tests to ci_tests.txt and removing BTAPPRE1980 regression …
ckirney Jun 14, 2024
81de6e4
Merge remote-tracking branch 'origin/master' into nrcan_merge_into_nrcan
ckirney Jun 18, 2024
5760c4d
Adjusting CSV.open syntax to work in Ruby 3.2.2.
ckirney Jun 18, 2024
c3181a1
Merge pull request #1764 from NREL/nrcan_424
ckirney Jun 18, 2024
73004d3
Merge pull request #1765 from NREL/nrcan
ckirney Jun 18, 2024
839aa82
Update ECM regression tests to reflect changes from master.
ckirney Jun 18, 2024
a08852f
Merge pull request #1768 from NREL/nrcan_429
ckirney Jun 19, 2024
9925d09
Merge pull request #1769 from NREL/nrcan
ckirney Jun 19, 2024
58e41fd
Merge pull request #1770 from NREL/shorten_necb_test_names
ckirney Jun 19, 2024
47ca28e
Merge pull request #1771 from NREL/master
ckirney Jun 19, 2024
8540f4b
Initialize chiller capacity so that chillers with names not including…
khaddad Jun 20, 2024
b504fd0
Add regression test cases for ECM HS14 for 'BTAP1980TO2010'
khaddad Jun 27, 2024
9caf698
Including path and regression test directory names to reduce path len…
ckirney Jun 27, 2024
36b4210
Including path and regression test directory names to reduce path len…
ckirney Jun 27, 2024
78d2333
Updating ci_tests.txt with new regression test path name
ckirney Jun 27, 2024
ae59dda
Updating regression test expected results path and regression test cr…
ckirney Jun 27, 2024
510d6f2
Updating regression test output message to use correct paths and file…
ckirney Jun 27, 2024
e02cc31
Including fixes for HS14_CGSHP_FanCoils with BTAPPRE1980 and BTAP1980…
ckirney Jul 8, 2024
ce44763
Removing idf files from regression test results.
ckirney Jul 8, 2024
2d1b381
Merge pull request #1776 from NREL/master
ckirney Jul 8, 2024
3826aea
Including envelope ecm test and expected result file.
ckirney Jul 8, 2024
5fd239d
Including envelope ecm test in set of automatic tests run by NREL.
ckirney Jul 8, 2024
b2d0d53
Adding existing building regression test expected results for HS14_CG…
ckirney Jul 9, 2024
c66f8e9
Adding regression test and expected results for NoAir_Baseboard ECM.
ckirney Jul 9, 2024
4df08b5
Adding regression test and expected results for unitary cop ECM. Mod…
ckirney Jul 9, 2024
a6e3cba
Adding economizer, boiler efficiency, furnace efficiency, and SHW eff…
ckirney Jul 10, 2024
24573c0
Adding boiler expected results.
ckirney Jul 10, 2024
0e69bb3
Adding furnace eff test expected results.
ckirney Jul 10, 2024
8a00a69
Adding shw eff test expected results. Renaming unitary cop test in, …
ckirney Jul 10, 2024
0e0eff8
Merge pull request #1778 from NREL/nrcan_merge_into_nrcan
ckirney Jul 18, 2024
ebf3175
Add files via upload
khaddad Jul 22, 2024
ac67f14
Update hvac_systems.rb
khaddad Jul 22, 2024
bb42123
update syntax document for names for air systems
khaddad Aug 8, 2024
27254ea
Add boiler_fuel and boiler_cap_ratio arguments to model_apply_standar…
ckirney Aug 21, 2024
2b634bf
Update btap_datapoint.rb with new boiler parameters, update boiler_fu…
ckirney Aug 22, 2024
6cba07f
All the conflicts with master are resolved now
navidshh Sep 5, 2024
8d3ac29
swh fuel discripancy revised
navidshh Sep 10, 2024
9be7d46
swh fuel revised
navidshh Sep 10, 2024
7febc69
Including code to adjust the capacities of boilers with dissimilar fu…
ckirney Sep 13, 2024
723035b
updated gemspec to deal with public_suffix requirement.
Sep 16, 2024
cd379eb
Errors with reading csv file for NIST infiltration tests.. Most likel…
Sep 16, 2024
5b4423b
added vscode documentation
Sep 17, 2024
982ad87
Update vscode.md
phylroy Sep 18, 2024
9b91377
Merge pull request #1813 from NREL/master
ckirney Sep 18, 2024
caf77a4
Merge pull request #1814 from NREL/nrcan
ckirney Sep 18, 2024
b7b6832
Merging nrcan_436 into nrcan_master_merge branch. This includes the …
ckirney Sep 18, 2024
b58610a
Adding boiler fuel and capacity ratio options to run_options.yml in b…
ckirney Sep 18, 2024
8d25230
Enabling support for custom boiler fuel types and boilers with disimi…
ckirney Sep 19, 2024
fedbf23
Ensuring that hot-water loops are only added in ECMs if the baseboard…
ckirney Sep 20, 2024
cf79430
Check if a SystemFuels object is defined before trying to use its met…
ckirney Sep 20, 2024
de18932
Updating the 'setup_hw_loop_with_components' method calls in unit tes…
ckirney Sep 20, 2024
db3b7fd
Updating nrcan_master_merge branch with boiler changes from nrcan_436.
ckirney Sep 20, 2024
7ab9da9
Adding backup boiler fueltype parameter for 'setup_hw_loop_with_compo…
ckirney Sep 23, 2024
d727490
Merge remote-tracking branch 'origin/nrcan_436' into nrcan_master_merge
ckirney Sep 23, 2024
ef3711c
Updating regression test expected results and report unit test expect…
ckirney Sep 24, 2024
40a89dd
Update vscode.md
phylroy Sep 25, 2024
702ab4e
Update vscode.md
phylroy Sep 25, 2024
a24f693
Update vscode.md
phylroy Sep 25, 2024
11197fa
Update vscode.md
phylroy Sep 25, 2024
36d66cd
Merge pull request #1817 from NREL/nrcan
ckirney Sep 26, 2024
aaa0f1e
Merge branch 'master' into nrcan_master_merge
mdahlhausen Oct 10, 2024
da6d6db
Merge remote-tracking branch 'origin/master' into nrcan_master_merge
ckirney Oct 16, 2024
e8a0d2e
Updating regression tests results to account for revisions to code.
ckirney Oct 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
33 changes: 33 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
{
"name": "BTAP DevContainer",
// use a Dockerfile
"image":"canmet/os_standards_devcontainer:3.7.0",

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
"containerUser": "vscode",
"customizations": {
"vscode": {
"extensions": [
"castwide.solargraph",
"ms-azuretools.vscode-docker",
"KoichiSasada.vscode-rdbg",
"karyfoundation.idf"
]
}
}
}
Binary file added docs/images/CloneRepository.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/URL.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
131 changes: 131 additions & 0 deletions docs/vscode.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
# Openstudio-Standards development using VSCode.

These are instructions on how to conduct development in the openstudio-standards project, using development containers, and Visual Studio Code IDE. This method uses containers eliminate the need to install the correct version of ruby and other support tools required for development. It ensures that all developers are using the same consistent environment, same version of ruby and same toolchain. This help to avoid "It runs on my machine, but not yours" issues. The container is an Ubuntu linux based, and you can install linux console based applications if you wish. However, everything that you need for standards development is already included.


## Requirements
### Docker
**Windows**: [Docker Desktop 2.0+](https://www.docker.com/products/docker-desktop/) on Windows 10 Pro/Enterprise. Windows 10 Home (2004+) requires Docker Desktop 2.3+ and the WSL 2 back-end. (Docker Toolbox is not supported. Windows container images are not supported.) Installation instructions are [here](https://docs.docker.com/desktop/install/windows-install/) ensure that your windows user account is part of the docker-group. Do not skip that step.
**macOS**: [Docker Desktop 2.0+](https://www.docker.com/products/docker-desktop/).
**Linux**: Docker CE/EE 18.06+ and Docker Compose 1.21+. (The Ubuntu snap package is not supported.) Use your distros package manager to install.

Ensure that docker desktop is running on your system. You should see it present in your windows task tray. Then run the following command.

```
docker run hello-world
```

You should see the following output.

```
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
c1ec31eb5944: Pull complete
Digest: sha256:d000bc569937abbe195e20322a0bde6b2922d805332fd6d8a68b19f524b7d21d
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/

For more examples and ideas, visit:
https://docs.docker.com/get-started/
```

### Visual Studio Code
[Visual Studio Code](https://code.visualstudio.com/) is an free to use editor that has a variety of publically created plug-ins. Some even support OpenStudio and EnergyPlus development. Click on the link above and install in on your computer.
## Configuration
1. Launch vscode and install the following extenstions.
* [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers)
* [Remote-Containers-Extention-Pack](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.vscode-remote-extensionpack)

## Development Workflow

### Clone Standard Repository into a DevContainer
This will create a container workspace and clone all the source code for openstudio-standards required for development.
1. Hit Ctrl+Shift+P to bring up the command pallet on the top of vscode.
1. Start to type "Dev Containers" and select " Dev Containers: Clone Repository in Container Volume" ![Clone](./images/CloneRepository.png "a title")
1. Enter the URL for the openstudio-standards repository. ![URL](./images/URL.png "a title") For the nrcan branch use:
`` https://github.com/NREL/openstudio-standards/tree/nrcan ``
1. Wait a few minutes for the container to be created and to clone the source-code.

### Bring up a terminal to execute commands.
1. Hit Ctrl-Shift-` (that is a backtick) to bring up a terminal. There are other ways to do this as well, such as the "Terminal Menu on the top or the "+" symbol to the right of the terminal on the bottom of vscode. You can now issue commands to the container.

### Install Certificates (NRCan Only)
The NRCan network requires certificate to be installed in your container. Clone the cert repo.
```sh
git clone https://github.com/canmet-energy/linux_nrcan_certs
```
Then install the certs by cut and pasting this command. This will also remove the cert folder as it will no longer be needed.
```ssh
cd linux_nrcan_certs && ./install_nrcan_certs.sh && cd .. && rm -fr linux_nrcan_certs
```

### Install / Update Ruby Gems.
This will install all the ruby packages required by standards.
1. In the terminal, enter:
``
bundle install --path vendor/bundle
``


You are now ready for development! You can change branches, commit, push and pull from git. You can run bundle command to test the code as well from the terminal.

## Run Development Tests
You want to ensure that ahead of a pull request that you run the battery of tests to ensure that you have not broken any of the existing functionality. To do this. Run the following command.
```sh
bundle exec rake test:parallel_run_all_tests_locally
```

Depending on the speed of your computer this may take a few hours. Best practice is to run this overnight.


## Tips / Tricks
### Copy files to/from host into your workspace folder.

You can use the CTRL+C, CTRL-V to cut as paste to/from your host(windows) machine.


### Debugging using integrated VSCode ruby debugger.
You have to make a modification to the following to /workspaces/openstudio-standards/openstudio-standards.gemspec by adding the following dependancy.
```ruby
spec.add_development_dependency 'debug'
```
Update your installed gems by running this command in the terminal window
```
bundle install --path vendor/bundle
```
To debug, open the file in vscode editor window.. then hit F5. Ensure the file that appears on the top is what you want to run and hit Enter.

### Increase Terminal History Buffer
Have long output you want to be able to scroll back and see? Very useful for long output of running tests.

1. Open preferences
* Mac: Code → Preferences → Settings.
* Windows: File → preferences → Settings.
2. Search for "scrollback".
3. Overwrite "terminal.integrated.scrollback": 1000, with whatever you want, e.g. 9999.

Note: You will have to restart vscode for this to take effect.







Empty file added getTimeSeriesReplacement.rb
Empty file.
2 changes: 1 addition & 1 deletion lib/openstudio-standards/infiltration/nist_infiltration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ def self.model_set_nist_infiltration(model,
OpenStudio.logFree(OpenStudio::Error, 'openstudio.standards.Infiltration', "Unable to find file: #{nist_infiltration_correlations_csv}")
return false
end
coefficients_tbl = CSV.table(nist_infiltration_correlations_csv)
coefficients_tbl = CSV.table(nist_infiltration_correlations_csv, encoding: "ISO8859-1:utf-8" )
coefficients_hsh = coefficients_tbl.map(&:to_hash)

# select down to building type and climate zone
Expand Down
Loading