Jarvis-Operas
Jarvis-Operas is the operator registry and execution layer in the Jarvis ecosystem.
It provides name-based lookup and execution for Python callables, and can be used directly or through Jarvis-HEP and Jarvis-PLOT.
In the main site navigation, Jarvis-Operas now appears as a single entry. Use this page as the index for its CLI, registry model, and common interfaces.
Install
python3 -m pip install -U Jarvis-Operas
Main CLI:
jopera --help
What Jarvis-Operas Does
Core responsibilities:
- register Python callables under stable names
- resolve operators by
<namespace>:<name> - call operators synchronously or asynchronously
- load user-defined operators from local files
- expose operators to Jarvis-HEP and Jarvis-PLOT
Interface Index
Registry API
The core registry interface supports:
registergetcallacalllistinfo
Naming format:
<namespace>:<name>
Examples:
math:addstat:chi2_covhelper:eggbox
CLI Subcommands
The jopera CLI exposes these main commands:
list: list available functionsinfo: show function metadatacall: call a function synchronouslyacall: call a function asynchronouslyload: load user functions from a fileinit: compile curve manifests into local runtime cacheinterp: manage interpolation namespace manifestshelp: show examples and tips
Common examples:
jopera list --namespace math
jopera info stat:chi2_cov --json
jopera call helper:eggbox --kwargs '{"inputs":{"x":0.5,"y":0.0}}'
jopera -v
User Operator Loading
Jarvis-Operas supports three common ways to expose private operators.
1. Decorator-based registration
from jarvis_operas import oper
@oper("my_score", tag="private")
def my_score(x, logger=None):
return x * 10
2. Explicit whitelist export
def my_transform(x):
return x + 1
__JARVIS_OPERAS__ = {
"my_transform": my_transform,
}
3. CLI-driven loading
jopera call my_ops:my_score \
--user-ops /absolute/path/to/my_ops.py \
--arg x=2
Async Behavior
Jarvis-Operas supports both:
- synchronous
call - asynchronous
acall
Sync operators can be offloaded via asyncio.to_thread when used in async contexts.
Plugin Discovery
Entry point groups:
jarvis_operas.corejarvis_operas.user
Built-In Operator Catalog
Current built-ins include:
math:add(a, b)stat:chi2_cov(residual, cov)helper:eggbox(inputs)math:identity(x)
Naming And Conflict Rules
- built-ins use namespaces such as
math:*,stat:*,helper:* - user scripts loaded from
script_name.pydefault toscript_name:* - duplicate names are rejected inside the same namespace
Quick Start Reading Path
If you are using Jarvis-Operas through Jarvis-HEP, read:
- Operas
- Command Line Tools
- this page for registry and
joperadetails