Transform(not_null={"col": False}) no longer adds NOT NULL to a nullable column
- Remove a redundant cast flagged by newer ty
- Drop retired macos-14 runner from test matrix
CHANGELOG.md
urlencode filter percent-encoding ~ as %7E in Rust. Like in Jinja2 and Go, ~ is now kept as an unreserved URL character.indent filter now also accepts a string as the width for Jinja2 compatibility, which is used as the indentation instead of spaces, so indent("> ") quotes a block.format filter to match Python. In Go, %i printed %!i(int64=3), %#o printed 010 instead of 0o10, zero padding ignored the 0x/0o prefix and booleans failed with "invalid format spec". In Rust, a precision did not set the minimum number of digits, so "%.3d"|format(3) is now 003.str.splitlines in the pycompat module of minijinja-contrib only splitting on \n and \r\n. Like in Python, a lone \r, \v, \f, \x1c, \x1d, \x1e, \x85, \u2028 and \u2029 now also end a line, so 'a\rb'.splitlines() is ['a', 'b'], and splitlines(true) keeps these line endings.CHANGELOG.md
docs/guide/benchmarks.md
djs next to the engines a host would otherwise embed, on workloads modeled on agent
codemode sessions: download size, starting a VM, run time, memory, passing data in and
out, and what each engine does with a script that never ends or exhausts memory.
> In short. Of eight engines, djs starts a VM fastest and has the lowest run time
> over the workloads, most of all where scripts move JSON and strings, and it passes
> structured data through the host bridge several times faster than the QuickJS builds.
> It is behind on the smallest bodies, on bytes coming in and on many tiny tool calls,
> and its compressed module is the largest of the JavaScript engines in wasm.
What is measured
An agent's codemode body is short and makes a few tool calls, so what a host pays is
mostly starting a VM, passing tool results in and out, compiling the body and building
strings. The harness measures that as an embedder sees it:
Psychoscript is written in JavaScript and runs on node's own engine.
from handing it the script to having the result string. Times are medians of 25 runs
after 3 warm-up runs.
the same bridge code…
builtins/README.md
enum declarations (records and named constants, below) and their members asName.member.
Records and named constants
State that builtins keep between calls (a capability, the data of a Promise.all element
function, an async generator's request, an iterator helper's fields) lives in internal
records, and states and flags are numbers. Both are named by enum declarations
(D3710), so that a logical snapshot writes them by name and another build reads them by
name: a build that orders the fields or numbers the constants differently continues the
snapshot the same, one that lacks a field or a constant refuses it.
```ts
/** A PromiseCapability Record of a constructor other than %Promise%. @record */
enum Capability {
promise,
resolve,
reject,
}
/** A module record's flags. @flags */
enum ModuleFlags {
json = 1,
tla = 2,
}
const r: Obj = NewRecord(Capability);
RecordSet(r, Capability.promise, promise);
```
@record: the fields of a kind of record, its slots in order. NewRecord(Name) makesone (its fields undefined); the record carries its kind in its header. Name.field is
the slot index, so RecordGet(r, Capability.resolve) is the same slot access as a
number. @class IteratorHelper makes it an iterator helper's schema
(CreateIteratorHelper(Name, kind)); @rest name gives it a variable tail after the
fields (records the engine makes,…
compile-times/README.md
field is #[inline(never)] now. The same happened to the
PlainSink methods of the serialize driver (PlainDelivery) and to
the closure that passes events to the layers (now created in
deliver_layered), which held copies of the writer's event handler
(5.6 KiB in the small program).
linked only into programs that add layers. The last layer delivers
the events with the same functions as the driver without layers
(DriverCore::atom_event and friends, the driver jumps to them):
Next::emit had its own copy of the delivery of all events, 10.7 KiB.
by replaying the raw value (for formats without one). Both are only
referred to by the descriptions of the formats (RawFormatInfo), so
only programs with raw values contain them. When the limits layer
referred to the replay, the small program got 7.5 KiB larger, which
crossed two 16 KiB pages of the binary (33 KiB on disk).
Emit::Forward) are driven by the loop of theserialize driver, which takes them from the driver (forwarded) when
their frame is on the top. drive_forwarded held a copy of
drive_value (with the writer's event handler inlined), 3.7 KiB in the
small program. Returning the forwarded value from drive_value to a
loop that checks for it first made serializing 2-3%…
README.md
README.md
README.md
Pie, donut, sunburst and rose charts for datasette-charts.
| donut | The same, with the total in the hole | Not suggested |
| sunburst | Two categories as two rings: each inner slice broken down by a second column | Not suggested |
All of these chart types can be constructed by hand in the chart builder. Pie and Rose charts will be suggested if the data matches the above criteria.
docs/plugins.md
Writing chart type plugins
A chart type has two halves. A Python class proposes charts for a table or query and compiles each one to SQL. A JavaScript module draws the rows that SQL returns. Other plugins add chart types with the register_chart_types hook, which is how the built-in ones are registered too. A chart type from a plugin shows up in the chart builder, can be suggested next to the built-in charts, works in #chart= links, <datasette-chart> embeds and Datasette Agent, and can draw annotations.
This page starts with a tutorial that builds a chart type plugin from nothing, then documents both halves: the Python classes, the profile that suggestions are worked out from, and the JavaScript helpers every renderer is handed.
This interface is not stable yet: until it is, anything on this page could still change, and any change will be in the release notes. Only what this page documents is public. The rest of datasette_charts, and of its JavaScript, can change at any time.
Contents
README.md
| box_plot | Box plots of a numeric column for each of the most common values of a category: minimum, quartiles, median and maximum | There is a measure and a category with enough rows for each value |
| active_count | How many rows are active at each point in time, from a start and an end column, optionally split by a category | Two date columns are named like a start and an end, such as start_date and end_date |
x and y are the spec's own x and y channels. On a horizontal bar chart and a box plot x is the category axis, down the side, so a line at an x value there is horizontal. On an active_count chart x is time, from its start column.Bar, line, histogram, scatter, stacked bar, box plot and active count charts take every type. Maps take text only, since they have no x or y axis, and so do calendar heatmaps, whose weeks wrap from one column to the next with no straight time axis to draw on. A chart type from another plugin takes none unless it says which it draws, with annotation_types.
docs/plugins.md
Writing chart type plugins
A chart type has two halves. A Python class proposes charts for a table or query and compiles each one to SQL. A JavaScript module draws the rows that SQL returns. Other plugins add chart types with the register_chart_types hook, which is how the built-in ones are registered too. A chart type from a plugin shows up in the chart builder, can be suggested next to the built-in charts, works in #chart= links, <datasette-chart> embeds and Datasette Agent, and can draw annotations.
This page starts with a tutorial that builds a chart type plugin from nothing, then documents both halves: the Python classes, the profile that suggestions are worked out from, and the JavaScript helpers every renderer is handed.
This interface is not stable yet: until it is, anything on this page could still change, and any change will be in the release notes. Only what this page documents is public. The rest of datasette_charts, and of its JavaScript, can change at any time.
Contents