Skip to content

Commit

Permalink
feat: add registry module
Browse files Browse the repository at this point in the history
Add the ``sghi.registry`` module. This contains the ``Registry`` interface and a reference implementation of the interface as well as other supporting components.
  • Loading branch information
kennedykori committed Aug 21, 2023
1 parent 709d2e6 commit de36187
Show file tree
Hide file tree
Showing 24 changed files with 557 additions and 30 deletions.
2 changes: 1 addition & 1 deletion app/sghi-commons/docs/source/_templates/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

.. autoclass:: {{ objname }}
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
6 changes: 6 additions & 0 deletions app/sghi-commons/docs/source/api/sghi.app.registry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
sghi.app.registry
=================

.. currentmodule:: sghi.app

.. autodata:: registry
1 change: 1 addition & 0 deletions app/sghi-commons/docs/source/api/sghi.app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:toctree:

dispatcher
registry
conf


Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.config.config.Config
sghi.config.config.Config
=========================

.. currentmodule:: sghi.config.config

.. autoclass:: Config
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.config.setting\_initializer.SettingInitializer
sghi.config.setting\_initializer.SettingInitializer
===================================================

.. currentmodule:: sghi.config.setting_initializer

.. autoclass:: SettingInitializer
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
4 changes: 2 additions & 2 deletions app/sghi-commons/docs/source/api/sghi.dispatch.Dispatcher.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.dispatch.Dispatcher
sghi.dispatch.Dispatcher
========================

.. currentmodule:: sghi.dispatch

.. autoclass:: Dispatcher
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
4 changes: 2 additions & 2 deletions app/sghi-commons/docs/source/api/sghi.dispatch.Receiver.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.dispatch.Receiver
sghi.dispatch.Receiver
======================

.. currentmodule:: sghi.dispatch

.. autoclass:: Receiver
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
4 changes: 2 additions & 2 deletions app/sghi-commons/docs/source/api/sghi.dispatch.Signal.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.dispatch.Signal
sghi.dispatch.Signal
====================

.. currentmodule:: sghi.dispatch

.. autoclass:: Signal
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
4 changes: 2 additions & 2 deletions app/sghi-commons/docs/source/api/sghi.dispatch.connect.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.dispatch.connect
sghi.dispatch.connect
=====================

.. currentmodule:: sghi.dispatch

.. autoclass:: connect
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.disposable.decorators.not\_disposed
sghi.disposable.decorators.not\_disposed
========================================

.. currentmodule:: sghi.disposable.decorators

.. autoclass:: not_disposed
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.disposable.disposable.Disposable
sghi.disposable.disposable.Disposable
=====================================

.. currentmodule:: sghi.disposable.disposable

.. autoclass:: Disposable
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sghi.registry.NoSuchRegistryItemError
=====================================

.. currentmodule:: sghi.registry

.. autoexception:: NoSuchRegistryItemError
:members:
:show-inheritance:
:inherited-members:
:member-order: groupwise














.. automethod:: __init__
47 changes: 47 additions & 0 deletions app/sghi-commons/docs/source/api/sghi.registry.Registry.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
sghi.registry.Registry
======================

.. currentmodule:: sghi.registry

.. autoclass:: Registry
:members:
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise


----




.. rubric:: Methods

.. autosummary::

~Registry.__init__
~Registry.get
~Registry.of
~Registry.pop
~Registry.setdefault






.. rubric:: Attributes

.. autosummary::

~Registry.dispatcher




----



.. automethod:: __init__
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
sghi.registry.RemoveRegistryItemSignal
======================================

.. currentmodule:: sghi.registry

.. autoclass:: RemoveRegistryItemSignal
:members:
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise


----




.. rubric:: Methods

.. autosummary::

~RemoveRegistryItemSignal.__init__






.. rubric:: Attributes

.. autosummary::

~RemoveRegistryItemSignal.item_key




----



.. automethod:: __init__
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
sghi.registry.SetRegistryItemSignal
===================================

.. currentmodule:: sghi.registry

.. autoclass:: SetRegistryItemSignal
:members:
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise


----




.. rubric:: Methods

.. autosummary::

~SetRegistryItemSignal.__init__






.. rubric:: Attributes

.. autosummary::

~SetRegistryItemSignal.item_key
~SetRegistryItemSignal.item_value




----



.. automethod:: __init__
32 changes: 32 additions & 0 deletions app/sghi-commons/docs/source/api/sghi.registry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,35 @@
=============

.. automodule:: sghi.registry











.. rubric:: Classes

.. autosummary::
:toctree:
:template: class.rst

Registry
RemoveRegistryItemSignal
SetRegistryItemSignal





.. rubric:: Exceptions

.. autosummary::
:toctree:
:template: exception.rst

NoSuchRegistryItemError
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.task.common.Chainable
sghi.task.common.Chainable
==========================

.. currentmodule:: sghi.task.common

.. autoclass:: Chainable
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.task.common.Consumer
sghi.task.common.Consumer
=========================

.. currentmodule:: sghi.task.common

.. autoclass:: Consumer
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.task.common.Pipeline
sghi.task.common.Pipeline
=========================

.. currentmodule:: sghi.task.common

.. autoclass:: Pipeline
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
sghi.task.concurrent.ConcurrentExecutor
sghi.task.concurrent.ConcurrentExecutor
=======================================

.. currentmodule:: sghi.task.concurrent

.. autoclass:: ConcurrentExecutor
:members:
:special-members: __enter__, __exit__, __call__, __getattr__, __setattr__
:special-members: __contains__, __delitem__, __enter__, __exit__, __call__, __getattr__, __setattr__, __getitem__, __setitem__
:show-inheritance:
:inherited-members:
:member-order: groupwise
Expand Down
Loading

0 comments on commit de36187

Please sign in to comment.