ladybug-tools / honeybee-radiance-command

🐝 ⚡️ :abc: Honeybee wrapper around Radiance commands which is used by honeybee-radiance
https://www.ladybug.tools/honeybee-radiance-command/docs/
GNU Affero General Public License v3.0
1 stars 7 forks source link

Rfluxmtx and (possibly) rcontrib do not allow the setting of multiprocessing option in certain cases #229

Closed ghost closed 2 years ago

ghost commented 2 years ago

The error is this: image

This is what I am trying to do: image The reason to do this is to redirect the rfluxmtx output to multiple matrices at the same time while tracing rays one. So, this is a pretty useful option.

I think the reason why this is raising exceptions is that we are relying on the on_setattr method inherited from rtrace.

ghost commented 2 years ago

The solution will be to override/reimplement the rtrace setattr method in rcontrib. Except for (i or I), most of the conditional tests that are being run for rtrace are not relevant for rcontrib anyway as the ambient caching parameters are not applicable for rcontrib.

mostaphaRoudsari commented 2 years ago

Hi @built-tools! Yes. This is on me and the error here is based on the rtrace documentation assuming the -o here is for -ospec.

image

image

Here is the code that is raising the error:

https://github.com/ladybug-tools/honeybee-radiance-command/blob/858df588e8dd4c07121b88aac4cdfe6154b58664/honeybee_radiance_command/options/rtrace.py#L121-L124

I like the idea of re-writing the one for rcontrib - another solution is to do a check for the class name using self.__class__.__name__ and only remove the unrelevant checks when the name is not RtraceOptions.

ghost commented 2 years ago

This was addressed by https://github.com/ladybug-tools/honeybee-radiance-command/pull/230