refactor: drop decnet- prefix — BEHAVE is now standalone
Rename packages and imports: decnet-behave-core → behave-core decnet-behave-shell → behave-shell decnet-behave-text → behave-text decnet_behave_* → behave_* BEHAVE is no longer a DECNET sub-project.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""BEHAVE-TEXT spec — text/messaging-domain registry, layered on decnet-behave-core.
|
||||
"""BEHAVE-TEXT spec — text/messaging-domain registry, layered on behave-core.
|
||||
|
||||
Public API:
|
||||
|
||||
@@ -8,7 +8,7 @@ Public API:
|
||||
from spec import TOPIC_PREFIX, event_topic_for
|
||||
|
||||
The ``Observation`` exported here is a registry-aware subclass of the base
|
||||
class from ``decnet-behave-core``; it validates that ``primitive`` is in the
|
||||
class from ``behave-core``; it validates that ``primitive`` is in the
|
||||
text registry and that ``value`` matches the registry's per-primitive spec.
|
||||
|
||||
See ``spec.envelope`` (and the core envelope module) for PII discipline.
|
||||
@@ -1,7 +1,7 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||
"""BEHAVE-TEXT Observation envelope (registry-aware subclass).
|
||||
|
||||
Mirrors BEHAVE-SHELL's pattern: structural envelope from `decnet-behave-core`,
|
||||
Mirrors BEHAVE-SHELL's pattern: structural envelope from `behave-core`,
|
||||
registry-aware validation added here against BEHAVE-TEXT's `PRIMITIVE_REGISTRY`.
|
||||
|
||||
PII discipline (TIGHTER for text than for shell):
|
||||
@@ -15,12 +15,12 @@ from __future__ import annotations
|
||||
|
||||
from pydantic import model_validator
|
||||
|
||||
from decnet_behave_core.spec.envelope import (
|
||||
from behave_core.spec.envelope import (
|
||||
OBSERVATION_SCHEMA_VERSION,
|
||||
ObservationValue,
|
||||
Window,
|
||||
)
|
||||
from decnet_behave_core.spec.envelope import Observation as _BaseObservation
|
||||
from behave_core.spec.envelope import Observation as _BaseObservation
|
||||
|
||||
from .primitives import PRIMITIVE_REGISTRY
|
||||
|
||||
@@ -5,7 +5,7 @@ Source-of-truth for what `Observation.primitive` may be in the text/messaging
|
||||
domain and what `Observation.value` must look like. Mirrors every row in the
|
||||
primitive tables of `scratchpad.md`.
|
||||
|
||||
PII discipline notice (carried over from decnet-behave-core's envelope module):
|
||||
PII discipline notice (carried over from behave-core's envelope module):
|
||||
TEXT-domain observations carry CATEGORICAL LABELS, AGGREGATE RATES, and
|
||||
HASHES of distributions. Sensors operating on Telegram/messaging text MUST
|
||||
NOT emit raw message content into BEHAVE-TEXT observations — only derived
|
||||
@@ -3,13 +3,13 @@ requires = ["setuptools>=68", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "decnet-behave-text"
|
||||
name = "behave-text"
|
||||
version = "0.1.0"
|
||||
description = "BEHAVE-TEXT — text/messaging-domain behavioral observation registry, layered on decnet-behave-core"
|
||||
description = "BEHAVE-TEXT — text/messaging-domain behavioral observation registry, layered on behave-core"
|
||||
requires-python = ">=3.11"
|
||||
license = { text = "GPL-3.0-or-later" }
|
||||
authors = [{ name = "ANTI" }]
|
||||
dependencies = ["pydantic>=2.6", "decnet-behave-core>=0.1.0"]
|
||||
dependencies = ["pydantic>=2.6", "behave-core>=0.1.0"]
|
||||
|
||||
[project.optional-dependencies]
|
||||
dev = ["pytest>=8", "pytest-cov", "ruff"]
|
||||
@@ -18,7 +18,7 @@ dev = ["pytest>=8", "pytest-cov", "ruff"]
|
||||
"Source" = "https://git.resacachile.cl/anti/BEHAVE"
|
||||
|
||||
[tool.setuptools.packages.find]
|
||||
include = ["decnet_behave_text*"]
|
||||
include = ["behave_text*"]
|
||||
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
|
||||
@@ -17,7 +17,7 @@ _REPO_ROOT = Path(__file__).resolve().parent.parent
|
||||
if str(_REPO_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(_REPO_ROOT))
|
||||
|
||||
from decnet_behave_text.spec.envelope import OBSERVATION_SCHEMA_VERSION, Observation # noqa: E402
|
||||
from behave_text.spec.envelope import OBSERVATION_SCHEMA_VERSION, Observation # noqa: E402
|
||||
|
||||
|
||||
def build_schema() -> dict:
|
||||
|
||||
@@ -11,7 +11,7 @@ from __future__ import annotations
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
from decnet_behave_text.spec import PRIMITIVE_REGISTRY, ValueKind
|
||||
from behave_text.spec import PRIMITIVE_REGISTRY, ValueKind
|
||||
|
||||
# Primitive paths expected by scratchpad.md (hand-extracted; v0).
|
||||
EXPECTED_PRIMITIVES = {
|
||||
@@ -96,6 +96,6 @@ def test_experimental_primitives_are_in_content_layer_only():
|
||||
|
||||
def test_topic_namespace_uses_actor_not_attacker():
|
||||
"""The text-domain topic prefix must be `actor.*`, not `attacker.*`."""
|
||||
from decnet_behave_text.spec import TOPIC_PREFIX, event_topic_for
|
||||
from behave_text.spec import TOPIC_PREFIX, event_topic_for
|
||||
assert TOPIC_PREFIX == "actor.observation.text"
|
||||
assert event_topic_for("stylometric.emoji_usage") == "actor.observation.text.stylometric.emoji_usage"
|
||||
|
||||
Reference in New Issue
Block a user