Skip to content

add lines parameter to JsonFileProcessor#459

Draft
kitagry wants to merge 1 commit into
masterfrom
fix-json-processor
Draft

add lines parameter to JsonFileProcessor#459
kitagry wants to merge 1 commit into
masterfrom
fix-json-processor

Conversation

@kitagry

@kitagry kitagry commented Mar 14, 2025

Copy link
Copy Markdown
Member

I think auto enabled lines is a bit confusing. So, I think it is preferable to specify lines=True explicitly.

Copilot AI 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.

Pull Request Overview

This PR updates the JsonFileProcessor to allow explicitly specifying the JSON lines mode by adding a new parameter, lines, to its constructor. It also updates the processing of .ndjson files and adjusts test cases accordingly.

  • Added a new parameter (lines) to JsonFileProcessor with a default value of False.
  • Modified load and dump methods to use the explicit lines parameter instead of auto-enabling based on orient.
  • Updated the .ndjson file configuration and corresponding tests to explicitly set lines mode.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
gokart/file_processor.py Added a new lines parameter to JsonFileProcessor and updated its usage.
test/test_file_processor.py Modified tests to account for the new lines parameter in JsonFileProcessor.

@kitagry

kitagry commented Mar 14, 2025

Copy link
Copy Markdown
Member Author

@ohyan Hi, Could you review this?

@kitagry kitagry marked this pull request as draft March 14, 2025 03:20
@kitagry

kitagry commented Mar 14, 2025

Copy link
Copy Markdown
Member Author

Sorry, I think about more kindful interface, so I change this PR to draft

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