Skip to content

Station record report#86

Merged
joelridden merged 4 commits into4p4from
sta_record_report
Jan 21, 2026
Merged

Station record report#86
joelridden merged 4 commits into4p4from
sta_record_report

Conversation

@joelridden
Copy link
Contributor

Adds specific images and stats for sites that have a low quality count and shows information on why these sites were that are in the full database were rejected for potential further investigation.

This comes from the message from Chris in slack https://uceqeng.slack.com/archives/C019XU80PJ4/p1751240336645749

image

Also added a nzgmdb_version parameter so that when tables change amongst versions we can still compare against the same tables.

@joelridden joelridden marked this pull request as draft December 15, 2025 02:49
@gemini-code-assist
Copy link

Summary of Changes

Hello @joelridden, 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 significantly enhances the generate_report script by introducing a comprehensive "Station record report" feature. The primary goal is to provide better visibility into data quality by identifying and detailing sites with low or zero quality record counts, along with reasons for record rejection. Additionally, it adds crucial support for database versioning, allowing the report generation process to adapt to different NZGMDB table structures and facilitate accurate comparisons between database versions.

Highlights

  • Low Quality Site Reporting: The report now includes detailed statistics and a visual table for sites with low quality record counts, specifically highlighting those with zero quality records and those with fewer than 5 quality records. This provides deeper insights into data quality issues.
  • Database Versioning Support: Introduced nzgmdb_version parameters (new_version, old_version) to the report generation script, allowing for version-aware comparison of database tables and ensuring compatibility with different database structures (e.g., V4p3 vs. others).
  • Enhanced Report Content: The HTML report is augmented with new sections displaying the generated table image and a summary of sites with zero quality records, providing a more comprehensive overview of data quality.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a valuable new reporting feature for analyzing station records with low quality counts, including visualizations and statistics on why records were rejected. It also adds versioning parameters to handle different database schemas. My review has identified one critical bug related to incorrect variable usage that would lead to loading wrong data. I've also included several medium-severity recommendations to improve code robustness, maintainability, and readability, such as using constants instead of hardcoded strings, safer data parsing, and avoiding variable name reuse.

@joelridden joelridden marked this pull request as ready for review January 15, 2026 23:02
Copy link
Contributor

@AndrewRidden-Harper AndrewRidden-Harper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Out of curiosity, is there a reason for wanting these tables as images rather than CSV files?

@joelridden
Copy link
Contributor Author

Out of curiosity, is there a reason for wanting these tables as images rather than CSV files?

The images are so they can go in the report HTML file instead of just generating a csv output

@joelridden joelridden merged commit b65c568 into 4p4 Jan 21, 2026
5 checks passed
@joelridden joelridden deleted the sta_record_report branch January 21, 2026 20:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants