Skip to content

Scaffold Protocols module: abstract types and core structs #25

@jc-macdonald

Description

@jc-macdonald

Summary

Port the Python protocols.py type system to Julia using abstract types, structs, and multiple dispatch.

Types to Implement

Python Julia equivalent
ModelWorld Protocol abstract type AbstractModelWorld end
Scorer Protocol abstract type AbstractScorer end
Observable struct Observable
Tier enum @enum Tier EMBEDDED PENALIZED DIAGNOSTIC COST
Direction enum @enum Direction MINIMIZE MAXIMIZE
TrialResult struct TrialResult
Annotation struct Annotation
ResultsTable struct ResultsTable with Tables.jl interface

Design Notes

  • Use Julia's native multiple dispatch instead of Protocol ABCs.
  • AbstractModelWorld subtypes must implement simulate(::T, params) and observe(::T, sim).
  • AbstractScorer subtypes must implement score(::T, obs, pred).
  • Consider Tables.jl compliance for ResultsTable.

Acceptance Criteria

  • All types exported from TradeStudy
  • Docstrings on every exported type
  • Smoke tests confirming construction and basic dispatch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions