You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openstudio measure -u . produces a measure.xml with no extension or is_read.
Possible Solution
Ideally I think there should be 3 possible types of Path Arguments:
A directory, no extensions specified
A file that will be read and must exist. The extensions should be optional
A file that will be written and does not have to exist. The extensions should be optional
I think the extensions should rather be specified as a kind of std::map<std::string, std::string>. And should be sanitized to a common format (eg check there is / there isn't a leading dot . and /or * or not) . for eg
Issue overview
The OS SDK and BCL-gem implementation of the
OSArgumentType::Path
arguments is incomplete, and neither handle the makePathArgument arguments:OpenStudio/src/measure/OSArgument.hpp
Lines 131 to 133 in f63cae5
isRead
extension
Current Behavior
They are confusingly named, and not written to the
measure.xml
Expected Behavior
Clarify the meaning of these. And ensure they get written to the
measure.xml
Steps to Reproduce
here is an example measure to play with.
example_path_argument.zip
openstudio measure -u .
produces a measure.xml with no extension or is_read.Possible Solution
Ideally I think there should be 3 possible types of Path Arguments:
I think the extensions should rather be specified as a kind of
std::map<std::string, std::string>
. And should be sanitized to a common format (eg check there is / there isn't a leading dot.
and /or*
or not) . for egOr maybe even a
std::map<std::string, std::vector<std::string>>
, such as an entry would be{"Excel Files", {"xlsx", "xls"}}
)We must be able to differentiate from a Path of type directory and a Path of type file. Several options:
A potential measure.xml would look like
Further areas of improvements
If an existing file is what's wanted, the validateUserArguments method should probably catch the case where it doesn't exist.
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context
Trying to implement it in OS Application at openstudiocoalition/OpenStudioApplication#761
The text was updated successfully, but these errors were encountered: