Skip to content

add lines parameter to JsonFileProcessor #459

New issue

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

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

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kitagry
Copy link
Member

@kitagry kitagry commented Mar 14, 2025

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

Copy link

@Copilot Copilot AI left a comment

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
Copy link
Member Author

kitagry commented Mar 14, 2025

@ohyan Hi, Could you review this?

@kitagry kitagry marked this pull request as draft March 14, 2025 03:20
@kitagry
Copy link
Member Author

kitagry commented Mar 14, 2025

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.

1 participant