egg-file-format

The Egg File Format

https://github.com/seanwevans/egg-file-format

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.0%) to scientific vocabulary

Keywords

egg executable notebook

Scientific Fields

Earth and Environmental Sciences Physical Sciences - 40% confidence
Last synced: 4 months ago · JSON representation ·

Repository

The Egg File Format

Basic Info
  • Host: GitHub
  • Owner: seanwevans
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage: https://Egg.Software
  • Size: 1.15 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Topics
egg executable notebook
Created 7 months ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation Security Roadmap

README.md

🥚 egg file format

Coverage Pylint

egg is a self-contained, portable, and executable document format for reproducible code, data, and results. Inspired by the egg metaphor—slow to build, instant to hatch—it aims to make notebooks in any language "just work" on any machine with zero configuration.


Features

  • Self-contained: Everything—code, data, runtimes, outputs—bundled in a single .egg file.
  • Multi-language: Mix Python, APL, Julia, R, or custom VMs in one archive.
  • Zero-config: Hatch an egg anywhere without installing dependencies.
  • Reproducible: Deterministic build process ensures consistent results.
  • Secure: Strong micro-VM sandboxing for untrusted code.
  • Scalable: Designed for GB–TB scale data with instant loading.
  • Audit & provenance: Full build logs and environment info baked in.

This repository implements a minimal prototype with additional agents for fetching runtimes, sandboxing, precomputing outputs and deterministic chunking. The broader features above are planned for future releases.


Quick Start

Install the CLI and build the demo archive:

bash pip install -e . # install in editable mode to load example plug-ins egg build --manifest examples/manifest.yaml --output demo.egg --precompute egg hatch --egg demo.egg egg verify --egg demo.egg egg info --egg demo.egg egg clean . A file <source>.out is created for each executed cell containing stdout. If a cell fails, its stderr is written to <source>.err for later inspection.

For a Julia example see examples/julia_manifest.yaml. A full manifest mixing twelve languages is provided in examples/dozen_manifest.yaml. The example plug-ins used above are described in AGENTS.md.

Writing Plug-ins

Egg can be extended with custom Python packages. Each plug-in exposes a register() function and is distributed like any other package:

my-egg-plugin/ ├── pyproject.toml └── my_pkg/ ├── __init__.py ├── runtime.py # runtime plug-in └── hello_agent.py # agent plug-in

Place the register() function in the module referenced by your entry point. A minimal pyproject.toml looks like:

```toml [project.entry-points."egg.runtimes"] python = "my_pkg.runtime:register"

[project.entry-points."egg.agents"] hello = "mypkg.helloagent:register" ```

At start-up the CLI calls egg.utils.load_plugins(), which scans the egg.runtimes and egg.agents entry point groups, imports each module and invokes its register() function. Runtime plug-ins return a mapping of language names to command lists, while agent plug-ins run for their side effects.

Install your plug-in like any other package and run the CLI with the -vv flag to confirm it loads:

bash pip install my-egg-plugin egg -vv --help # shows "[plugins] loaded ..." messages

See examples/ for sample plug-ins and AGENTS.md for more on agent architecture and plug-in development.

Advanced Usage

The manifest examples/advanced_manifest.yaml demonstrates how to declare dependencies and enable permissions:

yaml name: "Advanced Notebook" description: "Example demonstrating dependencies, permissions, and mixed languages" dependencies: - python:3.11 - r:4.3 - bash:5 permissions: network: true filesystem: true

It runs Python, Bash and R cells from the examples/ directory. Build and hatch it like so:

bash egg build --manifest examples/advanced_manifest.yaml --output advanced.egg --precompute egg hatch --egg advanced.egg


CLI Overview

bash egg build --manifest <file> --output <egg> [--precompute] [--signing-key <file>] egg hatch --egg <egg> [--no-sandbox] egg verify --egg <egg> [--signing-key <file>] egg info --egg <egg> egg languages egg clean [path] [--dry-run]

Use egg <command> -h to see all options. Runtime commands and other settings can be configured via environment variables; see Environment Variables.

The clean command removes precompute_hashes.yaml, *.out and *.err files, and any sandbox directories beneath the given path. Use --dry-run to list targets without deleting them.

Environment Variables

| Variable | Description | |----------|-------------| | EGG_CMD_PYTHON | Command executed for Python cells | | EGG_CMD_R | Command executed for R cells | | EGG_CMD_BASH | Command executed for Bash cells | | EGG_SIGNING_KEY | HMAC key used to sign hashes.yaml | | EGG_REGISTRY_URL | Registry base URL for runtime downloads | | EGG_DOWNLOAD_TIMEOUT | Default timeout (seconds) for runtime downloads |

Testing

bash pip install . # installs the CLI pip install -r requirements-dev.txt pre-commit run --all-files This formats code, lints with flake8 and pylint, runs tests with coverage, and updates the README badges.


More Documentation

Citation

If you use this project, cite it using the metadata in CITATION.cff.

License

MIT – see LICENSE


egg.software — "Hatch your world."

Owner

  • Name: Sean Evans
  • Login: seanwevans
  • Kind: user
  • Location: Long Island NY

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this project, please cite it using the following metadata."
title: "egg file format"
version: "0.1.0"
doi: 10.1234/example-doi
authors:
  - name: "Egg contributors"

GitHub Events

Total
  • Delete event: 23
  • Push event: 59
  • Pull request event: 46
  • Create event: 31
Last Year
  • Delete event: 23
  • Push event: 59
  • Pull request event: 46
  • Create event: 31

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 189
  • Total Committers: 2
  • Avg Commits per committer: 94.5
  • Development Distribution Score (DDS): 0.122
Past Year
  • Commits: 189
  • Committers: 2
  • Avg Commits per committer: 94.5
  • Development Distribution Score (DDS): 0.122
Top Committers
Name Email Commits
Sean Evans s****s@g****m 166
GitHub Actions a****s@g****m 23
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 0
  • Total pull requests: 31
  • Average time to close issues: N/A
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 31
  • Average time to close issues: N/A
  • Average time to close pull requests: about 5 hours
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 22
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • seanwevans (29)
Top Labels
Issue Labels
Pull Request Labels
codex (28)

Dependencies

.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
pyproject.toml pypi
  • PyYAML >=6
requirements-dev.txt pypi
  • PyYAML * development
  • black * development
  • coverage * development
  • flake8 * development
  • pre-commit * development
  • pylint * development
  • pytest * development
  • pytest-cov * development
  • ruff * development