Skip to content

[Doc] An API levels page: exported, qualified, internal #458

Open

Description

@ocots

Goal

A documentation page API levels, as OptimalControl's api/levels.md, that tells a user which names of OptimalControlProblems are theirs and how to reach them. OptimalControlProblems is a user-facing package (MOD8, #413), with the same kind of split as OptimalControl.

The levels

Level Reached as Here
1. Exported using OptimalControlProblems, then name problems, the backends, the problem functions (beam, …), Problem, model, initial_guess, metadata, solution, the accessors shared with OptimalControl, problem_metadata, grid_size_data, parameters_data
2. Qualified OptimalControlProblems.name what a submodule exports and the package does not re-export: status, features, reference_objective, references, best_reference, initial_guess_data, …
3. Internal not for users what no submodule exports: OptimalControlProblems.Metadata.METADATA_SCHEMA, the _ helpers used by the extensions and the tests

How

  • Generated by docs/api_reference.jl, as in OptimalControl: every list is computed from the module, nothing written by hand but the text explaining the choices. Here level 2 follows from the structure alone (submodule exports minus package exports), which test/suite/core/test_modules.jl already checks, so no hand-kept list is needed (OptimalControl needs one because it imports names from other packages).
  • Each name links to its docstring in the API reference.
  • A short "why these choices" section: level 1 is what a script writes unqualified (the guide pages use these names bare), level 2 what it writes qualified (OptimalControlProblems.status(:beam)).
  • The T1 review of [Tracking] Review of the rewritten repository, by theme #449 found that the documentation already follows this split.

Refs #449 (T1, T7).

Conventions: ct-conventions v0.14.0, ct-agents v0.5.0.

🤖 Generated with Claude Code

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

Metadata

Metadata

Assignees

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