Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

Best practices for version control of OpenStudio Measures

asked 2020-03-30 14:23:15 -0600

updated 2020-03-30 14:26:36 -0600

What are your best practices for version control of OpenStudio Measures? For example, I'd like to avoid all the XML file diffs that result whenever the OpenStudio Application opens the local My Measures folder.

Some ideas...

  1. Use a .gitignore file
  2. Use separate folders, e.g. development or published
  3. Use separate repositories to develop and publish
  4. Use a Git submodule (nested repository)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-03-31 10:25:36 -0600

Ideally after you make changes to your measures, you would run openstudio measure -u /path/to/measure_dir (or openstudio measure -t /path/to/dir_of_measures if there are multiple measures) and commit the updated measure XML file. You could wrap this command in a rake task or perhaps a git pre-commit hook to make it easier to run. Thus the git repo would have measure XMLs that are consistent with the measures, and running the OpenStudio App would not generate any XML file diffs.

edit flag offensive delete link more

Comments

1

Thanks Scott. Here's the link to the documentaion https://nrel.github.io/OpenStudio-use...

MatthewSteen's avatar MatthewSteen  ( 2020-03-31 10:41:12 -0600 )edit
1

The only issue I've seen with this workflow is when there are multiple branches that each work on a common measure. They each generate an XML that has correct checksum (for current state), but once things are merged down the checksum is now wrong. So an extra step is needed to re-update the measure.xmls after they are merged together.

David Goldwasser's avatar David Goldwasser  ( 2020-03-31 12:15:36 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Training Workshops

Careers

Question Tools

3 followers

Stats

Asked: 2020-03-30 14:23:15 -0600

Seen: 157 times

Last updated: Mar 31 '20