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

docs: Update APIDataset docs and refactor #217

Merged
merged 8 commits into from
May 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 2 additions & 7 deletions kedro-datasets/RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@

## Bug fixes and other changes
* Relaxed `delta-spark` upper bound to allow compatibility with Spark 3.1.x and 3.2.x.
* Renamed `TensorFlowModelDataset` to `TensorFlowModelDataSet` to be consistent with all other plugins in kedro-datasets.

## Community contributions
Many thanks to the following Kedroids for contributing PRs to this release:

* [BrianCechmanek](https://github.com/BrianCechmanek)

# Release 1.2.1:

## Major features and improvements:

## Bug fixes and other changes
* Renamed `TensorFlowModelDataset` to `TensorFlowModelDataSet` to be consistent with all other plugins in kedro-datasets.
* [McDonnellJoseph](https://github.com/McDonnellJoseph)

# Release 1.2.0:

Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/api/api_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class APIDataSet(AbstractDataSet[None, requests.Response]):
>>> example_table = '{"col1":["val1", "val2"], "col2":["val3", "val4"]}'

>>> data_set = APIDataSet(
method = "POST"
method = "POST",
url = "url_of_remote_server",
save_args = {"chunk_size":1}
)
Expand Down Expand Up @@ -109,22 +109,22 @@ def __init__(
during load method. Adds an optional parameter, ``chunk_size`` which
determines the size of the package sent at each request.
credentials: Allows specifying secrets in credentials.yml.
Expected format is ``('login', 'password')`` if given as a tuple or list.
An ``AuthBase`` instance can be provided for more complex cases.
Expected format is ``('login', 'password')`` if given as a tuple or
list. An ``AuthBase`` instance can be provided for more complex cases.
metadata: Any arbitrary metadata.
This is ignored by Kedro, but may be consumed by users or external plugins.

Raises:
ValueError: if both ``auth`` in ``load_args`` and ``credentials`` are
specified.
ValueError: if both ``auth`` and ``credentials`` are specified or used
unsupported RESTful API method.
"""
super().__init__()

# GET method means load
if method == "GET":
self._params = load_args or {}

# PUT, POST, DELETE means save
# PUT, POST means save
elif method in ["PUT", "POST"]:
self._params = deepcopy(self.DEFAULT_SAVE_ARGS)
if save_args is not None:
Expand Down