Skip to main content

Shared eOn L0 Cap'n Proto SSoT, L1 job-config pydantic models, and L2 API specs for eon-akmc + pyeonclient

Project description

eon-schema

Shared schema package for both eon-akmc and pyeonclient. One home for:

Layer Module Role
L0 eon_schema.ssot Cap’n Proto field graph (vendored from monorepo schema/)
L1 eon_schema.config Full job-config pydantic models (MainConfig, Metatomic, Config, …)
L2 eon_schema.api / fields In-process specs (DimerSpec, NebSpec, enums)

Consumers:

  • eon-akmc — depends on eon-schema; eon.schema re-exports L1 for Sphinx / legacy imports.
  • pyeonclientpyeonclient[models] pulls eon-schema; pyeonclient.models re-exports L2.

Do not re-author job models under eon/ or duplicate L2 under pyeonclient/.

Fat tree vs this package

Fat monorepo tarball This PyPI package
Purpose conda-forge eon, full C++/server builds Shared Python schema for both clients
Cap’n Proto Full monorepo including schema/ Vendored under src/eon_schema/ssot/
L1 models Also present via eon.schema re-export Authoritative under eon_schema.config
Feedstock Uses fat tarball only Not required for 0.2.x

L0 authoring is monorepo schema/eon_params.capnp. After edits:

python tools/params_ssot/codegen.py
./packages/eon-schema/scripts/sync_ssot_into_package.sh

L1 authoring is packages/eon-schema/src/eon_schema/config/models.py. Keep field parity with L0 for covered sections (tests/test_params_ssot.py).

See PUBLISHING.md for fat vs split release trains.

Install

pip install eon-schema            # L0 + L1 + L2 (pydantic is a hard dep)
# monorepo:
pip install -e packages/eon-schema

Quick use

# L0
from eon_schema.ssot import capnp_path, load_catalog

# L1 (same objects as eon.schema.*)
from eon_schema.config import MainConfig, Metatomic, Config

# L2 (same objects as pyeonclient.models.*)
from eon_schema.api import DimerSpec
from eon_schema.fields import MinModeMethod, Accelerant

print(capnp_path())
print(MainConfig().job)
print(DimerSpec(method=MinModeMethod.improved, accelerant=Accelerant.gp).core_kwargs())

eon-akmc / Sphinx still use:

from eon.schema import MainConfig, Metatomic  # re-export

pyeonclient still uses:

from pyeonclient.models import DimerSpec, NebSpec  # re-export

Layout

src/eon_schema/
  ssot/          # L0 vendored Cap'n Proto + catalog
  config/        # L1 job-config models (models.py)
  fields/        # enums
  api/           # L2 DimerSpec, NebSpec
  _deps.py

INI helpers (config write without eon-akmc)

from eon_schema.config import (
    MainConfig,
    PotentialConfig,
    DimerConfig,
    write_models_ini,
    write_ini,
    hydrate_ini,
    unknown_ini_keys,
    defaults_from_catalog,
)

# L1 models → config.ini (Dimer L1 prefixes mapped to INI keys)
write_models_ini(
    "config.ini",
    MainConfig(job="saddle_search"),
    PotentialConfig(potential="lj"),
    DimerConfig(dimer_improved=True),
    extra={"Debug": {"write_movies": True}},
    validate=True,
)

# Or raw sections (rgpycrumbs-style) with L0 hydrate + key check
user = {"Main": {"job": "minimization", "temperature": 400}}
cfg = hydrate_ini(user, base_sections=["Main", "Optimizer"])
assert not unknown_ini_keys(cfg)
write_ini("config.ini", cfg)

print(defaults_from_catalog("Main")["job"])

Downstream: rgpycrumbs should depend on eon-schema for write_eon_config / seed_dimers / MLflow log_params instead of full eon-akmc.

Project details


Download files

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

Source Distribution

eon_schema-0.2.0.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

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

eon_schema-0.2.0-py3-none-any.whl (41.2 kB view details)

Uploaded Python 3

File details

Details for the file eon_schema-0.2.0.tar.gz.

File metadata

  • Download URL: eon_schema-0.2.0.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for eon_schema-0.2.0.tar.gz
Algorithm Hash digest
SHA256 976999a1152c23b6b3d1a041bc560561f3ab404bd447d2c362e110e2e44ceebe
MD5 5248a5ca11a701aab3f58c5664fac388
BLAKE2b-256 f5ed7164b5069e1150127d34d7df4a12b6c6024ff1248724342701915416dc46

See more details on using hashes here.

File details

Details for the file eon_schema-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: eon_schema-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 41.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for eon_schema-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c9f625c86d50364201a57800245c327b5cca84fbbacf3a70499b5d8830d58bf7
MD5 5cb9d2bbbdd09b21d0bf3314adba425f
BLAKE2b-256 c0aedf7ea8ff60e8f8d5116e39d993f20d7ae4519c3d5f3437ac1282eab42fe7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page