Arquestra Audit

v0.8.1
io.github.pablo-ramossanchez/arquestra-audit Checked 4 days ago Published 1 month ago

Audit a data file before publishing: one light per figure.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

start_audit Start an audit of the person's data

Proposes how to read a data file for an audit, from its column names (optionally a type and one example value each) and the results the person wants to publish. Returns a proposed spec (the role of each column, each result written as a claim), how claims are written, the catalog of checks and the points the person has to confirm. It receives no rows.

ParameterTypeDescription
columns *array
dataset_namestring
figuresarrayThe results the person wants to publish, in their words, e.g. 'share of projects per sector'.

measure_in_app Measure the person's file inside the audit panel

Opens the audit panel in the chat. Without a spec, the panel receives the person's file, reads it in their browser and returns a profile of it: per column its kind, empty cells, distinct values, the values of categories with their counts, the range of numbers and dates, and the first rows. With a confirmed spec, the panel measures that same file in the browser with measure.py and shows one light per result. The file is not sent to this server.

ParameterTypeDescription
columnsarrayOptional: the column names of the file, to check the spec refers to real columns.
specobjectThe spec from start_audit, as confirmed by the person. Leave it out to open the panel first, to receive the file.

prepare_script Get the script that measures the data

Returns measure.py with a confirmed spec written in: a fixed Python script (standard library, no network, fixed seeds) that counts what each check needs from a data file and prints those counts with its own fingerprint and no rows. Reads .csv or .json. If the spec has errors, returns the errors instead.

ParameterTypeDescription
spec *objectThe spec from start_audit, as confirmed by the person.
columnsarrayOptional: the column names of the file, to check the spec refers to real columns.

show_audit Show the lights of the person's audit

Turns the output of measure.py into one light per result (red, amber or green, with its reasons), after checking that the output comes from the unchanged script and from the given spec. Shows the lights in the chat and returns them, with a link to the same view on arquestra.dev that carries only codes. Stores nothing.

ParameterTypeDescription
output *stringEverything measure.py printed: the fingerprint line and the measures line.
spec *objectThe same spec sent to prepare_script.

example_audits What the audit is, with worked examples

Published example audits, such as the AI Project Radar, and how the audit works. With no arguments: the overview and the list of examples. With a name: one example, result by result (level filters by light). With a name and an id: one result with every reason and what to change. They are not the person's data.

ParameterTypeDescription
idstringFigure id inside that example.
langstringLanguage of the texts. Default en.
levelstringOnly figures with this light.
namestringExample name from the list, e.g. 'radar'.