Skip to main content

Jarvis-Portal

Jarvis-Portal is the standalone IO adapter and registry package for the Jarvis ecosystem.

It provides format-specific read/write behavior for scientific file formats used by Jarvis-HEP and related tools.

Versioned product surfaces (adapters are shared; interface factories are not):

Surface Import Default formats
V1 (top-level / jarvis_portal.v1) from jarvis_portal import create_entry_point_registry JSON, CSV, TSV, DAT, Wolfram, Text (input)
V2 from jarvis_portal.v2 import create_entry_point_registry above + SLHA, xSLHA

Shared IO implementations live under jarvis_portal.adapters. Do not call V1 factory functions from V2 code (or vice versa).

Jarvis-Portal is intended to serve YAML-driven Jarvis workflows through Jarvis-HEP. It does not own Jarvis-HEP YAML parsing or runtime workflow semantics.

Scope

Jarvis-Portal owns:

  • format adapter registration and lookup
  • JSON and Wolfram nested entry reads/writes
  • CSV, TSV, and DAT table reads/writes
  • plain-text input placeholder replacement and upstream-file copying
  • future adapters for ROOT, HepMC, LHE, YODA, SPheno, MadGraph cards, and related HEP formats

Jarvis-HEP owns:

  • YAML IO block parsing
  • runtime path markers such as &J, @PackID, @SampleID, and @Sdir
  • expression evaluation
  • sample/runtime context
  • save/copy/archive policy
  • logger and IO manager integration
  • deciding which variables are written or read
  • plain file copy/save helpers that do not require format parsing

Quick Install

pip install Jarvis-HEP-Portal

Core dependencies include PyYAML, rich, pyslha, and xslha (no optional extras needed for SLHA/xSLHA). Legacy install tags [slha] / [xslha] / [all] remain as empty aliases.

Development

python -m pip install -e ".[dev]"
python -m pytest
ruff check .
python -m build

Basic Usage

CLI:

jportal file
jportal man
jportal man json
jportal -h
jportal -v

jportal file is the only supported business CLI shape. It prints the observable dictionary itself as JSON. Utility exceptions are jportal man, jportal man <format>, -h/--help, and -v/--version.

Python:

from jarvis_portal import IOContext, create_default_registry

registry = create_default_registry()
adapter = registry.get("JSON", "input")

def evaluate_expression(expression, values):
    if expression == "x * 2":
        return values["x"] * 2
    raise ValueError(expression)

context = IOContext(evaluate_expression=evaluate_expression)
observables = await adapter.write_input(
    context,
    {
        "name": "params",
        "path": "input.json",
        "type": "JSON",
        "actions": [
            {
                "type": "Dump",
                "variables": [
                    {"name": "nested", "entry": "config.value", "expression": "x * 2"},
                ],
            },
        ],
    },
    {"x": 1.0},
)

JSON adapter calls return the observable dictionary itself. For JSON input, plain dumped variables are written to the file; expression variables and saved file specs may contribute observables, matching Jarvis-HEP.

Documentation

Status

This package is in alpha development. Runtime behavior should stay small and adapter-focused so Jarvis-HEP can remain the owner of workflow semantics.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jarvis_hep_portal-1.5.1.tar.gz (90.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jarvis_hep_portal-1.5.1-py3-none-any.whl (44.8 kB view details)

Uploaded Python 3

File details

Details for the file jarvis_hep_portal-1.5.1.tar.gz.

File metadata

  • Download URL: jarvis_hep_portal-1.5.1.tar.gz
  • Upload date:
  • Size: 90.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.13.13

File hashes

Hashes for jarvis_hep_portal-1.5.1.tar.gz
Algorithm Hash digest
SHA256 b33feca825fa4f7f0f1c851d7a89194501d10353beecf20277df361d37e893cf
MD5 7316457b55d62dbe43cccc5b9903ae8e
BLAKE2b-256 4c296467ca86519456cc595b8b558fe52dba62b0bb7e5a40c37070aa5da1de62

See more details on using hashes here.

File details

Details for the file jarvis_hep_portal-1.5.1-py3-none-any.whl.

File metadata

File hashes

Hashes for jarvis_hep_portal-1.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5e540a5c72e7f653e67187396c04eb1fea199e0e3d35cfb43fa9c8b3f8eb80ce
MD5 987f942a9ebdd19600bced75912c2c99
BLAKE2b-256 05f890a31cea508aa6f4868cac831444ec8bbfdfe4eb4df5db146c8dda71f9b8

See more details on using hashes here.

Release history Release notifications | RSS feed

1.5.2

2 files

This release

1.5.1 This release

2 files

1.5.0

2 files

1.4.1

2 files

1.3.0

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page