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

OS measure subfolder

asked 2020-12-04 02:16:05 -0500

Phil's avatar

updated 2021-07-09 17:49:38 -0500

Hi there, I am facing a problem with a measure using a resource folder with a subfolder "data" containing several csv files. If I run the model using the measure, it does not copy the subfolder "data" with the csv files into the temp folder. Do you have an idea what the problem could be here? Obviously the measure fails because it does not find the needed csv files.

Thanks for your help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-12-04 04:51:39 -0500

updated 2020-12-04 04:54:59 -0500

Try putting your CSV into the resources/ subfolder.

That is given the following structure:

measure_folder/measure.xml
measure_folder/measure.rb

Put your files either as :

measure_folder/resources/file1.csv
measure_folder/resources/data/file1.csv

Edit: I knew from memory that the resources/ subfolder would be copied along with the tests/one, but I was having trouble finding where this would be defined. I think it's here: https://github.com/NREL/OpenStudio/bl...

edit flag offensive delete link more

Comments

Hi Julien

Option 1 with "measure_folder/resources/file1.csv" works but it is a bit messy with several csv files and other helper measures.

Option 2 does not work. OS just copies the resources folder with my helper measures and ignores all other subfolders.

Phil's avatar Phil  ( 2020-12-04 08:56:25 -0500 )edit

Go with option 1 then.

Julien Marrec's avatar Julien Marrec  ( 2020-12-04 09:17:59 -0500 )edit

but its messy :-(

Phil's avatar Phil  ( 2020-12-04 11:44:26 -0500 )edit
  1. If that's really bothering you, in that case open an enhancement request on github. This time I went ahead and created it for you as an example: NREL/OpenStudio#4156

  2. You do not have to develop your measure inside your ~/OpenStudio/Measures folder. There are a ton of ways to develop them somewhere else and have them ship to your ~/OpenStudio/Measures/ folder for testing as needed or to export it to the BCL (a rake task that would glob and copy stuff for eg, symlinking, etc).

Julien Marrec's avatar Julien Marrec  ( 2020-12-08 04:02:25 -0500 )edit

Your Answer

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

Add Answer

Careers

Question Tools

1 follower

Stats

Asked: 2020-12-04 02:16:05 -0500

Seen: 87 times

Last updated: Dec 04 '20