Skip to main content

Autonomio

Astetik turns declared scientific figures into checked graphics, numerical output, and repeatable research evidence.

OpenSSF Best Practices OpenSSF Scorecard PyPI version Astetik documentation Master scientific contracts and documentation

Astetik — Scientific figures with evidence

Scientific figures from a declared specification and shared design, with numerical output and verifiable provenance.

Astetik compiles supplied data, a finite plot specification, and one design manifest into a figure and its evidence. Declare the scientific decision and visual encoding, inspect the computed values and their origins, then retain the result for publication and bounded replay. Python, notebooks, and command-line agents use the same contracts.

What Astetik Is Not

Astetik owns validation, rendering, supported statistical protocols, publication checks, and evidence bundles. Researchers own data preparation, sampling, study design, method selection, and interpretation. Astetik does not infer those decisions or establish independence, causality, or scientific suitability.

The product boundary defines that responsibility. Imports do not change notebook-global plotting styles; design is applied within the declared rendering workflow.

Capabilities

The plot catalogue covers 30 kinds, each with a paper path, including animation posters and table/text evidence.

Research task Supported capability
Choose a representation Inspect the catalogue and intent guidance for supported plots, defaults, and constraints
Keep a study visually coherent One immutable manifest controls typography, axes, dimensions, and semantic color bindings
Prepare a paper figure Single- or double-column physical sizes, vector exports, retained fonts, and final-size verification
Declare a scientific computation Explicit supported estimation, resampling, comparison, association, regression, and longitudinal protocols
Inspect what a mark means Numerical tables, original input positions, observation identities, methods, and verified upstream preparation receipts
Audit and repeat a result Sealed evidence, atomic publication, integrity checks, strict replay, and comparison of changed results

Color binds to meaning and category identity across figures. Set your study's primary with manifest.with_primary("#235B60"); primary-bound categories update together. The manifest reference owns palette, contrast, typography, and physical-size rules.

First successful figure

Install the current 2.0 API from PyPI:

python -m pip install astetik

Use Python 3.11 or later. The example reads the bundled country/area metadata; no data download or invented research measurements are needed. Choose a new output directory; existing destinations are rejected.

from importlib.resources import as_file, files
from pathlib import Path
import astetik as ast

manifest = ast.Manifest(categories={
    "Africa": "primary", "Americas": "#A54532", "Asia": "#2D7D60",
    "Europe": "#7D5595", "Oceania": "secondary",
})
spec = {
    "schema_version": "1.0", "kind": "count", "x": "region",
    "key": ["alpha-3"],
    "order": ["Africa", "Americas", "Asia", "Europe", "Oceania"],
    "missing": "drop",
    "missing_reason": "The bundled metadata does not assign a region to these rows.",
    "options": {"orient": "h"},
    "title": "Recorded geographic entries by region",
    "paper": "double",
}
resource = files("astetik").joinpath("extras", "countries.csv")
with as_file(resource) as source:
    result = ast.render(source, spec, manifest)

assert result.table["estimate"].tolist() == [60, 57, 51, 51, 29]
assert result.receipt["observations"]["used"] == 248
assert result.verify()["passed"]
print(result.table[["category", "estimate"]].to_string(index=False))

bundle = result.write(Path("country-regions"))
repeated = ast.replay(bundle)
assert repeated.result_id == result.result_id
assert repeated.verify()["passed"]
print(bundle.resolve())

Expected result: Africa 60, Americas 57, Asia 51, Europe 51, and Oceania 29, followed by the absolute path of country-regions. Of the 249 retained geographic entries, 248 contribute; Antarctica (ATA) has no region and is explicitly excluded and accounted for. These counts describe the shipped snapshot, not a current geopolitical reference or a scientific inference. The first-figure guide owns the source and observation accounting.

render returns an EvidenceResult: a figure, numerical table, declarations, receipt, and mark-to-observation origins. paper="double" selects a 178 mm figure; use paper="single" for 89 mm, or paper=True for the manifest's declared preset. Verification checks the final physical artifact before publication. The paper-figure guide covers design revisions and failures.

Retain the evidence

File Retained evidence
figure.pdf, figure.svg, figure.png Vector figures and a raster companion
input.json, input.csv Exact typed input snapshot and a readable companion
summary.json, summary.csv Numerical output and a readable companion
spec.json, manifest.json Resolved scientific and design declarations
marks.json Mark values, computations, and contributing observation origins
receipt.json Source, methods, environment, verification, result identity, and artifact digests
font.ttf, font-notices.txt Selected font bytes and notices for the bundled families

The same evidence can be inspected and repeated from a shell or an agent:

astetik catalog
astetik replay country-regions

The bundle guide covers inspection, publication, and replay; the command-line reference defines JSON output and structured failures.

Risk Boundary

Strict replay requires the recorded compatibility envelope and verifies exact regenerated SVG plus scientific evidence. Explicit recomputation in a changed environment retains numerical and provenance checks without claiming identical rendering. Unsigned receipts establish integrity relative to retained evidence; they do not establish authorship or the truth of observations.

Publication checks cover declared dimensions, visible type sizes, font/glyph identity, clipping, and selected tick/table collisions. Journal-specific requirements and other graphical collisions remain the researcher's responsibility. The evidence reference defines these bounded contracts.

Choose the next task

Job Start here
Create and inspect a first figure First figure
Use final paper dimensions and study colors Paper figure
Declare a method for measured study data Research protocols
Select a plot and its supported options Plot catalogue
Integrate verified prepared data Data and Prepared
Retain, inspect, and repeat evidence Evidence bundle
Integrate Python or a command-line agent Specification; command line
Replace an older notebook call Migration
Navigate the whole manual Documentation hub

Agents start with the scientific workflow, ast.catalog(), and ast.select(intent). Installed documentation entry points live beside astetik.__file__ under docs/. Structured AstetikError fields support recovery by correcting declarations rather than substituting a method.

Contributing

Start with CONTRIBUTING.md and developer setup and validation. Propose work through Autonomio Astetik issues.

Support

Use SUPPORT.md for bug reports, feature requests, and usage questions. Include Astetik and Python versions, the specification, manifest, result identifier, and full relevant error. Use small shareable actual data for a reproduction.

Vulnerabilities

Use SECURITY.md for supported source and the private reporting route. Arrange a private channel with the maintainer when private vulnerability reporting is unavailable. Do not put exploitable details or credentials in public issues.

Citations

Use CITATION.cff for software citation metadata. A reproducible research citation should identify Astetik, its exact version or source commit, and the retained specification, manifest, and result identifier. No DOI is supplied.

License

MIT License. Third-party notices retain template attribution and Finlandica's separate font license.

Metadata

Release files for astetik 2.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astetik 2.0.7
File Size Uploaded
astetik-2.0.7.tar.gz 5.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for astetik 2.0.7
File Interpreter ABI Platform
astetik-2.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 11.2 MB

Release files / astetik-2.0.7.tar.gz

Download URL astetik-2.0.7.tar.gz
Size 5.6 MB
Tags Source
SHA-256 checksum
How to use checksums
dc3ad31195ff4b291cf674b319182c9b2da822f6d2ab8e1c7b6b4b6ef9f4e9bf
BLAKE2b-256 checksum
How to use checksums
b485ae648cce26d3ef5f53fe70d1d72e5c60bb26fdac72b128c751526fe6c068
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release files / astetik-2.0.7-py3-none-any.whl

Download URL astetik-2.0.7-py3-none-any.whl
Size 5.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8de60015ff95e975ca818889667cf4bfbc9c084bcf956cefd3245f6afd285966
BLAKE2b-256 checksum
How to use checksums
a9b87ee3d87e2fed80581fb9bdc39d75df7c2c751ab5654f456f1fe3c8ccda33
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

2.0.7 This release

2 release files

2.0.6

2 release files

2.0.5

2 release files

1.16

2 release files

1.15

2 release files

1.14

2 release files

1.13

2 release files

1.12

2 release files

1.11.1

2 release files

1.9.9

1 release file

1.9.8

1 release file

1.9.7

1 release file

1.9.5

1 release file

1.9.4

1 release file

1.9.3

1 release file

1.9.2

1 release file

1.9.1

1 release file

1.9

1 release file

0.9.3

1 release file

0.9.2

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page