Metadata-Version: 2.4
Name: sgn-inspect
Version: 0.2.0
Summary: Discover and inspect SGN elements and plugins
Project-URL: Homepage, https://git.ligo.org/greg/sgn-inspect
Project-URL: Documentation, https://docs.ligo.org/greg/sgn-inspect
Project-URL: Issue Tracker, https://git.ligo.org/greg/sgn-inspect/issues
Project-URL: Source Code, https://git.ligo.org/greg/sgn-inspect.git
Author-email: Olivia Godwin <olivia.godwin@ligo.org>
Maintainer-email: Olivia Godwin <olivia.godwin@ligo.org>
License-Expression: MPL-2.0
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.10
Requires-Dist: importlib-metadata>=4.7; python_version < '3.11'
Requires-Dist: rich
Requires-Dist: sgn>=0.11
Requires-Dist: typer
Requires-Dist: typing-extensions
Provides-Extra: dev
Requires-Dist: markdown-callouts>=0.2; extra == 'dev'
Requires-Dist: markdown-exec>=0.5; extra == 'dev'
Requires-Dist: mkdocs-coverage>=0.2; extra == 'dev'
Requires-Dist: mkdocs-gen-files>=0.3; extra == 'dev'
Requires-Dist: mkdocs-literate-nav>=0.4; extra == 'dev'
Requires-Dist: mkdocs-material-igwn; extra == 'dev'
Requires-Dist: mkdocs-section-index>=0.3; extra == 'dev'
Requires-Dist: mkdocs>=1.3; extra == 'dev'
Requires-Dist: mkdocstrings[python]; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: mypy-extensions; extra == 'dev'
Requires-Dist: pip; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: toml>=0.10; extra == 'dev'
Provides-Extra: docs
Requires-Dist: markdown-callouts>=0.2; extra == 'docs'
Requires-Dist: markdown-exec>=0.5; extra == 'docs'
Requires-Dist: mkdocs-coverage>=0.2; extra == 'docs'
Requires-Dist: mkdocs-gen-files>=0.3; extra == 'docs'
Requires-Dist: mkdocs-literate-nav>=0.4; extra == 'docs'
Requires-Dist: mkdocs-material-igwn; extra == 'docs'
Requires-Dist: mkdocs-section-index>=0.3; extra == 'docs'
Requires-Dist: mkdocs>=1.3; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Requires-Dist: toml>=0.10; extra == 'docs'
Provides-Extra: lint
Requires-Dist: mypy; extra == 'lint'
Requires-Dist: mypy-extensions; extra == 'lint'
Requires-Dist: pip; extra == 'lint'
Requires-Dist: ruff; extra == 'lint'
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/markdown

<h1 align="center">sgn-inspect</h1>

<p align="center">Discover and inspect SGN elements and plugins</p>

<p align="center">
  <a href="https://git.ligo.org/greg/sgn-inspect/-/pipelines/latest">
    <img alt="ci" src="https://git.ligo.org/greg/sgn-inspect/badges/main/pipeline.svg" />
  </a>
  <a href="https://git.ligo.org/greg/sgn-inspect/-/pipelines/latest">
    <img alt="ci" src="https://git.ligo.org/greg/sgn-inspect/badges/main/coverage.svg" />
  </a>
  <a href="https://docs.ligo.org/greg/sgn-inspect/">
    <img alt="documentation" src="https://img.shields.io/badge/docs-mkdocs%20material-blue.svg?style=flat" />
  </a>
  <a href="https://pypi.org/project/sgn-inspect/">
    <img alt="pypi version" src="https://img.shields.io/pypi/v/sgn-inspect.svg" />
  </a>
</p>

---

## Resources

* [Documentation](https://docs.ligo.org/greg/sgn-inspect)
* [Source Code](https://git.ligo.org/greg/sgn-inspect)
* [Issue Tracker](https://git.ligo.org/greg/sgn-inspect/-/issues)

## Installation

With `pip`:

```
pip install sgn-inspect
```

## Quickstart

Display information about all installed elements:

```
➜ sgn-inspect
SGN elements · 2 plugins · 10 elements ─────────────────────────────────────────

base · 8 elements ──────────────────────────────────────────────────────────────

 Element             Type        Description
 ──────────────────────────────────────────────────────────────────────────────
 DequeSource         source      A source element that has one
                                 double-ended-queue (deque) per source pad.
 IterSource          source      A source element that has one iterable per
                                 source pad.
 NullSource          source      A source that does precisely nothing.
 StatsSource         source      A source element that produces system
                                 statistics.
 CallableTransform   transform   A transform element that takes a mapping of
                                 {(input, combinations) -> callable}, each of
                                 which is mapped to a unique output pad.
 CollectSink         sink        A sink element that has one collection per
                                 sink pad.
 DequeSink           sink        A sink element that has one
                                 double-ended-queue (deque) per sink pad.
 NullSink            sink        A sink that does precisely nothing.

arrakis · 2 elements ───────────────────────────────────────────────────────────

 Element             Type        Description
 ──────────────────────────────────────────────────────────────────────────────
 ArrakisSource       source      Source element that streams channel data from
                                 Arrakis.
 ArrakisSink         sink        Sink element that streams channel data to
                                 Arrakis.
```

Display information about a particular plugin:

```
➜ sgn-inspect base
base · plugin ──────────────────────────────────────────────────────────────────

Library      sgn
Package      sgn
Description  A framework to help navigate buffers through a graph. The buffers
             must flow.
Version      0.11.1
License      MPL-2.0
Project URL  https://git.ligo.org/greg/sgn

Elements · 8 ───────────────────────────────────────────────────────────────────

 Element             Type        Module           Description
 ──────────────────────────────────────────────────────────────────────────────
 DequeSource         source      sgn.sources      A source element that has one
                                                  double-ended-queue (deque)
                                                  per source pad.
 IterSource          source      sgn.sources      A source element that has one
                                                  iterable per source pad.
 NullSource          source      sgn.sources      A source that does precisely
                                                  nothing.
 StatsSource         source      sgn.sources      A source element that
                                                  produces system statistics.
 CallableTransform   transform   sgn.transforms   A transform element that
                                                  takes a mapping of {(input,
                                                  combinations) -> callable},
                                                  each of which is mapped to a
                                                  unique output pad.
 CollectSink         sink        sgn.sinks        A sink element that has one
                                                  collection per sink pad.
 DequeSink           sink        sgn.sinks        A sink element that has one
                                                  double-ended-queue (deque)
                                                  per sink pad.
 NullSink            sink        sgn.sinks        A sink that does precisely
                                                  nothing.
```

Display information about a particular element:

```
➜ sgn-inspect IterSource
IterSource · source ────────────────────────────────────────────────────────────

Plugin  base
Class   sgn.sources.IterSource

A source element that has one iterable per source pad.

On each call to new one value is pulled from the per-pad
iterator and wrapped in a frame.  When an iterator is exhausted the
next frame produced for that pad has data=None and is_gap=True;
EOS is signaled on that same frame iff eos_on_empty is True for
the pad (the default).

Hierarchy ──────────────────────────────────────────────────────────────────────

sgn.base.SourceElement
└── sgn.sources.IterSource

Pads ───────────────────────────────────────────────────────────────────────────

[ IterSource ] ──▶ N sources

source  on request via source_pad_names

Properties ─────────────────────────────────────────────────────────────────────

 Property        Type                       Default   Description
 ──────────────────────────────────────────────────────────────────────────────
 iters           dict[str, Iterable[Any]]   None      dict[str, Iterable[Any]],
                 | None                               a mapping of source pads
                                                      to iterables, where the
                                                      key is the pad name and
                                                      the value is the
                                                      Iterable. These will be
                                                      coerced to iterators, so
                                                      they can be any iterable
                                                      type.
 eos_on_empty    dict[str, bool] | bool     True      dict[str, bool] | bool,
                                                      default True, a mapping
                                                      of source pads to boolean
                                                      values, where the key is
                                                      the pad name and the
                                                      value is the boolean. If
                                                      a bool is given, the
                                                      value is applied to all
                                                      pads. If True, EOS is
                                                      signaled when the
                                                      iterator is empty.
 frame_factory   Callable                   Frame
```
