Liking cljdoc? Tell your friends :D

systems.thoughtfull.assay.baseline.interface

Compare a workspace with a baseline, such as the branch a pull request will merge into, so that CI can fail on what a change introduces rather than on problems that were already there.

A function violation that was in base is still new when the change made it worse, so a change can't make an already complex function more complex unnoticed.

Compare a workspace with a baseline, such as the branch a pull request
will merge into, so that CI can fail on what a change introduces rather
than on problems that were already there.

A function violation that was in base is still new when the change made
it worse, so a change can't make an already complex function more
complex unnoticed.
raw docstring

systems.thoughtfull.assay.cli.main

Command line entry point. Measures every brick of a Polylith workspace, checks the measurements against thresholds, optionally compares them with a base revision, and writes an HTML report or a GitHub Actions report.

Command line entry point. Measures every brick of a Polylith workspace,
checks the measurements against thresholds, optionally compares them with
a base revision, and writes an HTML report or a GitHub Actions report.
raw docstring

systems.thoughtfull.assay.dependencies.co-change

Co-change coupling from Git history: bricks that keep changing in the same commits are coupled, whatever their requires say. The pairs worth reporting are those with no dependency path between them, which is coupling the source doesn't show.

Co-change coupling from Git history: bricks that keep changing in the
same commits are coupled, whatever their requires say. The pairs worth
reporting are those with no dependency path between them, which is
coupling the source doesn't show.
raw docstring

systems.thoughtfull.assay.dependencies.cohesion

Cohesion within bricks, from the symbols each definition references.

  • Cohesion: references to the brick's own namespaces / references to any workspace namespace. References to other libraries don't count.
Cohesion within bricks, from the symbols each definition references.

- Cohesion: references to the brick's own namespaces / references to any
  workspace namespace. References to other libraries don't count.
raw docstring

systems.thoughtfull.assay.dependencies.connascence

Connascence between bricks: the static kinds that can be read from source. Connascence within a brick is expected; between bricks it is coupling.

  • Position: interface functions that other bricks call with many positional parameters, so callers depend on their order.
  • Meaning: keywords used in more than one brick, which are usually map keys that the bricks must agree on.
  • Algorithm: the same code, of at least some size, in more than one brick.
Connascence between bricks: the static kinds that can be read from
source. Connascence within a brick is expected; between bricks it is
coupling.

- Position: interface functions that other bricks call with many
  positional parameters, so callers depend on their order.
- Meaning: keywords used in more than one brick, which are usually map
  keys that the bricks must agree on.
- Algorithm: the same code, of at least some size, in more than one
  brick.
raw docstring

systems.thoughtfull.assay.dependencies.errors

Error surface: the interface definitions of each component that can throw. A definition throws if its body contains throw, or refers to a definition that throws, in its own brick or another. Catching isn't taken into account, so this is an upper bound.

Error surface: the interface definitions of each component that can
throw. A definition throws if its body contains throw, or refers to a
definition that throws, in its own brick or another. Catching isn't
taken into account, so this is an upper bound.
raw docstring

systems.thoughtfull.assay.dependencies.interface

Brick dependency metrics from namespace requires, after Robert Martin's package metrics, adapted to Polylith: a brick depends on an interface, and so on every component that implements it.

  • Afferent (Ca): bricks that depend on this brick's interface.
  • Efferent (Ce): interfaces this brick depends on.
  • Instability: Ce / (Ca + Ce), undefined for a brick with neither.
  • Abstractness: 1 - interface definitions / all definitions. A small interface over a large implementation is abstract; bases have none.
  • Cohesion: references to the brick's own namespaces / references to any workspace namespace.
  • Shared keywords: keywords this brick uses that another brick also uses, usually map keys the bricks must agree on (connascence of meaning).
  • Libraries: libraries outside the workspace the brick requires, and shared libraries, those another brick also requires.
  • Error surface: a component's interface definitions that can throw, directly or through what they refer to.
  • Untested interface: a component's interface definitions that no test in the workspace mentions.
  • Main-sequence distance: |abstractness + instability - 1| for a component.

findings collects what the threshold component checks: the findings of each metric of :finding and :count kind (see metrics/metrics), each with the :brick it belongs to and what reports show of it.

Brick dependency metrics from namespace requires, after Robert Martin's
package metrics, adapted to Polylith: a brick depends on an interface, and
so on every component that implements it.

- Afferent (Ca): bricks that depend on this brick's interface.
- Efferent (Ce): interfaces this brick depends on.
- Instability: Ce / (Ca + Ce), undefined for a brick with neither.
- Abstractness: 1 - interface definitions / all definitions. A small
  interface over a large implementation is abstract; bases have none.
- Cohesion: references to the brick's own namespaces / references to any
  workspace namespace.
- Shared keywords: keywords this brick uses that another brick also
  uses, usually map keys the bricks must agree on (connascence of
  meaning).
- Libraries: libraries outside the workspace the brick requires, and
  shared libraries, those another brick also requires.
- Error surface: a component's interface definitions that can throw,
  directly or through what they refer to.
- Untested interface: a component's interface definitions that no test
  in the workspace mentions.
- Main-sequence distance: |abstractness + instability - 1| for a
  component.

findings collects what the threshold component checks: the findings of
each metric of :finding and :count kind (see metrics/metrics), each
with the :brick it belongs to and what reports show of it.
raw docstring

systems.thoughtfull.assay.dependencies.libraries

Library spread: the bricks that require each library outside the workspace. A library wrapped by one brick can be replaced or upgraded in one place; one spread across bricks, such as a database driver, means a missing gateway component.

Library spread: the bricks that require each library outside the
workspace. A library wrapped by one brick can be replaced or upgraded in
one place; one spread across bricks, such as a database driver, means a
missing gateway component.
raw docstring

systems.thoughtfull.assay.dependencies.names

Map namespaces to Polylith interfaces.

Map namespaces to Polylith interfaces.
raw docstring

systems.thoughtfull.assay.dependencies.tests

Tests seen from the workspace: interface definitions no test mentions, and tests that reach into another brick's implementation rather than its interface.

Tests seen from the workspace: interface definitions no test mentions,
and tests that reach into another brick's implementation rather than
its interface.
raw docstring

systems.thoughtfull.assay.git.interface

Read revisions and changes from the Git repository containing a workspace.

Read revisions and changes from the Git repository containing a
workspace.
raw docstring

systems.thoughtfull.assay.github-report.interface

Render a report for GitHub Actions: workflow command annotations and a Markdown job summary.

A report is a map of :workspace (a name), :bricks (measurements from the metrics component), :violations (from the thresholds component), :thresholds (the merged config), and optionally :graph-violations, the violations the dependency graph draws when :violations leaves some out. Violations are shown as findings (see thresholds/rows).

Render a report for GitHub Actions: workflow command annotations and a
Markdown job summary.

A report is a map of :workspace (a name), :bricks (measurements from the
metrics component), :violations (from the thresholds component),
:thresholds (the merged config), and optionally :graph-violations, the
violations the dependency graph draws when :violations leaves some out.
Violations are shown as findings (see thresholds/rows).
raw docstring

systems.thoughtfull.assay.html-report.interface

Render a report as a standalone HTML page.

A report is a map of :workspace (a name), :generated-at (a string), :bricks (measurements from the metrics component), :violations (from the thresholds component), :thresholds (the merged config), :configured (the config as given, to mark what it sets), and optionally :graph-violations, the violations the dependency graph draws when :violations leaves some out. Violations are shown as findings (see thresholds/rows): a summary grid, then each section's under its table.

Render a report as a standalone HTML page.

A report is a map of :workspace (a name), :generated-at (a string),
:bricks (measurements from the metrics component), :violations (from the
thresholds component), :thresholds (the merged config), :configured
(the config as given, to mark what it sets), and optionally
:graph-violations, the violations the dependency graph draws when
:violations leaves some out. Violations are shown as findings (see
thresholds/rows): a summary grid, then each section's under its table.
raw docstring

systems.thoughtfull.assay.parse.interface

Read Clojure source into rewrite-clj nodes, preserving everything the reader would discard (comments, whitespace, reader macros) so metrics can see the code as written.

Read Clojure source into rewrite-clj nodes, preserving everything the
reader would discard (comments, whitespace, reader macros) so metrics
can see the code as written.
raw docstring

systems.thoughtfull.assay.text-report.interface

Render a report as plain text for a terminal, such as a Git hook.

A report is a map of :bricks (measurements from the metrics component), :violations (from the thresholds component), and, when compared with a base, :comparison (from the baseline component).

Render a report as plain text for a terminal, such as a Git hook.

A report is a map of :bricks (measurements from the metrics component),
:violations (from the thresholds component), and, when compared with a
base, :comparison (from the baseline component).
raw docstring

systems.thoughtfull.assay.thresholds.interface

Check brick measurements and findings against thresholds.

The config maps each report section (:dependencies, :complexity, :modularity, :io, :errors, :tests) to its metrics, and each metric to its settings: a :warning and an :error threshold, and any options the metric has, such as :allow for :library-spread. A threshold is a number, or for a metric of a brick's own value, {:std-devs k}, which flags a brick more than k sample standard deviations past the mean of the other bricks the metric checks (with at least :min-peers of them, default 3).

What a threshold means comes from the metric (see metrics/metrics): its :direction says whether values above (:max) or below (:min) the limit are flagged, its :checks which brick types are checked, and its :kind what is compared. A value past both thresholds is an error. A nil threshold turns that level off, and a nil metric turns the metric off.

Check brick measurements and findings against thresholds.

The config maps each report section (:dependencies, :complexity,
:modularity, :io, :errors, :tests) to its metrics, and each metric to
its settings: a :warning and an :error threshold, and any options the
metric has, such as :allow for :library-spread. A threshold is a
number, or for a metric of a brick's own value, {:std-devs k}, which
flags a brick more than k sample standard deviations past the mean of
the other bricks the metric checks (with at least :min-peers of them,
default 3).

What a threshold means comes from the metric (see metrics/metrics): its
:direction says whether values above (:max) or below (:min) the limit
are flagged, its :checks which brick types are checked, and its :kind
what is compared. A value past both thresholds is an error. A nil
threshold turns that level off, and a nil metric turns the metric off.
raw docstring

systems.thoughtfull.assay.workspace.interface

Discover the bricks of a Polylith workspace.

Discover the bricks of a Polylith workspace.
raw 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