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

[DOP-13156] Documentation improvements #79

Merged
merged 1 commit into from
Feb 15, 2024
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
6 changes: 5 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,17 @@ What is ETL Entities?
Collection of classes & decorators used for handling High Water Mark (HWM).

Currently implemented:

* HWM classes:
* ``ColumnIntHWM``
* ``ColumnDateHWM``
* ``ColumnDateTimeHWM``
* ``FileListHWM``
* ``KeyValueIntHWM``

* HWM Store classes:
* ``BaseHWMStore`` (base interface)
* ``MemoryHWMStore``
* ``BaseHWMStore`` (interface for third-party HWM store implementations)

.. installation

Expand Down
1 change: 1 addition & 0 deletions docs/changelog/next_release/79.breaking.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename ``HWMStoreClassRegistry.known_types`` to ``aliases``
4 changes: 1 addition & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,7 @@
"sphinx_toolbox.github",
"sphinxcontrib.towncrier", # provides `towncrier-draft-entries` directive
]
numpydoc_show_class_members = True
autosummary_generate_overwrite = False
autosummary_generate = False
numpydoc_show_class_members = False

# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
Expand Down
2 changes: 1 addition & 1 deletion docs/hwm/column/date_hwm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Column Date HWM

.. autoclass:: ColumnDateHWM
:members: name, set_value, dict, json, copy, deserialize
:special-members: __bool__, __add__, __sub__, __eq__, __lt__
:special-members: __add__, __sub__, __eq__, __lt__
2 changes: 1 addition & 1 deletion docs/hwm/column/datetime_hwm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Column Datetime HWM

.. autoclass:: ColumnDateTimeHWM
:members: name, set_value, dict, json, copy, deserialize
:special-members: __bool__, __add__, __sub__, __eq__, __lt__
:special-members: __add__, __sub__, __eq__, __lt__
1 change: 0 additions & 1 deletion docs/hwm/column/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Column HWM
.. toctree::
:maxdepth: 2
:caption: HWM classes
:name: column_hwm_classes

int_hwm
date_hwm
Expand Down
2 changes: 1 addition & 1 deletion docs/hwm/column/int_hwm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ Column Integer HWM

.. autoclass:: ColumnIntHWM
:members: name, set_value, dict, json, copy, deserialize
:special-members: __bool__, __add__, __sub__, __eq__, __lt__
:special-members: __add__, __sub__, __eq__, __lt__
2 changes: 1 addition & 1 deletion docs/hwm/file/file_list_hwm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ File List HWM

.. autoclass:: FileListHWM
:members: name, set_value, dict, json, copy, covers, update
:special-members: __add__, __sub__, __in__
:special-members: __add__, __sub__
1 change: 0 additions & 1 deletion docs/hwm/file/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ File HWM
.. toctree::
:maxdepth: 2
:caption: HWM classes
:name: file_hwm_classes

file_list_hwm

Expand Down
6 changes: 2 additions & 4 deletions docs/hwm/hwm_type_registry.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
HWM Type Registry
=================================================================
.. currentmodule:: etl_entities.hwm.hwm_type_registry

=================

.. currentmodule:: etl_entities.hwm.hwm_type_registry
.. autoclass:: HWMTypeRegistry
:members: get, get_key, add, parse


.. automethod:: register_hwm_type
22 changes: 0 additions & 22 deletions docs/hwm/index.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/hwm/key_value/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ KeyValue HWM
.. toctree::
:maxdepth: 2
:caption: HWM classes
:name: key_value_hwm_classes

key_value_int_hwm

Expand Down
2 changes: 1 addition & 1 deletion docs/hwm_store/base_hwm_store.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _base-hwm-store:

Base HWM Store
=================================================================
==============

.. currentmodule:: etl_entities.hwm_store.base_hwm_store

Expand Down
2 changes: 1 addition & 1 deletion docs/hwm_store/detect_hwm_store.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _detect-hwm-store:

Detect HWM Store decorator
=================================================================
==========================

.. currentmodule:: etl_entities.hwm_store.hwm_store_detect

Expand Down
9 changes: 9 additions & 0 deletions docs/hwm_store/hwm_store_stack_manager.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. _hwm-store-stack-manager:

HWM Store stack manager
=======================

.. currentmodule:: etl_entities.hwm_store.hwm_store_stack_manager

.. autoclass:: HWMStoreStackManager
:members: get_current
25 changes: 8 additions & 17 deletions docs/hwm_store/index.rst
Original file line number Diff line number Diff line change
@@ -1,24 +1,15 @@
.. _hwm-store:

HWM Store
=========
What is HWM Store
=================

.. toctree::
:maxdepth: 2
:caption: HWM store
HWM objects are stored in HWM stores.

memory_hwm_store
detect_hwm_store

.. toctree::
:maxdepth: 2
:caption: For developers

base_hwm_store
register_hwm_store_class

:ref:`hwm` values are persisted in HWM stores.
Known implementations:
* :obj:`MemoryHWMStore <etl_entities.hwm_store.memory_hwm_store.MemoryHWMStore>` (RAM)
* `YAMLHWMStore <https://onetl.readthedocs.io/en/stable/hwm_store/yaml_hwm_store.html>`_ (local file)
* `HorizonHWMStore <https://horizon-hwm-store.readthedocs.io/en/latest/horizon-hwm-store.html>`_ (external API)

It is also possible to register your own HWN Store using :ref:`register-hwm-store-class`.

You can select store based on config values using :ref:`detect-hwm-store`.
You can select store based on dict config using :ref:`detect-hwm-store`.
4 changes: 2 additions & 2 deletions docs/hwm_store/memory_hwm_store.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.. _memory-hwm-store:

In-memory HWM Store (ephemeral)
=================================================================
MemoryHWMStore
==============

.. currentmodule:: etl_entities.hwm_store.memory_hwm_store

Expand Down
10 changes: 7 additions & 3 deletions docs/hwm_store/register_hwm_store_class.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
.. _register-hwm-store-class:

Register own HWM Store decorator
=================================================================
Register own HWM Store class
============================

.. currentmodule:: etl_entities.hwm_store.hwm_store_class_registry

.. autodecorator:: register_hwm_store_class

.. currentmodule:: etl_entities.hwm_store.hwm_store_class_registry

.. autoclass:: HWMStoreClassRegistry
:members: get, add, set_default, aliases
14 changes: 11 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

.. toctree::
:maxdepth: 2
:caption: HWM lib
:name: etl_entities
:hidden:

Expand All @@ -14,14 +13,23 @@
:caption: HWM
:hidden:

hwm/index
hwm/column/index
hwm/file/index
hwm/key_value/index
hwm/hwm_type_registry

.. toctree::
:maxdepth: 2
:caption: HWM store
:caption: HWM Store
:hidden:

hwm_store/index
hwm_store/memory_hwm_store
hwm_store/base_hwm_store
hwm_store/register_hwm_store_class
hwm_store/hwm_store_stack_manager
hwm_store/detect_hwm_store


.. toctree::
:maxdepth: 2
Expand Down
2 changes: 1 addition & 1 deletion docs/old_hwm/file_list_hwm.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ File List HWM

.. autoclass:: FileListHWM
:members: name, qualified_name, set_value, dict, json, copy, serialize, deserialize, covers, update
:special-members: __bool__, __len__, __abs__, __add__, __sub__, __in__, __iter__
:special-members: __bool__, __len__, __abs__, __add__, __sub__, __contains__, __iter__
1 change: 0 additions & 1 deletion docs/old_hwm/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Old HWM classes
.. toctree::
:maxdepth: 2
:caption: HWM classes
:name: hwm_classes

int_hwm
date_hwm
Expand Down
2 changes: 1 addition & 1 deletion docs/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ How plugins are imported?
from some_plugin.module.internals import my_function

If specific module/class/function uses some registration capabilities of etl_entities,
like :ref:`hook-decorator`, it will be executed during this import.
it will be executed during this import.

How to enable/disable plugins?
------------------------------
Expand Down
1 change: 0 additions & 1 deletion docs/process/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Process classes
.. toctree::
:maxdepth: 2
:caption: Process classes
:name: process_classes

process
process_stack_manager
1 change: 0 additions & 1 deletion docs/source/db/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ DB source classes
.. toctree::
:maxdepth: 2
:caption: DB Source classes
:name: db_source_classes

column
table
1 change: 0 additions & 1 deletion docs/source/file/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ File source classes
.. toctree::
:maxdepth: 2
:caption: File source classes
:name: file_source_classes

remote_folder
2 changes: 1 addition & 1 deletion docs/source/file/remote_folder.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ RemoteFolder

.. autoclass:: RemoteFolder
:members: name, qualified_name, copy, dict, json
:special-members: __str__, __abs__, __truediv__
:special-members: __str__, __truediv__
1 change: 0 additions & 1 deletion docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Source classes
.. toctree::
:maxdepth: 2
:caption: Source classes
:name: source_classes

db/index
file/index
Loading
Loading