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.4.2

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.4.2
File Size Uploaded
gcheck_core-0.4.2.tar.gz 85.4 kB Details

Built distribution (wheel)

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

Total release size: 177.1 kB

Release files / gcheck_core-0.4.2.tar.gz

Download URL gcheck_core-0.4.2.tar.gz
Size 85.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fb6dd657779ad6bd83ee39141d3adc14146a3a4f1eb837cdc9bdb4aff2888248
BLAKE2b-256 checksum
How to use checksums
ba50ba465b78915c15f377a4c2507c9b9d2e5ae6d98896047829ff7f5388da5f
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.4.2-py3-none-any.whl

Download URL gcheck_core-0.4.2-py3-none-any.whl
Size 91.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
44e553ffdced9d9366a74ba25d21e7e0776173d031a80fb9820218f554e98fc7
BLAKE2b-256 checksum
How to use checksums
5b91492bf5bf242222e32b461f015d2d1f762a6b31c9c547b1db3c4427c7c663
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

This release

0.4.2 This release

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

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