Prometeo-Pyrrha icon indicating copy to clipboard operation
Prometeo-Pyrrha copied to clipboard

Add gauge tests and tests for a second gas. Also finish off documentation.

Open JSegrave-IBM opened this issue 5 years ago • 3 comments

Add gauge tests and tests for a second gas.

  1. Previously, the tests only tested the TWA exposure calculations, not the comparison of those exposures to the corresponding limits - i.e. the limit 'gauge' percentages. This change adds those tests.
  2. Previously, the tests only tested one gas - carbon monoxide. This change adds tests for nitrogen dioxide as well. We don't have real nitrogen dioxide data yet, so it's mocked up data.

Additional changes to support these tests: 3. Added gas-specific rounding factors as carbon monoxide and nitrogen dioxide have different ranges. 4. Added the ability to let the tests override the windows & limits configurations, as the test results are all tied to a specific configuration. 5. Added CAL-OSHA, NIOSH and AEGL-2 example configurations to show how configuration might differ for other geographical regions, such as the NIOSH/ACGIH, CAL-OSHA or AEGL-2. This also facilitated confirming that the tests should fail (and do) when the wrong configuration is used. 6. Finished off outstanding documentation and dealt with most of the TODO's. 7. Modified DB field names to make them less sensitive to configuration changes. Fields for the different time-window TWAs are now named the after the number of minutes in that window (stable) and not by the display name (less stable and prone to SQL issues).

JSegrave-IBM avatar Sep 28 '20 09:09 JSegrave-IBM

PR https://github.com/Code-and-Response/Prometeo-Rules-Decision/pull/9

JSegrave-IBM avatar Sep 29 '20 00:09 JSegrave-IBM

@lidderupk - I added the DB field name change to this issue & associated PR.

  1. Modified DB field names to make them less sensitive to configuration changes. Fields for the different time-window TWAs are now named the after the number of minutes in that window (stable) and not by the display name (less stable and prone to SQL issues).

JSegrave-IBM avatar Oct 01 '20 23:10 JSegrave-IBM

Dependent on:

JSegrave-IBM avatar Oct 02 '20 00:10 JSegrave-IBM