Skip to content

Make simulation profiles pydantic models#40

Merged
timkpaine merged 1 commit into
mainfrom
tkp/profiles-pydantic
Jul 12, 2026
Merged

Make simulation profiles pydantic models#40
timkpaine merged 1 commit into
mainfrom
tkp/profiles-pydantic

Conversation

@timkpaine

Copy link
Copy Markdown
Member

Part of the DAU hydra/pydantic-first audit (coordination for dau-build audit #4).

VerilatorProfile and CocotbProfile were frozen @dataclasses. Converted to frozen pydantic BaseModels so they validate on construction and expose model_validate — which lets downstream packages (dau-build, which parses artlink manifests into these profiles) validate profile mappings declaratively instead of by hand.

Adds pydantic as an explicit dependency (already present transitively via csp). Construction is kwarg-based, unchanged for callers.

Full dau-sim suite: 489 passed; ruff clean. dau-build's profile tests pass against the converted models.

VerilatorProfile and CocotbProfile were frozen dataclasses. Convert them to
frozen pydantic BaseModels so they validate on construction and expose
model_validate — letting downstream packages (dau-build) validate profile
mappings declaratively instead of by hand. Adds pydantic (already present
transitively via csp) as an explicit dependency.
@github-actions

Copy link
Copy Markdown
Contributor

Test Results

490 tests   487 ✅  8s ⏱️
  2 suites    3 💤
  2 files      0 ❌

Results for commit b82d4e3.

@codecov

codecov Bot commented Jul 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 84.56%. Comparing base (1175a0b) to head (b82d4e3).
⚠️ Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
- Coverage   84.57%   84.56%   -0.02%     
==========================================
  Files          56       56              
  Lines        9351     9351              
  Branches     1202     1202              
==========================================
- Hits         7909     7908       -1     
  Misses       1159     1159              
- Partials      283      284       +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timkpaine timkpaine merged commit 1d6ae36 into main Jul 12, 2026
4 checks passed
@timkpaine timkpaine deleted the tkp/profiles-pydantic branch July 12, 2026 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant