Skip to content

Commit

Permalink
Merge pull request #21 from BuildingSync/feat/support-bsync-2.5
Browse files Browse the repository at this point in the history
Upgrade to BuildingSync Version 2.5
  • Loading branch information
haneslinger authored Sep 29, 2023
2 parents 350ff69 + ccf2a11 commit 1289fa4
Show file tree
Hide file tree
Showing 7 changed files with 920 additions and 91 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ jobs:
cd bsyncpy
poetry run python bsyncpy_generator.py BuildingSync-2.4.xsd
- name: Run Generator (BuildingSync 2.5)
run: |
curl -L -o bsyncpy/BuildingSync-2.5.xsd https://github.com/BuildingSync/schema/releases/download/v2.5.0/BuildingSync.xsd
cd bsyncpy
poetry run python bsyncpy_generator.py BuildingSync-2.5.xsd
- name: Run Generator (BuildingSync Develop V2)
run: |
curl -L -o bsyncpy/BuildingSync-develop-v2.xsd https://raw.githubusercontent.com/BuildingSync/schema/develop-v2/BuildingSync.xsd
Expand Down
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
# Version 0.3.0.alpha.0
# Version 0.3.0

* Generated for BuildingSync 2.5 (which is currently develop-v2)
* Added GHG emission metrics
* Changed UsefulLife type
* Added DiscountRate
* Added EquipmentID
* Updated MeasureSavingsAnalysis
* Added and sorted enumerations in AuditorQualificationType
* Added PrincipalHVACSystemType, PrincipalLightingSystemType, CondenserType
* Added FacilityEvaluationAuditDefinition
* Added AuditCycle
* Added WCM categories and measures

# Version 0.2.0

Expand Down
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Build Status](https://github.com/BuildingSync/bsyncpy/actions/workflows/ci.yml/badge.svg?branch=develop)

Current BuildingSync version: `2.4.0`.
Current BuildingSync version: `2.5.0`.

## Installing

Expand All @@ -12,9 +12,9 @@ Current BuildingSync version: `2.4.0`.
- `poetry install`
- `poetry run pre-commit install`
- Download, copy, or curl a BuildingSync schema into `bsyncpy/bsyncpy`
- `curl -L -o bsyncpy/BuildingSync-2.4.xsd https://github.com/BuildingSync/schema/releases/download/v2.4.0/BuildingSync.xsd`
- `curl -L -o bsyncpy/BuildingSync-2.5.xsd https://github.com/BuildingSync/schema/releases/download/v2.5.0/BuildingSync.xsd`
- cd into `bsyncpy/bsyncpy`
- Run generator: `poetry run python bsyncpy_generator.py BuildingSync-2.4.xsd`
- Run generator: `poetry run python bsyncpy_generator.py BuildingSync-2.5.xsd`
- Go back to the root `bsyncpy` and run tests: `poetry run pytest`
- Make sure formatting is good: `poetry run pre-commit run --all-files`
- On commit, pre-commit should run again
Expand All @@ -28,7 +28,7 @@ from bsyncpy import bsync

# Create a root and set the version attribute
root = bsync.BuildingSync()
root.set('version', '2.4.0')
root.set('version', '2.5.0')

# Valid element attributes can also be passed in as kwargs
f = bsync.Facilities(bsync.Facilities.Facility(ID='Facility-1'))
Expand All @@ -45,7 +45,7 @@ with open('output.xml', 'wb+') as f:
*Output*
```xml
<?xml version="1.0" encoding="UTF-8"?>
<BuildingSync version="2.4.0">
<BuildingSync version="2.5.0">
<Facilities>
<Facility ID="Facility-1"/>
</Facilities>
Expand Down
Loading

0 comments on commit 1289fa4

Please sign in to comment.