-
Notifications
You must be signed in to change notification settings - Fork 197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Respect WorkflowJSON file paths over default ones #4391
Comments
@macumber Thanks for reporting this. This is most likely in the workflow gem and perhaps should be transfered there. |
I think the issue is in workflowjson::filePaths in this repo, that is what puts the default paths ahead of user ones |
Specifically I think the fix is to change:
to
|
@macumber Sorry for delay on this. Picking up back logged issues. I jumped back into this and tested the proposed code change that you provided (thanks btw). The actual order in the return value printing out the contents of std::vectoropenstudio::path result after populated.
output
Received same output for both. I did notice duplicate default path values (e.g. ./files and ./weather) that are set in the OpenStudio-workflow-gem here https://github.com/NREL/OpenStudio-workflow-gem/blob/develop/lib/openstudio/workflow_json.rb#L324-L328. I don't think this is causing the issue you're having but should be corrected once this bug is identified. I'm thinking maybe this is somewhere else in the code as the path order in |
@macumber If you still have the offending workflow that produces content in the generated_files could you attach it or send to me email? |
Thanks for looking Tim. I thought there was a component of openstudiocoalition/OpenStudioApplication#280 that was due to the OpenStudio SDK. However, looking at it again, I think the code here is correct. I could not reproduce any issues. |
Issue overview
The OpenStudio Workflow Gem attempts to put the
./generated_files
dir as the first path in the WorkflowJSON filehttps://github.com/NREL/OpenStudio-workflow-gem/blob/develop/lib/openstudio/workflow/jobs/run_initialization.rb#L91
However, subsequent calls to
WorkflowJSON::filePaths
insert the default paths (e.g../files
,./weather
) before the paths in the WorkflowJSON file.https://github.com/NREL/OpenStudio/blob/develop/src/utilities/filetypes/WorkflowJSON.cpp#L424
WorkflowJSON_Impl::filePaths
should insert default paths after paths in the JSON file.Current Behavior
Files generated during the run go into a
./files
directory if it exists instead of the./generated_files
dirExpected Behavior
Files generated during the run go into a
./generated_files
directorySteps to Reproduce
./generated_files
./files
directory in the WorkflowJSON root dir./files
Context
Makes it difficult to tell users where to find files generated during the run
The text was updated successfully, but these errors were encountered: