NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
501 stars 191 forks source link

Fix #5062 - Properly forward the --help flag to ruby/python scripts #5065

Closed jmarrec closed 9 months ago

jmarrec commented 10 months ago

Pull request overview

When script omitted, --help displays the C++ subcommand help

$os_build_rel/Products/openstudio execute_ruby_script --help
Executes a ruby file
Usage: /Users/julien/Software/Others/OS-build-release/Products/openstudio execute_ruby_script [OPTIONS] path [args...]

Positionals:
  path RUBY_SCRIPT                 Path to Ruby file
  args ARG ...                     Extra Arguments forwarded to the Ruby script

Options:
  -h,--help                        Print this help message and exit

Any additional arguments passed after the Ruby file are forwarded

When --help is passed after the ruby script, the Ruby's script is displayed (if any):

$os_build_rel/Products/openstudio execute_ruby_script execute_ruby_script_optparse_path.rb --help
Usage: execute_ruby_script_optparse_path.rb -x building.xml

The Ruby help description.

    -x, --xml <FILE>                 HPXML file

Pull Request Author

Labels:

Review Checklist

This will not be exhaustively relevant to every PR.

ci-commercialbuildings commented 10 months ago

CI Results for a52f8e00bf8cdfacd316d2c6e249b94d81fa7f9b:

wenyikuang commented 10 months ago

Looks like the mac-incremental didn't work properly. I cleaned up the disk and re-ran it.

jmarrec commented 9 months ago

@wenyikuang I just killed that rerun, it has been stalled for 8 days.

jmarrec commented 9 months ago

@shorowit When you get a chance (after the holiday season is totally fine - and happy holidays!), if you could test that this is properly solving your problem that'd be great, then we can merge. Thanks!