Skip to content
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

chore(datasets): Remove deprecation warning from Table Dataset #956

Merged
merged 19 commits into from
Dec 17, 2024

Conversation

ravi-kumar-pilla
Copy link
Contributor

Description

Remove deprecation warning as suggested here - Need to remove code that's marked as "to be removed": ibis dataset: https://github.com/kedro-org/kedro-plugins/blob/main/kedro-datasets/kedro_datasets/ibis/table_dataset.py#L123-L128

Development notes

  • Removed the deprecation warning from Table Dataset
  • Updated release note

Checklist

  • Opened this PR as a 'Draft Pull Request' if it is work-in-progress
  • Updated the documentation to reflect the code changes
  • Added a description of this change in the relevant RELEASE.md file
  • Added tests to cover my changes
  • Received approvals from at least half of the TSC (required for adding a new, non-experimental dataset)

@ravi-kumar-pilla ravi-kumar-pilla mentioned this pull request Dec 2, 2024
7 tasks
@ravi-kumar-pilla ravi-kumar-pilla marked this pull request as ready for review December 2, 2024 18:19
Copy link
Member

@merelcht merelcht left a comment

Choose a reason for hiding this comment

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

@deepyaman should filepath and file_format also be removed as arguments? I see in the history that you did remove them from the docstrings already.

kedro-datasets/RELEASE.md Outdated Show resolved Hide resolved
@deepyaman
Copy link
Member

@deepyaman should filepath and file_format also be removed as arguments? I see in the history that you did remove them from the docstrings already.

Yes, please!

@ravi-kumar-pilla
Copy link
Contributor Author

Yes, please!

Hi @deepyaman , I may not be fully aware of the context but what happens to the load function if we remove the parameters filepath and file_format ? I see a docstring mentioning this

So to summarize, this will affect 2 functions load and _describe. For _describe I can remove the keys from the returned dict. I am not clear on load

Thank you

@deepyaman
Copy link
Member

Yes, please!

Hi @deepyaman , I may not be fully aware of the context but what happens to the load function if we remove the parameters filepath and file_format ? I see a docstring mentioning this

So to summarize, this will affect 2 functions load and _describe. For _describe I can remove the keys from the returned dict. I am not clear on load

Thank you

All this logic can be removed; ibis.FileDataset should fully cover these functionalities.

        if self._filepath is not None:
            if self._file_format is None:
                raise NotImplementedError
            reader = getattr(self.connection, f"read_{self._file_format}")
            return reader(self._filepath, self._table_name, **self._load_args)

        else:

@deepyaman
Copy link
Member

deepyaman commented Dec 4, 2024

Will re-review after #909 is merged and this is up to date; don't think load args needs to be removed altogether.

Copy link
Member

@deepyaman deepyaman left a comment

Choose a reason for hiding this comment

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

Nevermind, I reviewed it.

kedro-datasets/kedro_datasets/ibis/table_dataset.py Outdated Show resolved Hide resolved
kedro-datasets/kedro_datasets/ibis/table_dataset.py Outdated Show resolved Hide resolved
kedro-datasets/tests/ibis/test_table_dataset.py Outdated Show resolved Hide resolved
Copy link
Member

@deepyaman deepyaman left a comment

Choose a reason for hiding this comment

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

This largely looks good to me!

One more change that probably should be added is including the removal (and directions to use FileDataset instead) in the release notes.

Since this is pretty much good, I wouldn't bother with making the changes (for the most part) until #909 gets merged and this is rebased.

kedro-datasets/kedro_datasets/ibis/table_dataset.py Outdated Show resolved Hide resolved
kedro-datasets/kedro_datasets/ibis/table_dataset.py Outdated Show resolved Hide resolved
Copy link
Member

@deepyaman deepyaman left a comment

Choose a reason for hiding this comment

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

Approving, only minor suggestions

kedro-datasets/RELEASE.md Outdated Show resolved Hide resolved
kedro-datasets/tests/ibis/test_table_dataset.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ankatiyar ankatiyar left a comment

Choose a reason for hiding this comment

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

LGTM!

@ravi-kumar-pilla ravi-kumar-pilla merged commit 83dc20f into main Dec 17, 2024
12 of 13 checks passed
@ravi-kumar-pilla ravi-kumar-pilla deleted the chore/remove-ibis-warning branch December 17, 2024 15:46
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.

4 participants