From 5adbb5a61e423f32f3e90fb36527bac399d55e3b Mon Sep 17 00:00:00 2001 From: Steve Nyemba Date: Wed, 24 Apr 2024 13:00:03 -0500 Subject: [PATCH] bug fixes and documentation --- README.md | 5 +++-- transport/iowrapper.py | 14 +++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index ff8bd39..528176d 100644 --- a/README.md +++ b/README.md @@ -4,12 +4,13 @@ This project implements an abstraction of objects that can have access to a vari # Why Use Data-Transport ? -Mostly data scientists that don't really care about the underlying database and would like a simple and consistent way to read/write data and have will be well served. Additionally we implemented lightweight Extract Transform Loading API and command line (CLI) tool. +Mostly data scientists that don't really care about the underlying database and would like a simple and consistent way to read/write and move data are well served. Additionally we implemented lightweight Extract Transform Loading API and command line (CLI) tool. Finally it is possible to add pre/post processing pipeline functions to read/write 1. Familiarity with **pandas data-frames** 2. Connectivity **drivers** are included 3. Mining data from various sources -4. Useful for data migrations or ETL +4. Useful for data migrations or **ETL** + ## Installation diff --git a/transport/iowrapper.py b/transport/iowrapper.py index f113d85..df6b2ec 100644 --- a/transport/iowrapper.py +++ b/transport/iowrapper.py @@ -6,9 +6,9 @@ class IO: """ Base wrapper class for read/write """ - def __init__(self,_agent,loader): + def __init__(self,_agent,plugins): self._agent = _agent - self._loader = loader + self._plugins = plugins def meta (self,**_args): if hasattr(self._agent,'meta') : return self._agent.meta(**_args) @@ -21,7 +21,7 @@ class IO: """ applying pre/post conditions given a pipeline expression """ - for _pointer in self._loader : + for _pointer in self._plugins : _data = _pointer(_data) def apply(self,_query): if hasattr(self._agent,'apply') : @@ -32,8 +32,8 @@ class IReader(IO): super().__init__(_agent,pipeline) def read(self,**_args): _data = self._agent.read(**_args) - if self._loader and self._loader.ratio() > 0 : - _data = self._loader.apply(_data) + if self._plugins and self._plugins.ratio() > 0 : + _data = self._plugins.apply(_data) # # output data return _data @@ -41,7 +41,7 @@ class IWriter(IO): def __init__(self,_agent,pipeline=None): super().__init__(_agent,pipeline) def write(self,_data,**_args): - if self._loader and self._loader.ratio() > 0 : - _data = self._loader.apply(_data) + if self._plugins and self._plugins.ratio() > 0 : + _data = self._plugins.apply(_data) self._agent.write(_data,**_args)