cacao-org / cacao

Compute And Control for Adaptive Optics
GNU General Public License v3.0
24 stars 9 forks source link

cacao script defaults to a hard-coded DM configuration #7

Closed oguyon closed 5 years ago

oguyon commented 6 years ago

cacao script refuses to accept DM configuration DM defaults to 50x50 DM size

oguyon commented 6 years ago

Error is due to running an outdated version on the C code with a recent version of the script that calls it. The functions arguments had changed between the two versions. cacao did not report the error in any user-friendly way. Had to go into the tmux session to see the error message. Then cacao defaulted to a default configuration... confusing the user.

I propose to address such problems by :

[1] Adding a version test between the source code and the script. Every script should have a version dependency, testing that the compiled code has the correct version. A clear error message should be issued in case of version mismatch.

[2] Removing the fallback to a default configuration. The code should just issue an error message, reading "Can't run XXX because YYY missing" instead of proceeding to a default configuration.

[3] Ensuring that every cacao function, when "unhappy" issues a human-readable error message to the errorlog.

I have already implemented [2] in the version I just pushed (dev branch). I am in the process of implementing [3] across the code.

a-sevin commented 6 years ago

Fully agree, the error message should be appear in the process log monitor.

a-sevin commented 6 years ago

The version control [1] is useful when you enter in the production phase and tag a stable version then you can check this tag.

When you are in a development process where your code evolves every day, you always compare a "dev" version to an other "dev" script.

At this time, I think it's not a priority but you can keep this solution for a future stable "v1.0" tagged version.