-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gaseous Pollutants #3146
Gaseous Pollutants #3146
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## staging #3146 +/- ##
========================================
Coverage 30.45% 30.45%
========================================
Files 184 184
Lines 24362 24362
Branches 3184 3184
========================================
Hits 7419 7419
Misses 16825 16825
Partials 118 118 |
Analytics changes in this PR available for preview here |
Analytics changes in this PR available for preview here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @wabinyai this sounds and looks like an important that should be getting timely reviews. cc: @Mnoble-19 / @sserurich
@@ -36,7 +36,7 @@ class EventsModel(BasePyMongoModel): | |||
DEVICES_SUMMARY_TABLE = CONFIGURATIONS.DEVICES_SUMMARY_TABLE | |||
|
|||
def __init__(self, tenant): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @wabinyai , thanks for this. Do these gases also follow the AQI?
Hi @wabinyai , please check this PR and fix any merge conflicts that have just appeared. Thanks! |
WalkthroughWalkthroughRecent updates have enhanced the handling of pollutants in the analytics API, specifically introducing support for "co" (carbon monoxide) and "nh3" (ammonia) in multiple areas including data processing, querying, and event retrieval. These changes extend the pollutant mappings, make modifications to the analytics models, and expand the list of pollutants in relevant resource classes. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- src/analytics/api/models/events.py (11 hunks)
- src/analytics/api/utils/pollutants/pm_25.py (5 hunks)
- src/analytics/api/views/data.py (2 hunks)
Additional comments not posted (19)
src/analytics/api/utils/pollutants/pm_25.py (8)
17-18
: Verify parameter mappings for CO and NH3.Ensure that the parameters for CO and NH3 are correct and align with the system's requirements.
27-28
: Verify unit mappings for CO and NH3.Ensure that the units for CO and NH3 are correct and align with the system's requirements.
35-41
: Verify data status mappings for CO and NH3.Ensure that the data status mappings for CO and NH3 are correct and align with the system's requirements.
52-53
: Verify data status mappings for CO and NH3.Ensure that the data status mappings for CO and NH3 are correct and align with the system's requirements.
68-69
: Verify BigQuery mappings for CO and NH3.Ensure that the BigQuery mappings for CO and NH3 are correct and align with the system's requirements.
77-78
: Verify frequency mappings for CO and NH3.Ensure that the frequency mappings for CO and NH3 are correct and align with the system's requirements.
Also applies to: 84-85, 91-92
136-144
: Verify CO category mappings.Ensure that the category mappings for CO are correct and align with the system's requirements.
146-154
: Verify NH3 category mappings.Ensure that the category mappings for NH3 are correct and align with the system's requirements.
src/analytics/api/views/data.py (2)
57-57
: Verify valid pollutants for CO and NH3.Ensure that the valid pollutants for CO and NH3 are correct and align with the system's requirements.
202-202
: Verify valid pollutants for CO and NH3.Ensure that the valid pollutants for CO and NH3 are correct and align with the system's requirements.
src/analytics/api/models/events.py (9)
39-39
: Verify limit mappings for CO and NH3.Ensure that the limit mappings for CO and NH3 are correct and align with the system's requirements.
98-105
: Verify BigQuery pollutant columns for CO and NH3.Ensure that the pollutant columns for CO and NH3 are correct and align with the system's requirements.
326-333
: Verify BigQuery pollutant columns for CO and NH3.Ensure that the pollutant columns for CO and NH3 are correct and align with the system's requirements.
766-767
: Verify downloadable events fields for CO and NH3.Ensure that the fields for CO and NH3 are correct and align with the system's requirements.
Also applies to: 779-779
822-822
: Verify pollutant validation for CO and NH3.Ensure that the pollutant validation for CO and NH3 is correct and aligns with the system's requirements.
844-844
: Verify pollutant validation for CO and NH3.Ensure that the pollutant validation for CO and NH3 is correct and aligns with the system's requirements.
867-867
: Verify pollutant validation for CO and NH3.Ensure that the pollutant validation for CO and NH3 is correct and aligns with the system's requirements.
1016-1016
: Verify pollutant validation for CO and NH3.Ensure that the pollutant validation for CO and NH3 is correct and aligns with the system's requirements.
1098-1099
: Verify event fields for CO and NH3.Ensure that the fields for CO and NH3 are correct and align with the system's requirements.
Also applies to: 1111-1112
WHAT DOES THIS PR DO?
Be able to export Gaseous Pollutants
WHAT ISSUES ARE RELATED TO THIS PR?
HOW DO I TEST OUT THIS PR?
WHICH ENDPOINTS SHOULD BE READY FOR TESTING?:
ARE THERE ANY RELATED PRs?
Summary by CodeRabbit