mirror of
https://github.com/zvx-echo6/recon.git
synced 2026-05-20 14:44:54 +02:00
Phase 1: PeerTube plugin and recon_domains module
Single source of truth for the 18 RECON knowledge domains mapped to PeerTube category IDs 100-117. Replaces duplicate VALID_DOMAINS sets in enricher.py and embedder.py with imports from lib/recon_domains.py. Includes PeerTube plugin (peertube-plugin-recon-domains) that registers custom categories via videoCategoryManager.addConstant(), and a parity test to verify constants match between RECON and the PeerTube API. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
991826b4f1
commit
71e3dc12ed
7 changed files with 207 additions and 14 deletions
|
|
@ -27,13 +27,7 @@ from .utils import resolve_text_dir
|
|||
logger = setup_logging('recon.embedder')
|
||||
|
||||
# ── Classification allowlists ───────────────────────────────────────────────
|
||||
VALID_DOMAINS = {
|
||||
'Agriculture & Livestock', 'Civil Organization', 'Communications',
|
||||
'Food Systems', 'Foundational Skills', 'Logistics', 'Medical',
|
||||
'Navigation', 'Operations', 'Power Systems', 'Preservation & Storage',
|
||||
'Security', 'Shelter & Construction', 'Technology', 'Tools & Equipment',
|
||||
'Vehicles', 'Water Systems', 'Wilderness Skills',
|
||||
}
|
||||
from .recon_domains import VALID_DOMAINS
|
||||
VALID_KNOWLEDGE_TYPES = {'foundational', 'procedural', 'operational'}
|
||||
VALID_COMPLEXITIES = {'basic', 'intermediate', 'advanced'}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,13 +42,7 @@ logger = setup_logging('recon.enricher')
|
|||
STALE_ENRICHING_HOURS = 2
|
||||
|
||||
# ── Classification allowlists ───────────────────────────────────────────────
|
||||
VALID_DOMAINS = {
|
||||
'Agriculture & Livestock', 'Civil Organization', 'Communications',
|
||||
'Food Systems', 'Foundational Skills', 'Logistics', 'Medical',
|
||||
'Navigation', 'Operations', 'Power Systems', 'Preservation & Storage',
|
||||
'Security', 'Shelter & Construction', 'Technology', 'Tools & Equipment',
|
||||
'Vehicles', 'Water Systems', 'Wilderness Skills',
|
||||
}
|
||||
from .recon_domains import VALID_DOMAINS
|
||||
VALID_KNOWLEDGE_TYPES = {'foundational', 'procedural', 'operational'}
|
||||
VALID_COMPLEXITIES = {'basic', 'intermediate', 'advanced'}
|
||||
|
||||
|
|
|
|||
34
lib/recon_domains.py
Normal file
34
lib/recon_domains.py
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
"""
|
||||
RECON Domain Taxonomy
|
||||
|
||||
Single source of truth for the 18 knowledge domains and their PeerTube
|
||||
category ID mappings. IDs 100-117 are registered via the
|
||||
peertube-plugin-recon-domains plugin.
|
||||
|
||||
Import VALID_DOMAINS from here instead of defining local sets.
|
||||
"""
|
||||
|
||||
DOMAIN_CATEGORY_MAP = {
|
||||
'Agriculture & Livestock': 100,
|
||||
'Civil Organization': 101,
|
||||
'Communications': 102,
|
||||
'Food Systems': 103,
|
||||
'Foundational Skills': 104,
|
||||
'Logistics': 105,
|
||||
'Medical': 106,
|
||||
'Navigation': 107,
|
||||
'Operations': 108,
|
||||
'Power Systems': 109,
|
||||
'Preservation & Storage': 110,
|
||||
'Security': 111,
|
||||
'Shelter & Construction': 112,
|
||||
'Technology': 113,
|
||||
'Tools & Equipment': 114,
|
||||
'Vehicles': 115,
|
||||
'Water Systems': 116,
|
||||
'Wilderness Skills': 117,
|
||||
}
|
||||
|
||||
VALID_DOMAINS = set(DOMAIN_CATEGORY_MAP.keys())
|
||||
|
||||
CATEGORY_DOMAIN_MAP = {v: k for k, v in DOMAIN_CATEGORY_MAP.items()}
|
||||
Loading…
Add table
Add a link
Reference in a new issue