smiths / caseStudies

Case studies of (manual) documentation for scientific computing software
3 stars 2 forks source link

Redundant Constraint #141

Closed samm82 closed 6 years ago

samm82 commented 6 years ago

This constraint raises a ValueError if the SD is negative, but the SD is calculated by taking the square root of the sum of three positive (because they're all squared) numbers. This means that the SD can never be negative. Should we remove this constraint since it isn't possible to break? I can't make a test case (from an inputFile) that would break it.

sd

smiths commented 6 years ago

You are correct, but I still don't want to remove the constraint. At some point we will automatically be able to detect these kind of redundancies and remove them. I want to be cautious in doing it manually, especially because we don't currently have a mechanism for recording the rationale. You would remove the constraint and in the future someone might ask why it isn't constrained.

The redundancy isn't a problem, except that you cannot devise a failing test case. I think you can add a comment with your test cases that points out that this isn't possible. That way we capture your thoughts and in a round about way capture the rationale information.