Skip to content

Dev/yanz/v4/06 - #833

Merged
hustcc merged 7 commits into
v4from
dev/yanz/v4/06
Nov 4, 2025
Merged

Dev/yanz/v4/06#833
hustcc merged 7 commits into
v4from
dev/yanz/v4/06

Conversation

@Yzing

@Yzing Yzing commented Nov 4, 2025

Copy link
Copy Markdown

PR includes

  • fixed #0
  • add test cases for extract module
  • documents, demos

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @Yzing, 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 undertakes a significant refactoring effort to enhance the modularity and clarity of data handling within the project. By dedicating a distinct extract module for data extraction and processing, the changes aim to streamline data flow and improve maintainability. The accompanying test reorganizations and additions ensure that the core data functionalities remain robust and well-tested after the structural overhaul.

Highlights

  • Module Renaming and Restructuring: The core data module has been extensively refactored and renamed to extract, impacting numerous files across the codebase, including imports and file paths. This change aims to better reflect the module's responsibility for data extraction and processing.
  • Test File Reorganization: Many integration test files for chart advising (e.g., area.test.ts, bubble.test.ts) have been removed or renamed and moved to a more consolidated location within packages/ava/__tests__/integration/advisor/. Several other test files related to dataprops, ckbDict, and insight have also been removed.
  • New Unit Tests for Data Extraction: New unit tests have been added for the extractData function in packages/ava/__tests__/unit/extract/index.test.ts, covering various input types such as string, plain, hierarchy, and relation data, ensuring the robustness of the refactored extraction logic.
  • Renderer Integration Update: The Advisor class now uses a getRenderer() function to access the chart rendering functionality, and the RENDERER variable in bind.ts is no longer directly exported, promoting a more encapsulated approach to renderer management.
  • Data Structure and Type Refinements: Updates were made to data structure handling, particularly in packages/ava/src/extract/infer/hierarchy.ts and packages/ava/src/extract/infer/relation.ts, to improve standardization and validation of hierarchical and relational data. The DataShard type in packages/ava/src/types/data.ts also saw a refinement in its metas property type.
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.

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

Copy link
Copy Markdown
Contributor

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 is a significant refactoring, migrating the data module to a new extract module, which improves the project structure. It also includes several valuable bug fixes and typing enhancements, such as correcting the graph validation logic and improving the DataShard type. The addition of test cases for the new extract module is a positive step. However, a large number of old tests have been removed; it would be beneficial to confirm that these are either obsolete or will be replaced to maintain test coverage.

Comment thread packages/ava/__tests__/unit/bind.spec.ts Outdated
Comment on lines +384 to +386
const isValid = hasValidNodes && hasValidEdges;

if (isValidGraph) {
if (isValid) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

This change fixes a significant bug in the graph validation logic. The previous condition nodes.length === 0 was contradictory and would prevent valid graphs from being recognized. The new logic hasValidNodes && hasValidEdges is correct. Great catch!

Yzing and others added 2 commits November 4, 2025 10:57
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@Yzing
Yzing requested review from hustcc and leondt1 November 4, 2025 06:20
@hustcc
hustcc merged commit a310992 into v4 Nov 4, 2025
1 check failed
@hustcc
hustcc deleted the dev/yanz/v4/06 branch November 4, 2025 06:28
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.

2 participants