Skip to content

Commit

Permalink
Release kedro-datasets version 1.0.2 (kedro-org#112)
Browse files Browse the repository at this point in the history
* bump version and update release notes

* fix pylint errors

Signed-off-by: Danny Farah <danny_farah@mckinsey.com>
  • Loading branch information
SajidAlamQB authored and dannyrfar committed Mar 13, 2023
1 parent 3eed9f5 commit b667784
Show file tree
Hide file tree
Showing 37 changed files with 245 additions and 240 deletions.
6 changes: 5 additions & 1 deletion kedro-datasets/RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@

# Upcoming Release:
* Change reference to `kedro.pipeline.Pipeline` object throughout test suite with `kedro.modular_pipeline.pipeline` factory.

# Release 1.0.2:

## Bug fixes and other changes
* Change reference to `kedro.pipeline.Pipeline` object throughout test suite with `kedro.modular_pipeline.pipeline` factory.
* Relaxed PyArrow range in line with Pandas
* Fixed outdated links to the dill package documentation

# Release 1.0.1:

Expand Down
2 changes: 1 addition & 1 deletion kedro-datasets/kedro_datasets/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""``kedro_datasets`` is where you can find all of Kedro's data connectors."""

__version__ = "1.0.1"
__version__ = "1.0.2"
2 changes: 1 addition & 1 deletion kedro-datasets/kedro_datasets/api/api_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def __init__(
}

def _describe(self) -> Dict[str, Any]:
return dict(**self._request_args)
return {**self._request_args}

def _execute_request(self) -> requests.Response:
try:
Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/biosequence/biosequence_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,12 @@ def __init__(
self._fs_open_args_save = _fs_open_args_save

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
}

def _load(self) -> List:
load_path = get_filepath_str(self._filepath, self._protocol)
Expand Down
10 changes: 5 additions & 5 deletions kedro-datasets/kedro_datasets/dask/parquet_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def fs_args(self) -> Dict[str, Any]:
return fs_args

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
load_args=self._load_args,
save_args=self._save_args,
)
return {
"filepath": self._filepath,
"load_args": self._load_args,
"save_args": self._save_args,
}

def _load(self) -> dd.DataFrame:
return dd.read_parquet(
Expand Down
18 changes: 9 additions & 9 deletions kedro-datasets/kedro_datasets/email/message_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,15 @@ def __init__(
self._fs_open_args_save = _fs_open_args_save

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
parser_args=self._parser_args,
save_args=self._save_args,
generator_args=self._generator_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"parser_args": self._parser_args,
"save_args": self._save_args,
"generator_args": self._generator_args,
"version": self._version,
}

def _load(self) -> Message:
load_path = get_filepath_str(self._get_load_path(), self._protocol)
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/geopandas/geojson_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ def _exists(self) -> bool:
return self._fs.exists(load_path)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _release(self) -> None:
self.invalidate_cache()
Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/holoviews/holoviews_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,12 @@ def __init__(
self._save_args.update(save_args)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> NoReturn:
raise DataSetError(f"Loading not supported for '{self.__class__.__name__}'")
Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/json/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ def __init__(
self._fs_open_args_save = _fs_open_args_save

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> Any:
load_path = get_filepath_str(self._get_load_path(), self._protocol)
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/matplotlib/matplotlib_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class MatplotlibWriter(
>>> import matplotlib.pyplot as plt
>>> from kedro_datasets.matplotlib import MatplotlibWriter
>>>
>>> plots_dict = dict()
>>> plots_dict = {}
>>> for colour in ["blue", "green", "red"]:
>>> plots_dict[f"{colour}.png"] = plt.figure()
>>> plt.plot([1, 2, 3], color=colour)
Expand Down Expand Up @@ -177,12 +177,12 @@ def __init__(
self._overwrite = overwrite

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> NoReturn:
raise DataSetError(f"Loading not supported for '{self.__class__.__name__}'")
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/networkx/gml_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ def _exists(self) -> bool:
return self._fs.exists(load_path)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _release(self) -> None:
super()._release()
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/networkx/graphml_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,13 +120,13 @@ def _exists(self) -> bool:
return self._fs.exists(load_path)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _release(self) -> None:
super()._release()
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/networkx/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,13 @@ def _exists(self) -> bool:
return self._fs.exists(load_path)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _release(self) -> None:
super()._release()
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/pandas/csv_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,13 +139,13 @@ def __init__(
self._load_args.pop("storage_options", None)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> pd.DataFrame:
load_path = str(self._get_load_path())
Expand Down
16 changes: 8 additions & 8 deletions kedro-datasets/kedro_datasets/pandas/excel_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ def __init__(
self._load_args.pop("storage_options", None)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
writer_args=self._writer_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"writer_args": self._writer_args,
"version": self._version,
}

def _load(self) -> Union[pd.DataFrame, Dict[str, pd.DataFrame]]:
load_path = str(self._get_load_path())
Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/pandas/feather_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ def __init__(
self._load_args.pop("storage_options", None)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"version": self._version,
}

def _load(self) -> pd.DataFrame:
load_path = str(self._get_load_path())
Expand Down
12 changes: 6 additions & 6 deletions kedro-datasets/kedro_datasets/pandas/gbq_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,12 @@ def __init__(
)

def _describe(self) -> Dict[str, Any]:
return dict(
dataset=self._dataset,
table_name=self._table_name,
load_args=self._load_args,
save_args=self._save_args,
)
return {
"dataset": self._dataset,
"table_name": self._table_name,
"load_args": self._load_args,
"save_args": self._save_args,
}

def _load(self) -> pd.DataFrame:
sql = f"select * from {self._dataset}.{self._table_name}" # nosec
Expand Down
16 changes: 8 additions & 8 deletions kedro-datasets/kedro_datasets/pandas/generic_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ def _exists(self) -> bool:
return self._fs.exists(load_path)

def _describe(self) -> Dict[str, Any]:
return dict(
file_format=self._file_format,
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"file_format": self._file_format,
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _release(self) -> None:
super()._release()
Expand Down
16 changes: 8 additions & 8 deletions kedro-datasets/kedro_datasets/pandas/hdf_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,14 @@ def __init__(
self._fs_open_args_save = _fs_open_args_save

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
key=self._key,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"key": self._key,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> pd.DataFrame:
load_path = get_filepath_str(self._get_load_path(), self._protocol)
Expand Down
14 changes: 7 additions & 7 deletions kedro-datasets/kedro_datasets/pandas/json_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,13 @@ def __init__(
self._load_args.pop("storage_options", None)

def _describe(self) -> Dict[str, Any]:
return dict(
filepath=self._filepath,
protocol=self._protocol,
load_args=self._load_args,
save_args=self._save_args,
version=self._version,
)
return {
"filepath": self._filepath,
"protocol": self._protocol,
"load_args": self._load_args,
"save_args": self._save_args,
"version": self._version,
}

def _load(self) -> pd.DataFrame:
load_path = str(self._get_load_path())
Expand Down
Loading

0 comments on commit b667784

Please sign in to comment.