Skip to content

Insertion script for inserting people profiles#139

Merged
zaeema-n merged 16 commits intoLDFLK:mainfrom
zaeema-n:insert-profiles
Feb 20, 2026
Merged

Insertion script for inserting people profiles#139
zaeema-n merged 16 commits intoLDFLK:mainfrom
zaeema-n:insert-profiles

Conversation

@zaeema-n
Copy link
Member

This pr closes #138
It updates the insertion script to insert person's profiles.

@zaeema-n zaeema-n requested a review from ChanukaUOJ February 16, 2026 09:53
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @zaeema-n, 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 data ingestion script by introducing the capability to process and ingest citizen profiles defined in YAML files. It adds a dedicated mode for profile ingestion, allowing the script to identify citizen entities and attach their associated profile data as structured attributes, improving the system's ability to manage detailed person-specific information. This change streamlines the process of updating and enriching citizen data within the system.

Highlights

  • Citizen Profile Ingestion: Introduced comprehensive functionality to process and ingest citizen profiles from YAML files, allowing for structured profile data to be attached to citizen entities.
  • New Command-Line Argument: Added a --profiles argument to the ingest_data_yaml.py script, enabling a dedicated mode for processing only citizen profiles without requiring a year parameter.
  • Entity Resolution for Citizens: Implemented a new service function find_citizen_by_name to efficiently locate existing citizen entities by their name for profile association.
  • YAML Parsing Enhancements: Extended the YAML parser with methods to extract citizen entries and their associated profile paths from the manifest, supporting flexible YAML structures.
Changelog
  • ingestion/ingest_data_yaml.py
    • Imported find_citizen_by_name from entity_resolver.
    • Added process_citizen_entry to handle individual citizen entries and their profiles.
    • Added process_profiles to iterate through and process multiple profiles for a citizen.
    • Added add_profile_attribute to read data.json from profile paths, sanitize data, and update citizen entities with profile attributes.
    • Introduced a --profiles command-line argument to enable a dedicated profile processing mode.
    • Modified the main function to conditionally process governments/ministers or citizens/profiles based on the --profiles argument.
  • ingestion/services/entity_resolver.py
    • Added find_citizen_by_name function to search for and retrieve citizen entities by name.
  • ingestion/services/yaml_parser.py
    • Added get_citizens static method to extract citizen entries from a YAML manifest.
    • Added get_profiles static method to extract profile paths from a citizen entry.
Activity
  • No human activity has been recorded on this pull request yet.
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.

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-02-20 05:37 UTC

@github-actions
Copy link

github-actions bot commented Feb 16, 2026

📦 Documentation Build

Status Artifact
✅ Build successful Download docs-build-pr-139

To preview locally:

  1. Click the artifact link above
  2. Scroll to "Artifacts" section and download docs-build-pr-139
  3. Extract the zip file
  4. Run npx serve . in the extracted folder
  5. Open http://localhost:3000

Built from commit f21b1b1

Copy link
Contributor

@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 functionality to ingest person profiles from YAML files. The changes are well-structured, adding new functions to handle citizen profiles and a command-line flag to trigger this specific mode. My review includes a high-severity comment about a potential bug where citizen profiles might be processed unintentionally, along with several medium-severity suggestions for refactoring to improve code clarity and reduce duplication. All original comments were kept as they did not contradict any of the provided rules. Overall, the changes are good, and with these adjustments, the code will be more robust and maintainable.

Copy link
Member

@ChanukaUOJ ChanukaUOJ left a comment

Choose a reason for hiding this comment

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

Added some initial comments!

Copy link
Member

@ChanukaUOJ ChanukaUOJ left a comment

Choose a reason for hiding this comment

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

LGTM!

@zaeema-n zaeema-n merged commit 09673f4 into LDFLK:main Feb 20, 2026
3 checks passed
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.

Write insertion script for profile data

2 participants