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.1.tar.gz (40.1 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.1-py3-none-any.whl (42.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for eon_schema-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7e2447a0df74e4ef8872c0dd015517a69958ee3622018f3cd42e95c5f83a7422
MD5 6943f690e3cfcbde5008badc7e5a1fcb
BLAKE2b-256 aed497d8a0eb1f63f6cf6f18c59fdfc79e1c61b2087d6ad327bcb1991afe7e3d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for eon_schema-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35e599fb0988638f07a2b8b8a542960f49fd924f94959c246c7eb7a75b80a764
MD5 52b24d645626639677e522f4817f8d7f
BLAKE2b-256 67ce7415918a010621a050dfc3c1131723ae29c458ade3157bbcee33e81368f1

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