Metadata-Version: 2.1
Name: pybrid-computing
Version: 0.10.0
Summary: Library to interact with analog computers and analog-digital hybrid computers, in particular the LUCIDAC and REDAC computers made by anabrid
Home-page: https://anabrid.com/
License: MIT OR GPL-2.0-or-later
Author: Michael Steck
Author-email: pybrid-code@anabrid.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: End Users/Desktop
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Communications
Classifier: Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator
Classifier: Topic :: Software Development :: Embedded Systems
Classifier: Topic :: Terminals :: Serial
Requires-Dist: asyncclick (>=8.1.3.4,<9.0.0.0)
Requires-Dist: inflection (>=0.5.1,<0.6.0)
Requires-Dist: matplotlib[examples] (>=3.5.3,<4.0.0)
Requires-Dist: pybrid-computing-base (>=0.10.0,<1)
Requires-Dist: pydantic (>=1.10.5,<2.0.0)
Requires-Dist: pyqt5-qt5 (==5.15.2) ; sys_platform == "linux"
Requires-Dist: pyqt5[examples] (>=5.15.2,<6.0.0)
Description-Content-Type: text/markdown

# pybrid-computing: The python hybrid computing code

*pybrid* is a code that provides an interface to configure and control analog computers,
in particular the network-enabled LUCIDAC/REDAC analog-digital hybrid computers made by
[anabrid](https://anabrid.com/).
The abstractions can be used by means of

* a fully [asyncio](https://docs.python.org/3/library/asyncio.html) library
* a framework (users providing callbacks in a clean class structure, however giving
  up most of the program flow control) called *Read-Eval-Configure-Loop* (RECL)
* a command line interface using [click](https://click.palletsprojects.com)

This python library provides the reference implementation for the LUCIDAC/REDAC
communication protocol (a simple ASCII yet fully asynchronous RPC message passing protocol
ontop of JSONL) by means of [pydantic](https://docs.pydantic.dev/latest/) data type modeling.
In particular, it is the reference implementation of a client communicating with a
[LUCIDAC hybrid controller MCU](https://anabrid.dev/docs/hybrid-controller/) via
USB Serial or TCP/IP.

The code is successfully used on modern day GNU/Linux, Mac OS X and MS Windows.

This code is written and maintained by [anabrid GmbH](https://anabrid.com/). It is released
as open source (dual licensed as `MIT` and `GPL>=2`). It is supposed to be released at Github
(**TODO**).

## Installation

Simply run `pip install pybrid-computing`. There is an explicit dependency to
`pybrid-computing-base` released and maintained by the same authors, all other dependencies
are widespread and thus relatively standard python packages.

Installation should make a command line executable `pybrid` available on your shell. You can
explore it by calling `pybrid` on your shell, which gives you, for instance:

```
% pybrid redac 
Usage: pybrid redac [OPTIONS] COMMAND [ARGS]...

  Entrypoint for all REDAC commands.

  Use :code:`pybrid redac --help` to list all available sub-commands.

Options:
  -h, --host TEXT       Network name or address of the REDAC.
  -p, --port INTEGER    Network port of the REDAC.
  --reset / --no-reset  Whether to reset the REDAC after connecting.
                        [default: reset]
  --help                Show this message and exit.

Commands:
  display             Display the hardware structure of the REDAC.
  get-entity-config   Get the configuration of an entity.
  hack                Collects 'hack' commands, for development purposes...
  reset               Reset the REDAC to initial configuration.
  route               Route a signal on one cluster from one output of...
  run                 Start a run (computation) and wait until it is...
  set-alias           Define an alias for a path in an interactive...
  set-connection      Set one or multiple connections in a U-Block or...
  set-daq             Configure data acquisition of subsequent run commands.
  set-element-config  Set one ATTRIBUTE to VALUE of the configuration of...
  shell               Start an interactive shell and/or execute a REDAC...
  user-program
```

## Documentation

> **You can read the documentation online at https://anabrid.dev/docs/pybrid/html/**

It is generated by the [Sphinx](https://www.sphinx-doc.org/) documentation which
is part of this repository/package.

## Getting started as developer

This project is managed via the [poetry](https://python-poetry.org/) dependency
manager for python. It allows for easy dependency installation, etc. You should
make yourself comfortable with poetry (https://python-poetry.org/docs/basic-usage/).

Note that the code is distributed amongst the `pybrid-computing` and `pybrid-computing-base`
repositories. If you enter `poetry install` while being in one of these repositories with
your shell, you can work on *that* python package "life". If you want to work on both of
them, go to the `pybrid-computing` and edit the
[path dependencies](https://python-poetry.org/docs/dependency-specification/#path-dependencies)
in the `pyproject.toml`, for instance by replacing the line

```
...
[tool.poetry.dependencies]
...
pybrid-computing-base = "^0, >=0.10.0"
...
```

with something as in

```
pybrid-computing-base = { path = "/path/to/where/you/checked/out/pybrid-computing-base", develop = true } # instead of "^0, >=0.10.0"
```

After this edit, run `poetry install` again to update the paths.

Some IDEs such as PyCharm can check this out by their own.


