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
- Docs index
- Changelog
- Development
- CLI
- Architecture
- Adapter authoring
- Format catalog
- JSON format usage
- Table formats usage (CSV/TSV/DAT)
- Wolfram format usage
- Testing
- Release
- Contributing
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.
Releasing
jptrel is a maintainer-local script, excluded from Git and distribution archives.
Record changes in CHANGELOG.md, then run from this checkout (replace the
example version with the intended release):
./jptrel 1.5.3 --dry
./jptrel 1.5.3
--dry performs read-only source and release-note checks. The normal command
requires a clean Git checkout, builds and checks the wheel and sdist, uploads
to PyPI, refreshes the local version with python3 -m pip install -e ., and
verifies the installed version. Only then does it commit the version, push the
vX.Y.Z tag, and create a GitHub release with changelog notes. Configure Twine
and gh authentication before publishing.
Metadata
Release files for Jarvis-HEP-Portal 1.5.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jarvis_hep_portal-1.5.3.tar.gz | 66.6 kB | Without provenance | Details for jarvis_hep_portal-1.5.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jarvis_hep_portal-1.5.3-py3-none-any.whl | Python 3 | none | any | Details for jarvis_hep_portal-1.5.3-py3-none-any.whl |
Total release size: 111.9 kB
Release files / jarvis_hep_portal-1.5.3.tar.gz
| Download URL | jarvis_hep_portal-1.5.3.tar.gz |
|---|---|
| Size | 66.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0d26a5307c8e64070e12eb09bca81b06ce5d12e380188d385b24117f44b64cc1
|
|
BLAKE2b-256 checksum How to use checksums |
c7dc5a7cf930e4770875be2f147ac4774b61aedb5ddfe13aed0b6264887116c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / jarvis_hep_portal-1.5.3-py3-none-any.whl
| Download URL | jarvis_hep_portal-1.5.3-py3-none-any.whl |
|---|---|
| Size | 45.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cc62bf7105bab04d8fedf30a6029f696e523cd39d006fcf0b00838f6e21f5be
|
|
BLAKE2b-256 checksum How to use checksums |
badbf2552a8cedb7f2334c72812030ad6e5f542ec3574f9de96ced20a0a4eb26
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for Jarvis-HEP-Portal 1.5.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.