Add your description here
Project description
regelum
regelum is a framework for modeling Phased Reactive Systems:
systems that execute one tick at a time, activate different groups of nodes in
different phases, and move between phases with explicit transitions.
Overview
- Nodes declare typed inputs and outputs.
- Phases decide which node instances are active together.
- Transitions describe how one phase hands control to the next.
- Compilation resolves links, schedules nodes, and catches structural mistakes before runtime.
The best entry point is the concepts overview:
- Docs: https://aidagroup.github.io/regelum/
- Concepts overview: https://aidagroup.github.io/regelum/concepts/
Quick Example
import regelum as rg
class TemperatureSensor(rg.Node):
class Outputs(rg.NodeOutputs):
temperature: float = rg.Output(initial=19.0)
def run(self) -> Outputs:
return self.Outputs(temperature=21.5)
class HeaterController(rg.Node):
class Inputs(rg.NodeInputs):
temperature: float = rg.Input(
source=TemperatureSensor.Outputs.temperature,
)
class Outputs(rg.NodeOutputs):
heater_on: bool
def run(self, inputs: Inputs) -> Outputs:
return self.Outputs(heater_on=inputs.temperature < 22.0)
sensor = TemperatureSensor(name="room_sensor")
controller = HeaterController(name="heater_controller")
system = rg.PhasedReactiveSystem(
phases=[
rg.Phase(
"control",
nodes=(sensor, controller),
transitions=(rg.Goto(rg.terminate),),
is_initial=True,
),
],
)
snapshot = system.step()
print(snapshot["heater_controller.heater_on"])
Installation
Recommended: use uv.
uv add regelum
For local development from this repository:
uv sync --all-groups
uv run pytest tests
uv run ty check src tests
uv run mkdocs serve
Examples
uv run regelum-pendulum
uv run regelum-video-player
uv run regelum-instance-connect
Release Process
Create a GitHub Release with a tag such as v0.2.0.
The publish workflow will:
- build the package with
uv build - derive version
0.2.0from the git tag viahatch-vcs - publish the artifacts to PyPI with
uv publish
After installation, users can verify the packaged version:
import regelum
print(regelum.__version__)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file regelum-0.2.1.tar.gz.
File metadata
- Download URL: regelum-0.2.1.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1041f221ab8de80cfae1d4bd99d5c52d5ea6a01e740f971f3b19921fd2104bc
|
|
| MD5 |
a1db2cecbf0eb5437de7c15514982ca9
|
|
| BLAKE2b-256 |
493e3d4d89cf98001b0a0571e508ecdb8f0b9faa77754612858d7f229a0f40d8
|
File details
Details for the file regelum-0.2.1-py3-none-any.whl.
File metadata
- Download URL: regelum-0.2.1-py3-none-any.whl
- Upload date:
- Size: 57.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed333bc8d4947e9dde0f165ee8d2ba32639bb194fd9d40dcf5af39f808bf330c
|
|
| MD5 |
c2028525dba41c7e841051f59ede1cd2
|
|
| BLAKE2b-256 |
70068baf91d13306ebbac8b193e15424760072b63a5a71670502977aff4ab0e5
|