Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Support Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) #53

Merged
merged 4 commits into from
Apr 29, 2024

Conversation

nao1215
Copy link
Owner

@nao1215 nao1215 commented Apr 29, 2024

Summary by CodeRabbit

  • New Features

    • Introduced Excel file support, including importing, exporting, and handling various Excel formats.
    • Added numerical sorting and enhanced JSON handling.
    • Command-line tool updated with new options for Excel output and specifying sheet names.
  • Bug Fixes

    • Enhanced JSON repository functionality and fixed related issues.
  • Documentation

    • Updated help documentation to reflect new features and command modifications.
  • Refactor

    • Updated internal configurations and dependencies for better performance and maintainability.
  • Tests

    • Added new test cases for Excel operations and updated existing tests to accommodate new features.

Copy link
Contributor

coderabbitai bot commented Apr 29, 2024

Warning

Rate Limit Exceeded

@nao1215 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 15 minutes and 17 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.
Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
Please see our FAQ for further information.

Commits Files that changed from the base of the PR and between 7c8cb10 and 3e75a79.

Walkthrough

The update to version v0.6.5 brings significant enhancements, focusing on Excel file manipulation, improved JSON handling, command-line options, and dependency management. Notable additions include sorting capabilities, Excel data dumping, and expanded command-line functionalities, enhancing user interactions and backend processing.

Changes

Files Change Summary
config/argument.go, shell/command.go,
shell/import.go, shell/mode.go,
shell/shell.go, shell/shell_test.go
Enhanced support for Excel output and
sheet name specification in command-line interfaces.
domain/model/excel.go, domain/model/table.go,
domain/repository/excel.go, infrastructure/persistence/excel.go,
usecase/excel.go
Introduced structures and functionalities for
handling Excel file formats and operations.
shell/extension.go, shell/dump.go,
shell/testdata/...
Updated shell commands and test data to
support new file formats and dumping mechanisms.
infrastructure/sql.go, main_test.go Added SQL utilities and test cases for
improved data handling and format conversion.
CHANGELOG.md, config/testdata/usage.golden,
di/wire.go, domain/repository/json.go,
infrastructure/memory/sqlite3.go
General updates in project configuration,
dependency management, and minor enhancements in JSON and database interactions.

🐇✨
In the meadow of code, under the moon's soft glow,
A rabbit hops along, with updates in tow.
Excel sheets flutter, JSON strings align,
Commands now smarter, oh how they shine!
Cheers to v0.6.5, with bugs now in retreat,
Onward we code, with every hop so sweet!
🌟🐾


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

This comment has been minimized.

This comment has been minimized.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

Out of diff range and nitpick comments (4)
CHANGELOG.md (2)

1-1: Ensure the version update entry is detailed enough to reflect all major changes.

Consider adding more details about the new features and bug fixes introduced in v0.6.5 to provide a clearer change log for users and developers.


Line range hint 3-3: Remove extra blank lines to maintain clean and professional documentation formatting.

- 
domain/model/table.go (1)

211-215: Using the CSV print method for Excel output is a pragmatic initial approach, but consider implementing a true Excel format output in the future for better user experience.

shell/shell.go (1)

99-99: The welcome message formatting update is a minor but nice touch for user experience.

This comment has been minimized.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Out of diff range and nitpick comments (2)
README.md (2)

Line range hint 23-23: Correct the grammatical error in the sentence.

- If you does not have the golang development environment installed on your system, please install golang from the [golang official website](https://go.dev/doc/install).
+ If you do not have the Golang development environment installed on your system, please install Golang from the [Golang official website](https://go.dev/doc/install).

123-128: Review the formatting and presentation of the command options.

Consider aligning the descriptions of the options for better readability.

@@ -8,13 +8,13 @@
![GitHub](https://img.shields.io/github/license/nao1215/sqly)
![demo](./doc/img/demo.gif)

**sqly** command imports CSV/TSV/LTSV/JSON file(s) into an in-memory DB and executes SQL against the CSV/TSV/LTSV/JSON. sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, sql syntax is same as SQLite3.
**sqly** command imports CSV/TSV/LTSV/JSON and Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) file(s) into an in-memory DB and executes SQL against them. sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, sql syntax is same as SQLite3.
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure the sentence starts with an uppercase letter.

- **sqly** command imports CSV/TSV/LTSV/JSON and Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) file(s) into an in-memory DB and executes SQL against them. sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, sql syntax is same as SQLite3.
+ **Sqly** command imports CSV/TSV/LTSV/JSON and Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) file(s) into an in-memory DB and executes SQL against them. Sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, SQL syntax is the same as SQLite3.

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
**sqly** command imports CSV/TSV/LTSV/JSON and Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) file(s) into an in-memory DB and executes SQL against them. sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, sql syntax is same as SQLite3.
**Sqly** command imports CSV/TSV/LTSV/JSON and Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) file(s) into an in-memory DB and executes SQL against them. Sqly uses [SQLite3](https://www.sqlite.org/index.html) as its DB. So, SQL syntax is the same as SQLite3.

Copy link
Contributor

HOTTEST report

PASS FAIL SKIP TOTAL DURATION
216 0 0 216 2.263676192s

Reported by hottest

Copy link
Contributor

Code Metrics Report

main (670e1a4) #53 (a5328a9) +/-
Coverage 86.2% 83.8% -2.4%
Test Execution Time 2s 7s +5s
Details
  |                     | main (670e1a4) | #53 (a5328a9) |  +/-  |
  |---------------------|----------------|---------------|-------|
- | Coverage            |          86.2% |         83.8% | -2.4% |
  |   Files             |             35 |            38 |    +3 |
  |   Lines             |            841 |           914 |   +73 |
+ |   Covered           |            725 |           766 |   +41 |
- | Test Execution Time |             2s |            7s |   +5s |

Code coverage of files in pull request scope (86.8% → 82.8%)

Files Coverage +/-
config/argument.go 98.6% +0.1%
di/wire_gen.go 87.9% +0.8%
domain/model/excel.go 100.0% +100.0%
domain/model/table.go 94.7% -2.5%
infrastructure/memory/sqlite3.go 77.3% +1.1%
infrastructure/persistence/excel.go 42.4% +42.4%
infrastructure/sql.go 97.6% 0.0%
shell/command.go 100.0% 0.0%
shell/dump.go 92.3% -3.7%
shell/extension.go 100.0% +100.0%
shell/import.go 74.5% -9.9%
shell/mode.go 93.8% -6.2%
shell/shell.go 65.2% 0.0%
shell/utils.go 0.0% -100.0%
usecase/excel.go 66.7% +66.7%

Reported by octocov

@nao1215 nao1215 merged commit b2fb23f into main Apr 29, 2024
8 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant