Skip to content

Conversation

@michelebastione
Copy link
Contributor

This PR aims to decouple OpenXml and Csv logic as much as possible by moving most of the OpenXml specific logic from MiniExcel.Core to the new MiniExcel.OpenXml project. MiniExcel.Csv now depends exclusively from the common mapping logic in MiniExcel.Core. This way if we decide to move in this direction, we can provide separate packages for MiniExcel.OpenXml and MiniExcel.Csv that don't depend on each other.

Even though this is a big PR the majority of the modifications are simply renaming files and adjusting namespaces. A brief summary follows:

  • OpenXml-related utilities, algorithms, models, etcetera have been moved from MiniExcel.Core to the new MiniExcel.OpenXml project for better separation of concerns and mantainability.
  • Renamed project MiniExcel.Core.Tests to MiniExcel.OpenXml.Tests.
  • Introduced the MiniExcelConverter utility in the main MiniExcel project for Csv/Xlsx conversion and updated documentation. This is a breaking change compared to the last prerelease version, as previously the conversion methods were found in CsvExporter.
  • Condensed logic for parsing Excel column names and calculating indexes from multiple files into the single class ColumnHelper, now renamed CellReferenceConverter and made available for external use, so that it also closes [Feature] - Public util methods #913
  • Updated references, namespaces, and project files accordingly.

@shps951023 @izanhzh What is your opinion? Do you agree on moving forward with this direction for the project?

- OpenXml-related utilities, algorithms, models, etcetera have been moved from MiniExcel.Core to the new MiniExcel.OpenXml project for better separation of concerns and mantainability.
- Renamed project MiniExcel.Core.Tests to MiniExcel.OpenXml.Tests.
- Updated references, namespaces, and project files accordingly.
- Introduced MiniExcelConverter utility for CSV/XLSX conversion and updated documentation.
- Condensed logic for parsing Excel column names and calculating indexes into class ColumnHelper, now renamed CellReferenceConverter and made available for external use.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @michelebastione, 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 introduces a significant architectural change by decoupling the OpenXml and Csv functionalities into separate projects. The primary goal is to allow for independent packaging and maintenance of these components, making the library more modular and flexible. This refactoring involved moving a substantial amount of OpenXml-related code, updating internal references, and centralizing common utilities like cell reference conversions. While a large change, it sets the foundation for a more maintainable and extensible MiniExcel library.

Highlights

  • OpenXml Logic Decoupling: OpenXml-specific utilities, algorithms, and models have been moved from MiniExcel.Core to a new dedicated project, MiniExcel.OpenXml, to enhance modularity and allow for separate package distribution.
  • Test Project Renaming: The MiniExcel.Core.Tests project has been renamed to MiniExcel.OpenXml.Tests to align with the new project structure.
  • New Conversion Utility: A new MiniExcelConverter utility class has been introduced in the main MiniExcel project for Csv/Xlsx conversions, replacing previous methods found in CsvExporter. This is a breaking change for conversion method calls.
  • Centralized Cell Reference Handling: Excel column name parsing and index calculation logic has been consolidated into a new public class, CellReferenceConverter (formerly ColumnHelper), improving consistency and addressing issue [Feature] - Public util methods #913.
  • Extensive Refactoring: Numerous internal helper classes and namespaces across MiniExcel.Core and MiniExcel.Csv have been refactored, renamed, or moved to support the new MiniExcel.OpenXml project and improve code organization.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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
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 successfully decouples the OpenXml and Csv logic by moving OpenXml-specific components into a new MiniExcel.OpenXml project. The changes involve extensive file renames, namespace adjustments, and updates to using statements across the codebase, which is a significant step towards better separation of concerns and maintainability. The introduction of the MiniExcelConverter utility class centralizes conversion methods, and documentation has been updated to reflect these API changes. Overall, the refactoring is well-executed and aligns with the stated goals of the pull request.

Copy link
Member

@izanhzh izanhzh left a comment

Choose a reason for hiding this comment

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

Absolutely agree with this direction! 👍

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.

[Feature] - Public util methods

2 participants