Liking cljdoc? Tell your friends :D

com.blockether.vis.contract.python-host

The Python host contract as DATA: resources/vis-contract/python-host.edn.

Everything the vis Python module can ask its host to do is one entry in that document — the polyglot global the engine binds, how many positional arguments the callable takes, and what the op does when there is no Vis host at all. The engine derives the names it binds from here, the injected host is built from here, and the package's outside-the-sandbox host derives its behavior from here, so a new host call is added to the document and nowhere else.

This project is com.blockether/vis-contract and requires NO Vis namespace, so an extension can compile against the declaration without the engine. Its PyPI half ships package-document as vis_contract/contract.json.

The human-input vocabulary is the one part this project does not own: internal.human-input.spec declares it and PASSES it to package-document, because a closed vocabulary with two definitions is exactly the bug a contract exists to prevent.

The document is validated the moment it is read: a malformed contract is a broken build, not a runtime surprise inside somebody's extension. contract.python-host-test is what fails when a reader drifts.

The Python host contract as DATA: `resources/vis-contract/python-host.edn`.

Everything the `vis` Python module can ask its host to do is one entry in that
document — the polyglot global the engine binds, how many positional arguments
the callable takes, and what the op does when there is no Vis host at all. The
engine derives the names it binds from here, the injected host is built from
here, and the package's outside-the-sandbox host derives its behavior from
here, so a new host call is added to the document and nowhere else.

This project is `com.blockether/vis-contract` and requires NO Vis namespace, so
an extension can compile against the declaration without the engine. Its PyPI
half ships [[package-document]] as `vis_contract/contract.json`.

The human-input vocabulary is the one part this project does not own:
`internal.human-input.spec` declares it and PASSES it to [[package-document]],
because a closed vocabulary with two definitions is exactly the bug a contract
exists to prevent.

The document is validated the moment it is read: a malformed contract is a
broken build, not a runtime surprise inside somebody's extension.
`contract.python-host-test` is what fails when a reader drifts.
raw docstring

host-globalsclj

(host-globals)

The __vis_host_* polyglot globals the engine binds, in document order.

The `__vis_host_*` polyglot globals the engine binds, in document order.
sourceraw docstring

live-vocabularyclj

(live-vocabulary)

The live verb's lifecycle grammar: the op an options map without one means, the op that MOUNTS a view, the ops that drive the view it answered, and the window a handle may coalesce pushes inside.

The `live` verb's lifecycle grammar: the op an options map without one means,
the op that MOUNTS a view, the ops that drive the view it answered, and the
window a handle may coalesce pushes inside.
sourceraw docstring

opclj

(op name)

The op named name, or nil.

The op named `name`, or nil.
sourceraw docstring

op-namesclj

(op-names)

The op names the packaged vis module's _host object answers, in document order.

The op names the packaged `vis` module's `_host` object answers, in document order.
sourceraw docstring

opsclj

(ops)

Every declared host op, in document order.

Every declared host op, in document order.
sourceraw docstring

package-documentclj

(package-document human-input)

The contract as vis_contract/contract.json: snake_case string keys, ops in document order, and the closed human-input vocabulary the outside host prompts with. human-input comes from the namespace that OWNS that vocabulary -- (com.blockether.vis.internal.human-input.spec/contract-vocabulary).

The contract as `vis_contract/contract.json`: snake_case string keys, ops in
document order, and the closed human-input vocabulary the outside host prompts
with. `human-input` comes from the namespace that OWNS that vocabulary --
`(com.blockether.vis.internal.human-input.spec/contract-vocabulary)`.
sourceraw docstring

package-document-jsonclj

(package-document-json human-input)

package-document as the checked-in file's exact bytes.

[[package-document]] as the checked-in file's exact bytes.
sourceraw docstring

package-document-pathclj

Where the rendered document is checked in, from the repository root.

Where the rendered document is checked in, from the repository root.
sourceraw docstring

shell-vocabularyclj

(shell-vocabulary)

The shell verb's lifecycle grammar: the op an options map without one means, the ops that SPAWN a process, and the ops that drive the handle one answered.

The `shell` verb's lifecycle grammar: the op an options map without one means,
the ops that SPAWN a process, and the ops that drive the handle one answered.
sourceraw docstring

versionclj

(version)

The contract version. Bumped when an op is added, removed or re-shaped.

The contract version. Bumped when an op is added, removed or re-shaped.
sourceraw docstring

write-package-document!clj

(write-package-document! human-input)
(write-package-document! human-input path)

Re-render package-document-path. Run me after changing the contract or the human-input vocabulary; python_package_test is what notices you did not.

Re-render [[package-document-path]]. Run me after changing the contract or the
human-input vocabulary; `python_package_test` is what notices you did not.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close