Skip to content

Refactor: route DataNode.read() and write() to _DataNodeManager #2533

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

Merged
merged 4 commits into from
Apr 7, 2025

Conversation

trgiangdo
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature

Description

This PR reroutes the DataNode.read() and write() methods to call to the manager methods.

Related Tickets & Documents

@trgiangdo trgiangdo self-assigned this Apr 3, 2025
@trgiangdo trgiangdo requested a review from jrobinAV April 3, 2025 00:39
@jrobinAV jrobinAV requested a review from Copilot April 3, 2025 09:46
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 refactors how data nodes perform read and write operations by routing these operations through the _DataManagerFactory’s manager methods. The changes include updating multiple test files to call the new _read, _append, and _write methods instead of using read_or_raise, as well as streamlining the NoData exception messaging.

Reviewed Changes

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

Show a summary per file
File Description
tests/core/data/test_read_parquet_data_node.py Updated test to assert NoData using manager’s _read method.
tests/core/data/test_read_excel_data_node.py Replaced calls to read_or_raise with manager’s _read in tests.
tests/core/data/test_read_csv_data_node.py Updated test to use the manager’s _read method for NoData conditions.
tests/core/data/test_pickle_data_node.py Adjusted test to assert NoData using the manager’s _read method.
tests/core/data/test_json_data_node.py Refactored test to call manager’s _read instead of read_or_raise.
tests/core/data/test_in_memory_data_node.py Updated test to use the manager’s _read method for NoData scenarios.
tests/core/data/test_data_node.py Updated test to assert NoData using the manager’s _read method.
taipy/core/exceptions/exceptions.py Simplified the NoData exception docstring.
taipy/core/data/data_node.py Delegated read(), write(), and append() operations to the manager methods.
taipy/core/data/_data_manager.py Introduced _read, _append, and _write methods to handle data node operations.
taipy/core/_orchestrator/_dispatcher/_task_function_wrapper.py Updated input reading to use the manager’s _read method.

Copy link
Member

@jrobinAV jrobinAV left a comment

Choose a reason for hiding this comment

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

We need to keep the public API.

Besides this, we may want to add non-regression tests on the new methods in the data manager.

@trgiangdo trgiangdo requested a review from jrobinAV April 4, 2025 09:06
@trgiangdo trgiangdo merged commit b9edfd9 into develop Apr 7, 2025
128 checks passed
@trgiangdo trgiangdo deleted the refactor/route-datanode-read-write-to-manager branch April 7, 2025 13:45
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