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

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.1
File Size Uploaded
gcheck_core-0.4.1.tar.gz 83.7 kB Details

Built distribution (wheel)

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

Total release size: 173.6 kB

Release files / gcheck_core-0.4.1.tar.gz

Download URL gcheck_core-0.4.1.tar.gz
Size 83.7 kB
Tags Source
SHA-256 checksum
How to use checksums
56a47bb61699902fa1713aa755b229b0d1390e32675591716116ebf44542ae20
BLAKE2b-256 checksum
How to use checksums
1b2ca63daba2aba7fb916a74809084da5618f5bac888fb1c323fceba783672f8
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.1-py3-none-any.whl

Download URL gcheck_core-0.4.1-py3-none-any.whl
Size 89.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc03adf5c4e79aeaa49028d3d695b3c7d470201fdb49fb6cd01571e24977eab7
BLAKE2b-256 checksum
How to use checksums
def1e82bbb1e0b36708967821c7d80ab4ef9f3609e04000f5e3a59417286eaf5
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

This release

0.4.1 This release

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