Skip to content

Scaffold Protocols module: abstract types and core structs #25

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions