Progress Info must be between 0.0 and 1.0 and not 0 and 100

Summary

I just stumbled across the fact that Progress Info of Observable Commands MUST be between 0.0 and 1.0 as per Part B (https://docs.google.com/document/d/1-shgqdYW4sgYIb5vWZ8xTwCUO_bqE13oBEX8rYY_SJA/edit#heading=h.imy0e7cybn6w). Currently, sila_python restricts the Progress Info to be between 0 and 100 (see this line) which is not wrong, per se, but I find it misleading (I implemented my Servers with sila_python and send progress info with values between 0 and 100 and was wondering why my C++ client would give me values between 0 and 10000).

This line in observable_command_instance.py incorrectly

What is the current bug behaviour?

Progress Info values can be between 0 and 100

What is the expected correct behaviour?

Progress Info values should only be allowed to be between 0.0 and 1.0

Possible fixes

Either change this condition to

        if progress < 0.0 or progress > 1.0:

which would be a breaking change for all users (although I'd prefer that option), or change the progress value internally from [0...100] to [0.0...1.0] before sending it off to clients. The latter would leave the interface of the library the same but it might be confusing for users when they've read the standard which says 0.0 - 1.0 but then they have to use 0 - 100 in sila_python.

Edited Aug 18, 2022 by Florian Meinicke
Assignee Loading
Time tracking Loading