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_hashis 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)andCatalog.add_dir(directory)load checklists provided by the application.- A
GcheckErroris raised when a checklist is invalid; it carries the samecodeas 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.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gcheck_core-0.4.0.tar.gz | 83.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gcheck_core-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 173.6 kB
Release files / gcheck_core-0.4.0.tar.gz
| Download URL | gcheck_core-0.4.0.tar.gz |
|---|---|
| Size | 83.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c542461516b7fefd47de13e981cb63715379a4ad39272d99b29498fd7afae07
|
|
BLAKE2b-256 checksum How to use checksums |
1bced04e5b75de9527b40fb694cb367567e0123670650e48358e30af425538ed
|
| 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.0-py3-none-any.whl
| Download URL | gcheck_core-0.4.0-py3-none-any.whl |
|---|---|
| Size | 89.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b3323f20ee8d0a40fb5d2ba0c7725234e28a4c9ab4043274d6a6c874a1bdd06
|
|
BLAKE2b-256 checksum How to use checksums |
132c5003935a5bfad2a2d41d0e9efb57780fe98411e16cfa1d02e4152864fe2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.15
|