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

Best practices for version control of OpenStudio Measures

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

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

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

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

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



Thanks Scott. Here's the link to the documentaion

MatthewSteen gravatar image MatthewSteen  ( 2020-03-31 10:41:12 -0500 )edit

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 gravatar image David Goldwasser  ( 2020-03-31 12:15:36 -0500 )edit

Your Answer

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

Add Answer


Question Tools



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

Seen: 108 times

Last updated: Mar 31 '20