Add FMI Silam Air Quality Ingest and Wildfire Smoke Ingest#465
Add FMI Silam Air Quality Ingest and Wildfire Smoke Ingest#465cloneofghosts wants to merge 28 commits into
Conversation
Summary of ChangesHello @cloneofghosts, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request reintroduces the FMI Silam air quality ingest script, enabling the system to fetch, process, and store global air quality forecast data from the THREDDS server. It includes a robust implementation of the EPA NowCast algorithm and a comprehensive Air Quality Index (AQI) calculation utility, ensuring accurate and up-to-date air quality reporting. This enhancement significantly improves the system's capability to provide detailed air quality information. Highlights
Ignored Files
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
@copilot Can we update the tests to also include tests for the calculate_aqi function to make sure everything is working properly there? The breakpoints for the different concentrations are in both ingest_utils.py and the tests. Can define them as constants in a shared file so they aren't defined twice? |
|
@cloneofghosts I've opened a new pull request, #466, to work on those changes. Once the pull request is ready, I'll request review from you. |
…466) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com>
|
/gemini review |
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
Just making a mental note of what is left for this:
|
|
@alexander0042 Guessing this is more of a 2.10/3.0 PR? Seems like it's a bit complex to get working and I know the plan is for this to launch this month. |
This comment was marked as resolved.
This comment was marked as resolved.
|
@cloneofghosts I've opened a new pull request, #478, to work on those changes. Once the pull request is ready, I'll request review from you. |
…tests for air quality ingest (#478) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new ingest script for FMI Silam air quality data, which is a great addition. The implementation is well-structured, with new modules for constants, conversion utilities, and AQI calculation logic. The inclusion of a comprehensive test suite (test_silam_aqi.py) is particularly commendable, as it covers unit tests, integration tests, and edge cases for the new complex logic.
My review focuses on improving maintainability and adhering to the project's style guide. I've pointed out several instances of variable names that don't follow the snake_case convention. I've also identified opportunities to reduce code duplication by refactoring repetitive blocks into helper functions, particularly for creating placeholder data arrays and for handling file output. Additionally, I've suggested using os.path.join for constructing file paths to ensure cross-platform compatibility.
Overall, this is a solid contribution. Addressing the feedback will make the new code even more robust and easier to maintain.
|
@cloneofghosts I've opened a new pull request, #493, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com>
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces two new data ingest scripts for FMI Silam air quality and IS4FIRES wildfire smoke data. It also adds the necessary utility functions for AQI calculation, data conversion, and corresponding constants and tests. The changes are well-structured, and the addition of tests is particularly valuable.
My review focuses on improving adherence to the project's style guide, particularly regarding naming conventions, import order, and the use of type hints. I've also identified opportunities to improve code maintainability by using os.path.join for path construction and refactoring duplicated code blocks. The new utility functions are solid, but could be enhanced with type hints for better clarity and static analysis.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
|
@copilot Ingest tests started failing with this error: API/silam_conversion.py:42: TypeError |
|
@cloneofghosts I've opened a new pull request, #509, to work on those changes. Once the pull request is ready, I'll request review from you. |
…509) Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com>
|
@alexander0042 Like the other PR am curious on what the timeline is to get this merged in since this has been in progress for a while now. |
|
@copilot Could we add ingest for this AQI model as well? https://www.nco.ncep.noaa.gov/pmb/products/aqm/ It updates at 06Z and 12Z and we can ingest hourly PM2.5 and Ozone and as for AQI - how would it work with SILAM AQI calculations? This data should be used where available but the SILAM ingest is storing AQI as a parameter and while we could take the maximum if SILAM PM2.5 is higher then the AQM model the maximum may not make sense. Do we need to do the AQI calculations in the API instead and how would that work since all parameters are averages? |
|
@cloneofghosts I've opened a new pull request, #588, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: cloneofghosts <10248058+cloneofghosts@users.noreply.github.com> Co-authored-by: Kev <cloneofghosts@users.noreply.github.com>
50955a5 to
a6ca736
Compare
Describe the change
Add back the scripts for FMI Silam air quality.
Type of change
Checklist