Call-for-Code / Call-for-Code/Prometeo-Pyrrha

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

Open
#116 3 comments 0 reactions 1 assignee Claimed by @JSegrave-IBM View on GitHub
command-center data-scientist-analyst enhancement
Dominant language
JavaScript
Stars
27
Forks
18
PR merge metrics
No merged PRs in 30d

Description

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](https://www.osha.gov/dsg/annotated-pels/tablez-1.html), [CAL-OSHA](https://www.osha.gov/dsg/annotated-pels/tablez-1.html) or [AEGL-2](https://www.epa.gov/aegl/carbon-monoxide-results-aegl-program). 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).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.