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

Data refactoring #1486

Closed
wants to merge 51 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
d79605f
Remove BT dependency for space type data lookup; Simplify medium offi…
lymereJ Jan 17, 2023
3b71a9f
remove jenkins and add github action
weilixu Mar 21, 2023
b10b440
fix bug
weilixu Mar 21, 2023
8b63153
Database code migration
weilixu Mar 22, 2023
bf9165b
Move data files (#1464)
lymereJ Mar 23, 2023
0dc4573
Remove IDs from export, fix typos (#1465)
lymereJ Mar 24, 2023
6847ad0
Logging and test update (#1471)
lymereJ Mar 24, 2023
41920c3
Merge master in.
lymereJ Mar 27, 2023
401485c
fix typo in the script and data files
weilixu Mar 28, 2023
38e8d4b
add validation for weak foreign key validation.
weilixu Mar 28, 2023
f885ec1
update to include None check
weilixu Mar 28, 2023
a471749
move create script and insert script to class constructor.
weilixu Mar 28, 2023
a0d7118
update format
weilixu Mar 28, 2023
d3fdc8c
add pipfile lock
weilixu Mar 28, 2023
512285e
Add boolean return value to the valid data type check
weilixu Mar 28, 2023
872f1d4
update error in the data file
weilixu Mar 28, 2023
2e7067e
Merge pull request #1477 from NREL/data_refactoring_l3_validation
weilixu Mar 28, 2023
502a75e
Data refactoring space type data (#1480)
lymereJ Mar 29, 2023
f6924e7
Update export function for space type data. (#1482)
lymereJ Mar 30, 2023
535456f
Data refactoring miscellaneous clean up (#1483)
lymereJ Mar 31, 2023
ddbcb38
Update documentation (#1484)
lymereJ Mar 31, 2023
e95b4ef
Misc changes to schedule assignement and loads.
lymereJ Apr 1, 2023
34194bb
Missing names.
lymereJ Apr 1, 2023
bc088a6
Merge branch 'master' into data_refactoring
lymereJ Apr 1, 2023
60f5db5
Missing names.
lymereJ Apr 1, 2023
4cdb774
Remove CSV files.
lymereJ Apr 1, 2023
f56befb
Revert changes to medium office OSM.
lymereJ May 9, 2023
3c788e6
update gitignore.
lymereJ May 9, 2023
1bd64d4
remove acrynom header for space type data
weilixu May 30, 2023
3e1eff3
Fix bug that create database crash due to no such table
weilixu May 30, 2023
c749002
update units in envelope requirement, lighting and the original json …
weilixu May 30, 2023
8c19415
update comments in database_table fetch function
weilixu May 30, 2023
31a5d86
update level_2_lighting_space_types schema to add a unit field
weilixu May 31, 2023
9a9c1ac
reformat file
weilixu May 31, 2023
960137d
update client code
weilixu Jun 1, 2023
d3c30d7
Change space types used in the prototype templates to the new space t…
lymereJ Aug 24, 2023
06853c9
Merge branch 'data_refactoring' of https://github.com/NREL/openstudio…
lymereJ Aug 24, 2023
d4cb1b4
add OsLib_Schedules methods
mdahlhausen Sep 12, 2023
67eb898
remove one schedule module level
mdahlhausen Sep 12, 2023
671295b
fix yard documentation
mdahlhausen Sep 12, 2023
7049071
add OsLib_ModelGeneration methods
mdahlhausen Sep 13, 2023
3b7abc3
refactor create_typical methods
mdahlhausen Sep 13, 2023
769d6f3
fix tests by adding weather file
mdahlhausen Sep 13, 2023
0bea314
Merge branch 'master' into feature/extension_gem
mdahlhausen Sep 14, 2023
2d936ae
minor yard syntax update
mdahlhausen Sep 14, 2023
c1d68cd
rubocop fixes
mdahlhausen Sep 14, 2023
abcb73d
merge ComStock changes to create typical
mdahlhausen Sep 14, 2023
ad47394
Merge remote-tracking branch 'origin/feature/extension_gem' into data…
lymereJ Sep 14, 2023
84e0933
Fix typo.
lymereJ Oct 4, 2023
e84baf8
Add developer notes.
lymereJ Oct 5, 2023
c09d24b
Fix IDS.
lymereJ Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/openstudio_standards_database.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# This workflow will check formatting with Black, install Python dependencies,
# and run tests with pytest
on:
pull_request:
path:
- 'data/openstudio_standards_data'
jobs:
black-formatting-check:
name: Black formatting check
runs-on: 'ubuntu-latest'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# This will halt the action if formatting fails
# Note: This will also fail if there are syntax errors
- uses: psf/black@stable
with:
version: "22.12.0"
run-unit-tests:
name: Run unit tests
runs-on: 'ubuntu-latest'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pipenv'
- name: Install pipenv
run: curl https://raw.githubusercontent.com/pypa/pipenv/master/get-pipenv.py | python
working-directory: 'data/openstudio_standards_data'
- name: Install dpendencies
run: pipenv install --dev
working-directory: 'data/openstudio_standards_data'
- name: Run pytests
# This will halt the action if any of the tests fail
run: pipenv run pytest -v
working-directory: 'data/openstudio_standards_data'
34 changes: 34 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,37 @@ coverage/
/data/standards/openstudio_standards_duplicates_log.csv
/data/standards/export
/data/geometry/../*.osw
/data/openstudio_standards_data/Pipfile.lock

## Python ignores
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST



4 changes: 4 additions & 0 deletions .yardopts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ lib/openstudio-standards/prototypes/**/*.rb
lib/openstudio-standards/utilities/**/*.rb
lib/openstudio-standards/weather/**/*.rb
lib/openstudio-standards/refs/references.rb
lib/openstudio-standards/schedules/**/*.rb
lib/openstudio-standards/geometry/**/*.rb
lib/openstudio-standards/create_typical/**/*.rb

-
docs/Home.md
docs/UserQuickStartGuide.md
Expand Down
4 changes: 2 additions & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/tijcolem/nrel_cbci_jenkins_libs

@Library('cbci_shared_libs') _
//@Library('cbci_shared_libs') _

openstudio_standards()
//openstudio_standards()
4 changes: 2 additions & 2 deletions Jenkinsfile_develop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//Jenkins pipelines are stored in shared libaries. Please see: https://github.com/tijcolem/nrel_cbci_jenkins_libs

@Library('cbci_shared_libs') _
//@Library('cbci_shared_libs') _

openstudio_standards_develop()
//openstudio_standards_develop()
8 changes: 4 additions & 4 deletions data/geometry/ASHRAE90120042007RetailStandalone.osm
Original file line number Diff line number Diff line change
Expand Up @@ -1437,7 +1437,7 @@ OS:SpaceType,
{a3a0739e-a571-406d-be23-3a1109c00149}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Back_Space; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{a3a0739e-a571-406d-be23-3a1109c00149}, !- Handle
Expand All @@ -1454,7 +1454,7 @@ OS:SpaceType,
{76c09621-8ebd-4f85-9aa1-e7b662cba73a}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Entry; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{76c09621-8ebd-4f85-9aa1-e7b662cba73a}, !- Handle
Expand All @@ -1471,7 +1471,7 @@ OS:SpaceType,
{fa5b1461-b656-4d07-a74e-d98fc640db1d}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Point_of_Sale; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{fa5b1461-b656-4d07-a74e-d98fc640db1d}, !- Handle
Expand All @@ -1488,7 +1488,7 @@ OS:SpaceType,
{881fc831-ec2a-47eb-9248-d56a79ee8cb0}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Retail; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{881fc831-ec2a-47eb-9248-d56a79ee8cb0}, !- Handle
Expand Down
6 changes: 3 additions & 3 deletions data/geometry/ASHRAE90120042007Warehouse.osm
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ OS:SpaceType,
{397a9834-ca46-44f2-bf97-1aa5fc23a67d}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Bulk; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{397a9834-ca46-44f2-bf97-1aa5fc23a67d}, !- Handle
Expand All @@ -1067,7 +1067,7 @@ OS:SpaceType,
{f4306e95-b5d7-4c53-b22d-f8fa8e9ac849}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Fine; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{f4306e95-b5d7-4c53-b22d-f8fa8e9ac849}, !- Handle
Expand All @@ -1084,7 +1084,7 @@ OS:SpaceType,
{c5bf423d-0ee6-40ac-b721-797e5dbdcfa2}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Office; !- Standards Space Type
office; !- Standards Space Type

OS:Rendering:Color,
{c5bf423d-0ee6-40ac-b721-797e5dbdcfa2}, !- Handle
Expand Down
6 changes: 3 additions & 3 deletions data/geometry/ASHRAE90120102013Warehouse.osm
Original file line number Diff line number Diff line change
Expand Up @@ -1662,7 +1662,7 @@ OS:SpaceType,
{397a9834-ca46-44f2-bf97-1aa5fc23a67d}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Bulk; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{397a9834-ca46-44f2-bf97-1aa5fc23a67d}, !- Handle
Expand All @@ -1679,7 +1679,7 @@ OS:SpaceType,
{f4306e95-b5d7-4c53-b22d-f8fa8e9ac849}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Fine; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{f4306e95-b5d7-4c53-b22d-f8fa8e9ac849}, !- Handle
Expand All @@ -1696,7 +1696,7 @@ OS:SpaceType,
{c5bf423d-0ee6-40ac-b721-797e5dbdcfa2}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Warehouse, !- Standards Building Type
Office; !- Standards Space Type
office; !- Standards Space Type

OS:Rendering:Color,
{c5bf423d-0ee6-40ac-b721-797e5dbdcfa2}, !- Handle
Expand Down
8 changes: 4 additions & 4 deletions data/geometry/ASHRAE9012010RetailStandalone.osm
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ OS:SpaceType,
{167cc7b7-8eac-4e49-b28e-caa335790466}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Back_Space; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{167cc7b7-8eac-4e49-b28e-caa335790466}, !- Handle
Expand All @@ -1591,7 +1591,7 @@ OS:SpaceType,
{0f7e4bc8-2048-478f-affd-4076526a56ae}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Entry; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{0f7e4bc8-2048-478f-affd-4076526a56ae}, !- Handle
Expand All @@ -1608,7 +1608,7 @@ OS:SpaceType,
{d71c19c2-0ea4-4baf-a26a-d5fd227fcca6}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Point_of_Sale; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{d71c19c2-0ea4-4baf-a26a-d5fd227fcca6}, !- Handle
Expand All @@ -1625,7 +1625,7 @@ OS:SpaceType,
{72a5f3a5-1e45-49c4-b0dc-cf0379012f35}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
Retail, !- Standards Building Type
Retail; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{72a5f3a5-1e45-49c4-b0dc-cf0379012f35}, !- Handle
Expand Down
24 changes: 12 additions & 12 deletions data/geometry/ASHRAE9012010SuperMarket.osm
Original file line number Diff line number Diff line change
Expand Up @@ -2435,7 +2435,7 @@ OS:SpaceType,
{d5a4d3a8-a5fd-4aaf-806d-a06898d735bb}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Sales; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{584d5941-6807-4c85-a8e1-f325c9415f01}, !- Handle
Expand All @@ -2452,7 +2452,7 @@ OS:SpaceType,
{0fd86b86-8514-428b-983a-e05274d038f3}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Produce; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{fd47fad6-64f7-4aef-9625-215792b21da0}, !- Handle
Expand All @@ -2469,7 +2469,7 @@ OS:SpaceType,
{85790e85-be38-4905-859f-466ed899db55}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Deli; !- Standards Space Type
retail; !- Standards Space Type

OS:Rendering:Color,
{e61d1fd0-7c51-4d2d-a700-6916a13f4e39}, !- Handle
Expand All @@ -2486,7 +2486,7 @@ OS:SpaceType,
{cf17cb7d-482f-438f-a0c4-1a5f373a25d8}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Bakery; !- Standards Space Type
food preparation; !- Standards Space Type

OS:Rendering:Color,
{5865b2f2-0f2b-4625-a902-27f01e50d17d}, !- Handle
Expand All @@ -2503,7 +2503,7 @@ OS:SpaceType,
{191d53fa-876c-4ae5-b385-65c995be31d6}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Office; !- Standards Space Type
office; !- Standards Space Type

OS:Rendering:Color,
{c683d2c8-6126-4dfd-bd42-c3e2177c19f0}, !- Handle
Expand All @@ -2520,7 +2520,7 @@ OS:SpaceType,
{aabefe66-d579-4405-bf24-3f5576b42761}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Meeting; !- Standards Space Type
conference/meeting/multipurpose; !- Standards Space Type

OS:Rendering:Color,
{15f77b5e-c5c3-4b09-aad3-2d4e57dc3e7c}, !- Handle
Expand All @@ -2537,7 +2537,7 @@ OS:SpaceType,
{3591a590-5c05-47aa-86a7-b9239bec0c25}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Dining; !- Standards Space Type
dining; !- Standards Space Type

OS:Rendering:Color,
{e20219b6-54ee-40e5-a565-e509c437629a}, !- Handle
Expand All @@ -2554,7 +2554,7 @@ OS:SpaceType,
{820f5e17-d483-4323-a081-c2609441316e}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Restroom; !- Standards Space Type
restroom; !- Standards Space Type

OS:Rendering:Color,
{c02273df-695e-41c6-bdb5-86d9c30f802c}, !- Handle
Expand All @@ -2571,7 +2571,7 @@ OS:SpaceType,
{95077061-b895-41e0-a684-f88fbf79e327}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Elec/MechRoom; !- Standards Space Type
electrical/mechanical; !- Standards Space Type

OS:Rendering:Color,
{e40b28ee-1d55-46c6-9b59-e70c8ae0d0af}, !- Handle
Expand All @@ -2588,7 +2588,7 @@ OS:SpaceType,
{a748bbb9-c181-4842-a74f-8c4aed370da6}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Corridor; !- Standards Space Type
corridor; !- Standards Space Type

OS:Rendering:Color,
{49694992-18d0-4a74-9162-04a571406547}, !- Handle
Expand All @@ -2605,7 +2605,7 @@ OS:SpaceType,
{823782b0-6a99-4868-b14c-a00a41c45e53}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
Vestibule; !- Standards Space Type
lobby; !- Standards Space Type

OS:Rendering:Color,
{7a66eb1c-2621-4acc-ac8f-8333f93ca888}, !- Handle
Expand All @@ -2622,7 +2622,7 @@ OS:SpaceType,
{8f01cc13-2d9b-4cd7-b3e6-0e73f34ad81c}, !- Group Rendering Name
, !- Design Specification Outdoor Air Object Name
SuperMarket, !- Standards Building Type
DryStorage; !- Standards Space Type
storage; !- Standards Space Type

OS:Rendering:Color,
{8ce4180d-d9e9-4145-9f5e-fbe6401853ad}, !- Handle
Expand Down
Loading