Skip to content

Refactor: Improve dataset deprecation message #251

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: main
Choose a base branch
from

Conversation

neshdev
Copy link
Member

@neshdev neshdev commented May 21, 2025

I've upgraded the deprecation message for the load_dataset function to be more informative for you.

The new message now includes:

  • A statement that load_dataset will be removed in version 1.0.0.
  • An explanation that dataset_load (the replacement) offers more flexibility and new features.
  • A clear code example showing how to migrate from the old to the new function: # OLD: load_dataset(adapter, handle, path, ...) # NEW: dataset_load(adapter, handle, path, ...)

I've also added a unit test to verify that the DeprecationWarning is triggered correctly and that the content of the warning message is as expected. The test ensures that the testing environment uses the most up-to-date version of the code by modifying sys.path and using importlib.reload.

I've upgraded the deprecation message for the `load_dataset` function to be more informative for you.

The new message now includes:
- A statement that `load_dataset` will be removed in version 1.0.0.
- An explanation that `dataset_load` (the replacement) offers more flexibility and new features.
- A clear code example showing how to migrate from the old to the new function:
  # OLD: load_dataset(adapter, handle, path, ...)
  # NEW: dataset_load(adapter, handle, path, ...)

I've also added a unit test to verify that the `DeprecationWarning` is triggered correctly and that the content of the warning message is as expected. The test ensures that the testing environment uses the most up-to-date version of the code by modifying `sys.path` and using `importlib.reload`.
@neshdev neshdev marked this pull request as draft May 21, 2025 20:06
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