← Back to issue list

models: create grammar-aware pydantic models (CRAFT-856)

View original Github issue

Metadata

Project
craft-grammar
Number
#4
Type
pull request
State
merged
Author
cmatsuoka
Labels
—
Created
Updated
Closed

Current evaluation

PR #4 by cmatsuoka merged into main as commit 1643465 (branch commit 7e00b4d, +508/-11, 10 files), adding grammar-aware Pydantic models GrammarStr, GrammarStrList and GrammarSingleEntryDictList for lifecycle build-environment.

Resolution: closed resolved

Reason: The pull request was approved by a reviewer and merged; git history shows merge commit 1643465 'Merge pull request #4 from cmatsuoka/craft-856/create-validation-primitives', whose branch commit 7e00b4d 'models: create grammar-aware pydantic models' introduced craft_grammar/models.py with the new validation types.

Evaluated by: mr-cal-bot

No scores available.

Issue body

Define types GrammarStr (for grammar-aware strings), GrammarStrList (for grammar-aware string lists) and GrammarSingleEntryDictList (for grammar-aware lists of single-entry dictionaries). The latter is used used in the `build-environment` attribute of lifecycle parts. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com> - [x] Have you signed the [CLA](http://www.ubuntu.com/legal/contributors/)? -----

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha — closed resolved PR #4 by cmatsuoka merged into main as commit 1643465 (branch commit 7e00b4d, +508/-11, 10 files), adding grammar-aware Pydantic models GrammarStr, GrammarStrList and GrammarSingleEntryDictList for lifecycle build-environment.
stealth/space-bunny-alpha — closed resolved Merged in canonical/craft-grammar#4 (commit 1643465), adding grammar-aware Pydantic models GrammarStr, GrammarStrList, and GrammarSingleEntryDictList for lifecycle build-environment attributes.
qwen/qwen3.6-35b-a3b — — Merged. Introduces grammar-aware Pydantic models (GrammarStr, GrammarStrList, GrammarSingleEntryDictList) for lifecycle part build-environment attributes. Approved by one reviewer, passed CI, and modified 10 files.

Update history

No update history recorded yet.

Related work

  • Related To: canonical/craft-grammar#19 (confidence 55%)

    Later commit 01dedaa 'feat(grammar)!: generalized grammar type class' builds on/reshapes the validation primitives introduced here.

  • Related To: canonical/craft-grammar#33 (confidence 45%)

    Follow-up commit 5e225fb 'chore!: update to Pydantic 2' modernizes the Pydantic models originally added by this PR.

Related issues

Issue Project State Summary Similarity
#21 feat: add create_grammar_model() craft-grammar merged Merged PR #21 in commit 755aa9b, adding create_grammar_model() to generate Pydantic model code with corresponding Grammar-wrapped field types.
71%