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

fix(datasets): do not double encode the data as json when saving an A… #301

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

FlorianGD
Copy link
Contributor

APIDataSet

Description

When saving an APIDataSet, the data was doubly encoded as json (making it a string instead of a dict for example), once by us and once by the requests library. This PR fixes that.

Development notes

The json parameter of requests.request is now a python object instead of a string. The tests have been updated to catch the problem.

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

@noklam
Copy link
Contributor

noklam commented Aug 10, 2023

Thanks @FlorianGD Is this a bug or it has been always like this? I suspect this is introduced in #180. Is it only affecting load method? since save was only added recently I assume this doesn't affect load

CC @McDonnellJoseph

@noklam
Copy link
Contributor

noklam commented Aug 10, 2023

This looks like a good fix to me. Thanks @FlorianGD

Copy link
Contributor

@SajidAlamQB SajidAlamQB left a comment

Choose a reason for hiding this comment

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

Thank you! @FlorianGD

FlorianGD and others added 2 commits August 10, 2023 17:57
…PIDataSet

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
@noklam noklam mentioned this pull request Aug 15, 2023
4 tasks
@noklam noklam merged commit fdd6073 into kedro-org:main Aug 15, 2023
14 checks passed
lrcouto pushed a commit that referenced this pull request Aug 15, 2023
#301)

* fix(datasets): do not double encode the data as json when saving an APIDataSet

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

* chore(lint): make pyling happy

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

---------

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Nok Lam Chan <[email protected]>
Signed-off-by: lrcouto <[email protected]>
lrcouto added a commit that referenced this pull request Aug 24, 2023
* Add CONTRIBUTING.md file to the Kedro-Plugins repository

Signed-off-by: lrcouto <[email protected]>

* fix(datasets): Correct pyproject.toml syntax for optional dependencies (#302)

* Fix pyproject.toml syntax for optional dependencies

Signed-off-by: Dmitry Sorokin <[email protected]>

* refacor out the base dependencies

Signed-off-by: Nok <[email protected]>

* add comments

Signed-off-by: Nok <[email protected]>

* format pyproject.toml

Signed-off-by: Nok <[email protected]>

* Reorder pandas dependencies

Signed-off-by: Nok <[email protected]>

* reorder spark dependencies

Signed-off-by: Nok <[email protected]>

* remove polars-base and delta-base

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Nok <[email protected]>
Co-authored-by: Nok <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* Bring CONTRIBUTING.md file in line with the one on the main Kedro repo

Signed-off-by: lrcouto <[email protected]>

* Bring CONTRIBUTING.md file in line with the one on the main Kedro repo

Signed-off-by: L. R. Couto <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* docs: Fix broken link to datasets docs in README.md (#304)

fix broken link to datasets docs

Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* ci: Add docs rtd check on `kedro-datasets` (#299)

* Try adding docs rtd check on kedro datasets

Signed-off-by: Merel Theisen <[email protected]>

* Add Read the Docs configuration for kedro-datasets

Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* fix(datasets): do not double encode the data as json when saving an A… (#301)

* fix(datasets): do not double encode the data as json when saving an APIDataSet

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

* chore(lint): make pyling happy

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

---------

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Nok Lam Chan <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* build(datasets): release 1.5.2 (#305)

* release 1.5.2

minor release to fix the kedro-datasets optional dependencies issue

* Update RELEASE.md

* Trim whitespace

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Nok <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* Add plugin contribution details to CONTRIBUTING.md

Signed-off-by: lrcouto <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>

* Apply minor changes on CONTRIBUTING.md

Signed-off-by: lrcouto <[email protected]>

* Push code of conduct text block to the top on CONTRIBUTING.md

Signed-off-by: L. R. Couto <[email protected]>

* Fix trailing whitespace lint error

Signed-off-by: L. R. Couto <[email protected]>

---------

Signed-off-by: lrcouto <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Nok <[email protected]>
Signed-off-by: L. R. Couto <[email protected]>
Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Dmitry Sorokin <[email protected]>
Co-authored-by: Nok <[email protected]>
Co-authored-by: Jo Stichbury <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>
PtrBld pushed a commit to PtrBld/kedro-plugins that referenced this pull request Aug 27, 2023
kedro-org#301)

* fix(datasets): do not double encode the data as json when saving an APIDataSet

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

* chore(lint): make pyling happy

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

---------

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Nok Lam Chan <[email protected]>
PtrBld pushed a commit to PtrBld/kedro-plugins that referenced this pull request Aug 27, 2023
…-org#294)

* Add CONTRIBUTING.md file to the Kedro-Plugins repository

Signed-off-by: lrcouto <[email protected]>

* fix(datasets): Correct pyproject.toml syntax for optional dependencies (kedro-org#302)

* Fix pyproject.toml syntax for optional dependencies

Signed-off-by: Dmitry Sorokin <[email protected]>

* refacor out the base dependencies

Signed-off-by: Nok <[email protected]>

* add comments

Signed-off-by: Nok <[email protected]>

* format pyproject.toml

Signed-off-by: Nok <[email protected]>

* Reorder pandas dependencies

Signed-off-by: Nok <[email protected]>

* reorder spark dependencies

Signed-off-by: Nok <[email protected]>

* remove polars-base and delta-base

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Nok <[email protected]>
Co-authored-by: Nok <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* Bring CONTRIBUTING.md file in line with the one on the main Kedro repo

Signed-off-by: lrcouto <[email protected]>

* Bring CONTRIBUTING.md file in line with the one on the main Kedro repo

Signed-off-by: L. R. Couto <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* docs: Fix broken link to datasets docs in README.md (kedro-org#304)

fix broken link to datasets docs

Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* ci: Add docs rtd check on `kedro-datasets` (kedro-org#299)

* Try adding docs rtd check on kedro datasets

Signed-off-by: Merel Theisen <[email protected]>

* Add Read the Docs configuration for kedro-datasets

Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* fix(datasets): do not double encode the data as json when saving an A… (kedro-org#301)

* fix(datasets): do not double encode the data as json when saving an APIDataSet

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

* chore(lint): make pyling happy

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>

---------

Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Nok Lam Chan <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* build(datasets): release 1.5.2 (kedro-org#305)

* release 1.5.2

minor release to fix the kedro-datasets optional dependencies issue

* Update RELEASE.md

* Trim whitespace

Signed-off-by: Nok <[email protected]>

---------

Signed-off-by: Nok <[email protected]>
Signed-off-by: lrcouto <[email protected]>

* Add plugin contribution details to CONTRIBUTING.md

Signed-off-by: lrcouto <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>

* Update CONTRIBUTING.md

Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>

* Apply minor changes on CONTRIBUTING.md

Signed-off-by: lrcouto <[email protected]>

* Push code of conduct text block to the top on CONTRIBUTING.md

Signed-off-by: L. R. Couto <[email protected]>

* Fix trailing whitespace lint error

Signed-off-by: L. R. Couto <[email protected]>

---------

Signed-off-by: lrcouto <[email protected]>
Signed-off-by: Dmitry Sorokin <[email protected]>
Signed-off-by: Nok <[email protected]>
Signed-off-by: L. R. Couto <[email protected]>
Signed-off-by: Jo Stichbury <[email protected]>
Signed-off-by: Juan Luis Cano Rodríguez <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Signed-off-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Dmitry Sorokin <[email protected]>
Co-authored-by: Nok <[email protected]>
Co-authored-by: Jo Stichbury <[email protected]>
Co-authored-by: Merel Theisen <[email protected]>
Co-authored-by: Florian Gaudin-Delrieu <[email protected]>
Co-authored-by: Juan Luis Cano Rodríguez <[email protected]>
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.

3 participants