Skip to content

Commit

Permalink
opdmetl replaced by ooetl in comments and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
guglielmo committed Sep 2, 2021
1 parent 37e33f1 commit ecf9775
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
4 changes: 2 additions & 2 deletions ooetl/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def __init__(self, extractor, loader, transformation=None,
self.logger = logger
self.logger.setLevel(log_level)

# opdmetl ETL subclasses are instantiated without
# ooetl ETL subclasses are instantiated without
# the transformation arguments, so this defaults to
# the DummyTransformation, in order to be back-compatible
# the transform method override will still work
Expand Down Expand Up @@ -143,7 +143,7 @@ def transform(self, **kwargs):
as single `DataFrame` or as a dictionary of multiple
`DataFrame`, with defined labels.
Version 1.0 opdmetl ETL subclasses, directly overriding the transform method
Version 1.0 ooetl ETL subclasses, directly overriding the transform method
are back-compatible
Returns:
Expand Down
8 changes: 4 additions & 4 deletions ooetl/docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ qthelp:
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/opdmetl.qhcp"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ooetl.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/opdmetl.qhc"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ooetl.qhc"

applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
Expand All @@ -104,8 +104,8 @@ devhelp:
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/opdmetl"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/opdmetl"
@echo "# mkdir -p $$HOME/.local/share/devhelp/ooetl"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ooetl"
@echo "# devhelp"

epub:
Expand Down
6 changes: 3 additions & 3 deletions ooetl/docs/src/oo_etl.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ API
Documentation of the `ooetl` module and its submodules:
`extractors`, `loaders`, and `utils`.

opdmetl
ooetl
------
.. automodule:: ooetl
:members:
:undoc-members:
:show-inheritance:

opdmetl.extractors
ooetl.extractors
-----------------
.. automodule:: ooetl.extractors
:members:
:undoc-members:
:show-inheritance:


opdmetl.loaders
ooetl.loaders
--------------
.. automodule:: ooetl.loaders
:members:
Expand Down
34 changes: 17 additions & 17 deletions ooetl/docs/tutorial.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
Tutorial
========

This is a quick tutorial on how to use the `opdmetl` module in order to fetch
This is a quick tutorial on how to use the `ooetl` module in order to fetch
data from a SQL source and store them into a CSV destination.

The ETL process is performed by invoking the `etl()` method on a `opdmetl.ETL` instance.
The `etl()` method is a shortcut to the sequence `opdmetl.ETL::extract().transform().load()`,
which is possible, as each method returns a pointer to the `opdmetl.ETL` instance.
The ETL process is performed by invoking the `etl()` method on a `ooetl.ETL` instance.
The `etl()` method is a shortcut to the sequence `ooetl.ETL::extract().transform().load()`,
which is possible, as each method returns a pointer to the `ooetl.ETL` instance.

When the `opdmetl.ETL` instance invokes the `opdmetl.ETL::extract()` method, it invokes the corresponging
`opdmetl.Extractor::extract()` method of the *extractor*. The method extracts the data from the source
into the `opdmetl.ETL::original_data` attribute of the opdmetl.`ETL` instance.
When the `ooetl.ETL` instance invokes the `ooetl.ETL::extract()` method, it invokes the corresponging
`ooetl.Extractor::extract()` method of the *extractor*. The method extracts the data from the source
into the `ooetl.ETL::original_data` attribute of the ooetl.`ETL` instance.

The `opdmetl.ETL::transform()` method is overridden in the instance and may be used to apply
The `ooetl.ETL::transform()` method is overridden in the instance and may be used to apply
custom data transformation, before the loading phase.
The data from `opdmetl.ETL::original_data` are then transformed into `opdmetl.ETL::processed_data`.
The data from `ooetl.ETL::original_data` are then transformed into `ooetl.ETL::processed_data`.

The `opdmetl.ETL::load()` method invokes the `opdmetl.Loader::load()` method storing the data from
`opdmetl.ETL::processed_data` into the defined destination.
The `ooetl.ETL::load()` method invokes the `ooetl.Loader::load()` method storing the data from
`ooetl.ETL::processed_data` into the defined destination.

The package provides a series of simple Extractors and Loaders, derived from common abstract classes.

Expand All @@ -34,15 +34,15 @@ Loaders:
- CSVLoader(Loader) - loads file into a CSV
- ESLoader(Loader) - loads file into an ES instance

The `opdmetl.ETL` abstract class is defined in the `__init__.py` file of the `opdmetl` package.
The `ooetl.ETL` abstract class is defined in the `__init__.py` file of the `ooetl` package.

As an example, here is how to extract data from a sql source into a CSV file

.. code-block:: python
from opdmetl import ETL
from opdmetl.extractors import SqlExtractor
from opdmetl.loaders import CSVLoader
from ooetl import ETL
from ooetl.extractors import SqlExtractor
from ooetl.loaders import CSVLoader
class MySqlETL(ETL):
Expand All @@ -68,8 +68,8 @@ As an example, here is how to extract data from a sql source into a CSV file
etl.etl()
Extractors (and Loaders) may be easily extended within the projects using the `opdmetl` package.
As an example, consider the following example, extending the `opdmetl.HTMLParserExtractor`:
Extractors (and Loaders) may be easily extended within the projects using the `ooetl` package.
As an example, consider the following example, extending the `ooetl.HTMLParserExtractor`:

.. code-block:: python
Expand Down
2 changes: 1 addition & 1 deletion ooetl/transformations.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class DummyTransformation(Transformation):
"""A dummy transformation that implements a neutral transform method
original_data are passed to processed_data.
This is implemented so that ETL subclasses written with opdmetl 1.x
This is implemented so that ETL subclasses written with ooetl 1.x
are still compatible with the 2.x releases.
"""
def transform(self):
Expand Down

0 comments on commit ecf9775

Please sign in to comment.