Liking cljdoc? Tell your friends :D

pebblestream.directives.schema

Malli schemas for PebbleScript directives.

Three layers:

  1. param-registry — one Malli schema per parameter type.
  2. directives — one entry per directive: its type, accepted syntax, requires/excludes and an argument schema written as a Malli sequence schema (:cat, :+, :*, :?).
  3. parsed-directive — a :multi schema validating a parsed directive of the form {:directive :from, :syntax :paren, :args ["Accounts"]}.

Markers (Malli properties):

:pebblestream/ambiguous A string explaining what is unclear. Wherever the source was unclear the accepted type defaults to :string. Run ambiguities to list every marker. :pebblestream/unique-class Parameters sharing a class number are believed to require distinct values (from the source's :classes {:unique n}). Not enforced by Malli. :pebblestream/sheet-ref The column belongs to the sheet named by the parameter at this index (from the source's :tags {:sheet-id n}). Not enforced by Malli. :pebblestream/source :supplied-spec for directives taken from the editor's specs; :not-in-supplied-spec for directives known to exist but absent from them.

Syntax:

A directive whose source :style is :colon accepts both forms, pebblestream:name:a:b (:colon, deprecated; colons separate arguments) pebblestream:name(a, b) (:paren) A directive whose source :style is :paren accepts only :paren.

Any directive that takes no arguments, or whose arguments are all optional, may also be written bare: pebblestream:unique (:bare, not deprecated) pebblestream:unique() (:paren) pebblestream:expand (:bare) The bare form is valid only with no arguments.

Quoting: a quoted string is accepted for every string argument. A worksheet or column name that contains no space may also be written unquoted. Parsed arguments are the same either way; JSON Notation renders every string quoted. Inside quotes, a quote is written doubled ("") or escaped ("), and a backslash escapes the next character, so a literal backslash is doubled. A backslash before any other character is removed and draws an :ambiguous-backslash warning (see pebblestream.parse-str).

Exclusions are written on both directives: if A excludes B, B excludes A. excludes-errors reports any one-way pair.

Malli schemas for PebbleScript directives.

Three layers:

1. `param-registry` — one Malli schema per parameter type.
2. `directives`     — one entry per directive: its type, accepted syntax,
                      requires/excludes and an argument schema written as a
                      Malli sequence schema (:cat, :+, :*, :?).
3. `parsed-directive` — a :multi schema validating a parsed directive of the
                      form {:directive :from, :syntax :paren, :args ["Accounts"]}.

Markers (Malli properties):

:pebblestream/ambiguous     A string explaining what is unclear. Wherever the
                            source was unclear the accepted type defaults to
                            :string. Run `ambiguities` to list every marker.
:pebblestream/unique-class  Parameters sharing a class number are believed to
                            require distinct values (from the source's
                            :classes {:unique n}). Not enforced by Malli.
:pebblestream/sheet-ref     The column belongs to the sheet named by the
                            parameter at this index (from the source's
                            :tags {:sheet-id n}). Not enforced by Malli.
:pebblestream/source        :supplied-spec for directives taken from the
                            editor's specs; :not-in-supplied-spec for
                            directives known to exist but absent from them.

Syntax:

A directive whose source :style is :colon accepts both forms,
  pebblestream:name:a:b        (:colon, deprecated; colons separate arguments)
  pebblestream:name(a, b)      (:paren)
A directive whose source :style is :paren accepts only :paren.

Any directive that takes no arguments, or whose arguments are all optional,
may also be written bare:
  pebblestream:unique          (:bare, not deprecated)
  pebblestream:unique()        (:paren)
  pebblestream:expand          (:bare)
The bare form is valid only with no arguments.

Quoting: a quoted string is accepted for every string argument. A worksheet
or column name that contains no space may also be written unquoted. Parsed
arguments are the same either way; JSON Notation renders every string quoted.
Inside quotes, a quote is written doubled ("") or escaped (\"), and a
backslash escapes the next character, so a literal backslash is doubled. A
backslash before any other character is removed and draws an
:ambiguous-backslash warning (see pebblestream.parse-str).

Exclusions are written on both directives: if A excludes B, B excludes A.
`excludes-errors` reports any one-way pair.
raw docstring

all-directivesclj/s

source

ambiguitiesclj/s

(ambiguities)

Every :pebblestream/ambiguous marker, in parameter types and directives.

Every :pebblestream/ambiguous marker, in parameter types and directives.
sourceraw docstring

asymmetric-excludesclj/s

(asymmetric-excludes)

Pairs where A excludes B but B does not exclude A.

Pairs where A excludes B but B does not exclude A.
sourceraw docstring

column-rolesclj/s

(column-roles {:keys [directive args]})

The header arguments of one directive, by role: :source headers that must exist in the worksheet's sources :joined [sheet header] pairs that must exist on the joined worksheet :target headers the directive writes, which must be declared here Cell references and literal values are left out.

The header arguments of one directive, by role:
  :source  headers that must exist in the worksheet's sources
  :joined  [sheet header] pairs that must exist on the joined worksheet
  :target  headers the directive writes, which must be declared here
Cell references and literal values are left out.
sourceraw docstring

column-scopedclj/s

Directives that apply to the column they annotate and may appear on more than one column of a worksheet.

Directives that apply to the column they annotate and may appear on more
than one column of a worksheet.
sourceraw docstring

connector-directivesclj/s

source

data-directivesclj/s

source

deprecated-directive?clj/s

(deprecated-directive? d)

True when a parsed directive names a deprecated directive.

True when a parsed directive names a deprecated directive.
sourceraw docstring

deprecated-replacementclj/s

(deprecated-replacement {:keys [directive args]})

The replacement text for a deprecated group directive, or nil.

The replacement text for a deprecated group directive, or nil.
sourceraw docstring

deprecated-syntax?clj/s

(deprecated-syntax? d)

True when a parsed directive uses the deprecated colon form.

True when a parsed directive uses the deprecated colon form.
sourceraw docstring

directive-entryclj/s

source

directive-phaseclj/s

(directive-phase k)

When a directive runs relative to the worksheet's computation: {:phase :transformation :step n}, {:phase :value-check}, {:phase :unordered}, or nil when not yet known.

When a directive runs relative to the worksheet's computation:
{:phase :transformation :step n}, {:phase :value-check},
{:phase :unordered}, or nil when not yet known.
sourceraw docstring

directivesclj/s

Directive keyword -> entry. :syntax is the set of accepted surface forms; :colon is accepted only for backward compatibility and is deprecated.

Directive keyword -> entry. :syntax is the set of accepted surface forms;
:colon is accepted only for backward compatibility and is deprecated.
sourceraw docstring

documented-directivesclj/s

source

excludes-closureclj/s

(excludes-closure)

Directive -> excludes, made symmetric.

Directive -> excludes, made symmetric.
sourceraw docstring

excludes-errorsclj/s

(excludes-errors)

Every exclusion must be written on both directives. Returns the one-way pairs as errors; empty when the registry is consistent.

Every exclusion must be written on both directives. Returns the one-way
pairs as errors; empty when the registry is consistent.
sourceraw docstring

execution-orderclj/s

PebbleScript is declarative: where a directive is written, and in what order, does not affect when it runs. Transformative directives on a worksheet run in this fixed order. Each step is a directive, or a directive with the directives that run as part of it (:within). The order among the :within directives does not matter.

All transformative directives run before the worksheet's formulas. After them, formula columns are filled down to the transformed rows and calculated; value-checking annotative directives then run on the completed worksheet. So prune, which runs last, can test columns the transformation produced (such as a group's total) but not formula columns.

PebbleScript is declarative: where a directive is written, and in what order,
does not affect when it runs. Transformative directives on a worksheet run
in this fixed order. Each step is a directive, or a directive with the
directives that run as part of it (:within). The order among the :within
directives does not matter.

All transformative directives run before the worksheet's formulas. After
them, formula columns are filled down to the transformed rows and
calculated; value-checking annotative directives then run on the completed
worksheet. So prune, which runs last, can test columns the transformation
produced (such as a group's total) but not formula columns.
sourceraw docstring

execution-stepclj/s

(execution-step k)

The step number at which a directive runs, or nil when it is not placed.

The step number at which a directive runs, or nil when it is not placed.
sourceraw docstring

explainclj/s

(explain d)

Human-readable errors for a parsed directive, or nil when it is valid.

Human-readable errors for a parsed directive, or nil when it is valid.
sourceraw docstring

formula-evaluatedclj/s

Directives evaluated on the formula cells of the column they annotate, after the formulas are filled down to the transformed rows. They never check cells produced directly by a transformative directive; to check such a value, test it in a formula column and annotate that column.

Directives evaluated on the formula cells of the column they annotate, after
the formulas are filled down to the transformed rows. They never check cells
produced directly by a transformative directive; to check such a value, test
it in a formula column and annotate that column.
sourceraw docstring

formula-evaluated-ambiguityclj/s

source

group-write-ambiguityclj/s

source

group-write-conflictsclj/s

(group-write-conflicts worksheet-directives)

Given the parsed directives on one worksheet, the columns written by more than one directive within the group step. Directives within the group step may read the same column but may not write to the same column.

Given the parsed directives on one worksheet, the columns written by more
than one directive within the group step. Directives within the group step
may read the same column but may not write to the same column.
sourceraw docstring

missing-directivesclj/s

Directives documented or described as existing but absent from the supplied spec. Each accepts any strings until its signature is confirmed.

Directives documented or described as existing but absent from the supplied
spec. Each accepts any strings until its signature is confirmed.
sourceraw docstring

non-value-checking-annotativeclj/s

Annotative directives that do not check cell values. Their order does not matter.

Annotative directives that do not check cell values. Their order does not matter.
sourceraw docstring

once-per-spreadsheetclj/s

Directives that may appear on only one worksheet of a spreadsheet. Each may appear once, except workflow-group, which annotates every column of the group key on that one worksheet.

Directives that may appear on only one worksheet of a spreadsheet. Each may
appear once, except workflow-group, which annotates every column of the
group key on that one worksheet.
sourceraw docstring

once-per-spreadsheet-errorsclj/s

(once-per-spreadsheet-errors sheets->directives)

Given a map of worksheet name to that worksheet's parsed directives, an error for each directive that may appear on only one worksheet but appears on several, or that appears more than once where only once is allowed.

Given a map of worksheet name to that worksheet's parsed directives, an
error for each directive that may appear on only one worksheet but appears
on several, or that appears more than once where only once is allowed.
sourceraw docstring

once-per-worksheetclj/s

Directives that may appear at most once on a worksheet: the transformative directives that work with from, and the connector verbs, since a connector sheet has exactly one verb. Directives that write a column (the group sub-directives and paths-operation) may repeat, as long as each writes a different column; see write-conflicts.

Directives that may appear at most once on a worksheet: the transformative
directives that work with from, and the connector verbs, since a connector
sheet has exactly one verb. Directives that write a column (the group
sub-directives and paths-operation) may repeat, as long as each writes a
different column; see write-conflicts.
sourceraw docstring

once-per-worksheet-errorsclj/s

(once-per-worksheet-errors worksheet-directives)

Given the parsed directives on one worksheet, an error for each directive that may appear only once but appears more often.

Given the parsed directives on one worksheet, an error for each directive
that may appear only once but appears more often.
sourceraw docstring

param-registryclj/s

source

parsed-directiveclj/s

Validates {:directive k, :syntax :colon|:paren|:bare, :args [...]}. :args holds the parsed parameter values in order.

Validates {:directive k, :syntax :colon|:paren|:bare, :args [...]}.
:args holds the parsed parameter values in order.
sourceraw docstring

pivot-columns-ambiguityclj/s

source

pivot-conflictsclj/s

(pivot-conflicts worksheet-directives)

Given the parsed directives on one worksheet, an error for each category column that pivot directives pull from more than one value column. Several pivots may share a category column only if they share its value column.

Given the parsed directives on one worksheet, an error for each category
column that pivot directives pull from more than one value column. Several
pivots may share a category column only if they share its value column.
sourceraw docstring

registryclj/s

source

registry-errorsclj/s

(registry-errors)

Entries that do not match directive-entry.

Entries that do not match `directive-entry`.
sourceraw docstring

scopeclj/s

(scope k)

The directive's scope, :column or :sheet, or nil when not yet confirmed.

The directive's scope, :column or :sheet, or nil when not yet confirmed.
sourceraw docstring

sheet-scopedclj/s

Directives that apply to the whole worksheet. By convention they are written in the first column's annotation, though the compiler accepts any.

Directives that apply to the whole worksheet. By convention they are
written in the first column's annotation, though the compiler accepts any.
sourceraw docstring

spreadsheet-errorsclj/s

(spreadsheet-errors {:keys [sheets]})

Every worksheet-rule error and warning in a spreadsheet: {:errors [...] :warnings [...]}.

Every worksheet-rule error and warning in a spreadsheet:
{:errors [...] :warnings [...]}.
sourceraw docstring

syntax-ambiguitiesclj/s

Ambiguities about surface syntax that no single schema can carry.

Ambiguities about surface syntax that no single schema can carry.
sourceraw docstring

time-series-headersclj/s

The columns a time-series pull fills. A worksheet may have any of them, in any order.

The columns a time-series pull fills. A worksheet may have any of them, in
any order.
sourceraw docstring

unclassified-annotativeclj/s

(unclassified-annotative entries)

Annotative directives not yet classified as value-checking or not.

Annotative directives not yet classified as value-checking or not.
sourceraw docstring

undeclared-targetsclj/s

(undeclared-targets headers worksheet-directives)

The worksheet's headers determine which columns appear after its transformation: a source column not declared as a header is left out of the result. A column a transformative directive writes to must be declared. Given the worksheet's headers and parsed directives, the target columns that are not declared.

The worksheet's headers determine which columns appear after its
transformation: a source column not declared as a header is left out of the
result. A column a transformative directive writes to must be declared.
Given the worksheet's headers and parsed directives, the target columns
that are not declared.
sourceraw docstring

undeclared-targets-ambiguityclj/s

source

undefined-referencesclj/s

(undefined-references)

Directives named in :requires or :excludes that are not defined.

Directives named in :requires or :excludes that are not defined.
sourceraw docstring

unplaced-transformativeclj/s

(unplaced-transformative entries)

Transformative directives with no place in execution-order yet.

Transformative directives with no place in `execution-order` yet.
sourceraw docstring

unscopedclj/s

(unscoped entries)

Directives in the supplied spec whose scope is not yet confirmed.

Directives in the supplied spec whose scope is not yet confirmed.
sourceraw docstring

value-checking-annotativeclj/s

Annotative directives that check cell values. They run on the completed worksheet, after its transformative directives, so they see the result rows.

Annotative directives that check cell values. They run on the completed
worksheet, after its transformative directives, so they see the result rows.
sourceraw docstring

write-conflictsclj/s

(write-conflicts worksheet-directives)

Given the parsed directives on one worksheet, the columns written by more than one directive. A directive that writes a column (a group sub-directive or paths-operation) may repeat, as long as each writes a different column.

Given the parsed directives on one worksheet, the columns written by more
than one directive. A directive that writes a column (a group sub-directive
or paths-operation) may repeat, as long as each writes a different column.
sourceraw docstring

write-targetsclj/s

(write-targets {:keys [directive args]})

The columns a transformative directive writes to. A directive with an optional new column writes there when given, otherwise to its source column. Cell references are skipped, since their values are unknown until the worksheet is compiled.

The columns a transformative directive writes to. A directive with an
optional new column writes there when given, otherwise to its source column.
Cell references are skipped, since their values are unknown until the
worksheet is compiled.
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