jellycell.config

Pydantic schemas for jellycell.toml and TOML I/O helpers.

The schema here is the source of truth for the project-level config. PEP-723 [tool.jellycell] overrides at file scope are merged on top of this at runtime (handled by the format layer, not here).

Module Contents

Classes

ProjectInfo

The [project] table.

PathsConfig

The [paths] table. All paths are relative to the project root.

RunConfig

The [run] table.

ViewerConfig

The [viewer] table.

LintConfig

The [lint] table.

JournalConfig

The [journal] table — analysis-trajectory log.

ArtifactsConfig

The [artifacts] table — how jellycell picks default artifact paths.

Config

Full jellycell.toml schema.

Functions

default_config

Produce a default jellycell.toml for a new project.

Data

API

class jellycell.config.ProjectInfo(/, **data: Any)

Bases: pydantic.BaseModel

The [project] table.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

name: str

None

class jellycell.config.PathsConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [paths] table. All paths are relative to the project root.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

notebooks: str

‘notebooks’

data: str

‘data’

artifacts: str

‘artifacts’

site: str

‘site’

Static HTML catalogue — where jellycell render + jellycell export publish their outputs. Distinct from manuscripts/ (prose

  • tearsheets, markdown, GitHub-native). The live viewer reads and serves from here; projects may git-ignore it if they don’t need a checked-in static site.

manuscripts: str

‘manuscripts’

cache: str

‘.jellycell/cache’

class jellycell.config.RunConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [run] table.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

kernel: str

‘python3’

subprocess: bool

True

timeout_seconds: int

600

class jellycell.config.ViewerConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [viewer] table.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

host: str

‘127.0.0.1’

port: int

5179

watch: list[str]

‘Field(…)’

class jellycell.config.LintConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [lint] table.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

enforce_artifact_paths: bool

True

enforce_declared_deps: bool

False

warn_on_large_cell_output: str

‘10MB’

jellycell.config.ArtifactLayout

None

class jellycell.config.JournalConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [journal] table — analysis-trajectory log.

When enabled, jellycell run appends a one-section entry to manuscripts/journal.md per invocation: timestamp, notebook, cell-change summary, any new/invalidated artifacts, optional --message commentary. Opt-out-by-default because the audit trail is usually more valuable than clean.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

enabled: bool

True

Write to <manuscripts_dir>/journal.md on every jellycell run.

Turn off (enabled = false) for transient exploration projects that don’t want the trail, or when the journal lives outside this project.

path: str

journal.md

Relative path under manuscripts/ to write to. Defaults to journal.md; override (e.g. "log/runs.md") if you prefer another location.

class jellycell.config.ArtifactsConfig(/, **data: Any)

Bases: pydantic.BaseModel

The [artifacts] table — how jellycell picks default artifact paths.

Only affects path-less jc.figure() / jc.table() calls where jellycell chooses the location. Explicit paths (jc.save(x, "artifacts/foo.json")) always win unchanged.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

layout: jellycell.config.ArtifactLayout

‘flat’

Default artifact layout:

  • flat (default): artifacts/<name>.<ext>. Simplest; fine for single-notebook projects.

  • by_notebook: artifacts/<notebook-stem>/<name>.<ext>. Good when one project has many notebooks producing similarly-named artifacts.

  • by_cell: artifacts/<notebook-stem>/<cell-name>/<name>.<ext>. Every artifact’s path makes its producer obvious to agents and humans without opening the manifest.

max_committed_size_mb: int

50

Soft warning threshold (MB) for individual artifacts.

jellycell run flags any artifact exceeding this with a reminder to either git-ignore the file or move it to LFS. Set to 0 to disable.

class jellycell.config.Config(/, **data: Any)

Bases: pydantic.BaseModel

Full jellycell.toml schema.

Initialization

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

model_config

‘ConfigDict(…)’

project: jellycell.config.ProjectInfo

None

paths: jellycell.config.PathsConfig

‘Field(…)’

run: jellycell.config.RunConfig

‘Field(…)’

viewer: jellycell.config.ViewerConfig

‘Field(…)’

lint: jellycell.config.LintConfig

‘Field(…)’

artifacts: jellycell.config.ArtifactsConfig

‘Field(…)’

journal: jellycell.config.JournalConfig

‘Field(…)’

classmethod load(path: pathlib.Path) jellycell.config.Config

Read and validate a jellycell.toml from disk.

classmethod loads(text: str) jellycell.config.Config

Parse and validate a jellycell.toml from a string.

dump(path: pathlib.Path) None

Write this config to path as TOML.

dumps() str

Serialize to a TOML string.

jellycell.config.default_config(name: str) jellycell.config.Config

Produce a default jellycell.toml for a new project.