First time here? Check our help page!
2

Best practices for version control of OpenStudio Measures

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)
MatthewSteen's avatar
10.1k
MatthewSteen
asked 2020-03-30 14:23:15 -0500, updated 2020-03-30 14:26:36 -0500
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

1 Answer

2

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.

shorowit's avatar
11.8k
shorowit
answered 2020-03-31 10:25:36 -0500
edit flag offensive 0 remove flag delete link

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 -0500) 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 -0500) edit
add a comment see more comments