Skip to main content

gcheck-core

Checklist engine of the Duniter/Ğ1 ecosystem: it reads a gcheck checklist (YAML or JSON), resolves its options, selects the questions to ask and turns the answers into a verdict (pass, warning or fail).

The official checklists (member certification, smith commitments…) are embedded. They come from the source of truth, g1_monetary_license: updating this dependency is enough to get their latest questions. An application can also provide its own checklists, instead of or on top of the embedded ones.

The Rust crate and the npm package of the same name offer the same API and the same checklists; the three engines run shared test cases, so they cannot drift apart.

Usage

from gcheck_core import Catalog, GcheckEngine, SMITH_ASPIRANT

catalog = Catalog.embedded()
# …optionally, the application's own checklists, which take precedence:
# catalog.add_content("my-checklist", my_yaml_or_json)

checklist = catalog.get(SMITH_ASPIRANT, "fr")
engine = GcheckEngine()
quiz = engine.prepare(checklist.content)

answers = {question.id: ask(question.text) for question in quiz.questions}  # your UI here

verdict = engine.evaluate(quiz, answers)  # "pass" | "warning" | "fail"
for issue in verdict.issues:
    print(issue.text, "expected:", issue.expected, issue.message)
  • quiz.checklist_hash is the content hash of the checklist that was gone through: store it with the result, compare it later to know whether the checklist changed since. The Rust and TypeScript engines compute the same value.
  • all_checklists() lists the embedded checklists, get_checklist(id, lang) picks one (falling back to English, then to any available language).
  • external_checklist(id, content), checklist_from_file(path) and Catalog.add_dir(directory) load checklists provided by the application.
  • A GcheckError is raised when a checklist is invalid; it carries the same code as the other engines (PARSE_ERROR, INVALID_SCHEMA, PICK_EXCEEDS_POOL…).

Checklist format

Checklists follow the checklist schema published by the source of truth.

License

AGPL-3.0-or-later: GNU Affero General Public License, version 3 or (at your option) any later version.

Metadata

Release files for gcheck-core 0.3.0

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

Source distribution (sdist)

Source distribution for gcheck-core 0.3.0
File Size Uploaded
gcheck_core-0.3.0.tar.gz 33.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gcheck-core 0.3.0
File Interpreter ABI Platform
gcheck_core-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 71.8 kB

Release files / gcheck_core-0.3.0.tar.gz

Download URL gcheck_core-0.3.0.tar.gz
Size 33.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f7923ba73ce08e24df2ee7095fd965fbc68fc87610810470d52a408a0ef786cb
BLAKE2b-256 checksum
How to use checksums
82fe23490ccf43fe74561b0c10dec053e78fec0113e6a297e310f0cc8e140308
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release files / gcheck_core-0.3.0-py3-none-any.whl

Download URL gcheck_core-0.3.0-py3-none-any.whl
Size 38.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab75f372a862f4b50c1897907e75589c813ecae62279ffbd18c196c84cb1f6f0
BLAKE2b-256 checksum
How to use checksums
278244f6c6524aa0000041c11085b7936bb4691e71602b990a18a26bce63d3bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.15

Release history Release notifications | RSS feed

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

This release

0.3.0 This release

2 release files

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