Repository navigation
Conversation
Modelings, Metadata, References, Catalogue and Problems, each in src/<Name>/<Name>.jl (ct-conventions MOD1, MOD2); the package file only includes them and re-exports the same names as before. Internals are reached through their submodule: the extensions call Catalogue._warn_if_draft, Metadata._initial_guess and Problems._problem. The API reference of the documentation reads the submodules and their files from the package. A core test checks the layout. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5 tasks
Documenter resolves an unqualified @ref in the module of the docstring: Problem and reference_solution_data are no longer in Metadata. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 7, 2026
Member
Author
|
Documentation build failed, fixed in 80e191f. VitePress refused two dead links ( |
Conflict in src/OptimalControlProblems.jl: the fingerprint of #314, added on main to the old monolithic file, moves to the Catalogue submodule (Catalogue._fingerprint); its callers are qualified accordingly.
ocots
marked this pull request as ready for review
November 7, 2026 22:25
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #413. Conventions: ct-conventions v0.10.0 (
MOD1,MOD2,MOD5–MOD8), ct-agents v0.4.0.Plan
Goal. Split
src/OptimalControlProblems.jl(683 lines) into submodules, one per responsibility, the package file only declaring; keep the public API unchanged (decisions recorded in #413).Layout, in dependency order (
MOD7):Modelingsbackends.jlAbstractModelBackend, the three backendsMetadatadiscovery.jl,solutions.jl,loading.jl,access.jlproblem_metadata,grid_size_data,parameters_data,initial_guess_dataReferencesobjectives.jlreference_objective,reference_solution_data,solution_kind,SAME_SOLUTIONCatalogueselection.jl,functions.jlproblems,status, the problem functionsProblemsaliases.jl,problem.jlProblem,model,initial_guess,metadata,solution,features, the accessorsSteps.
Metadata.problem_metadata(…),MOD6);problem.jlandsolutions.jlmoved withgit mv.using .<Name>, the same exports as before.src/through its submodule: extensions (Catalogue._warn_if_draft,Metadata._initial_guess,Problems._problemin every problem file), tests,tools/,docs/.docs/api_reference.jl: the modules and their files are read from the package, not listed.test/suite/core/test_modules.jl.src/README.md; paths inext/README.md.Done when (#413)
src/OptimalControlProblems.jlonly declares.MOD1/MOD2and exports its public part.names(OptimalControlProblems)unchanged (evidence below), internals reached through their submodule.tools/,test/,docs/updated; test suite and documentation build green.src/README.md.Evidence
Public API unchanged.
names(OptimalControlProblems)and the qualified functions, recorded onmainbefore the move and after (diffof the two outputs: identical):Full local suite (macOS, Julia 1.12.7,
Pkg.test()): every environment green.The first run had three failures in
core, fixed in the commit: two comments quoted a problem name (no hand-written list), andtest_discovery_cache.jlpatches theinclude_dependencylines, now insrc/Metadata/discovery.jlandsrc/Modelings/backends.jl. Rerun:test_consistency.jl,test_discovery_cache.jl,test_modules.jlpass.The layout test fails on a broken case. With
defined_here() = 1; export defined_hereadded to the package file:Restored: 208 passed.
Choices
Referencesfills the field:reference_objectiveof the metadata onceMetadatais loaded; before, the metadata loop read the reference files. The field is declared as generated by tools inMetadata.METADATA_SCHEMA; moving the reading toReferenceskeeps the dependencies one-way (MOD7:ReferencesusesMetadata, not the converse).solutions.jl) are inMetadata: the metadata files call them (:reference_solution), and they are included intoMetadata.Referencesreads them throughreference_solution_data.using ..Metadata: Metadata) and qualified calls (Metadata.problem_metadata(…)):MOD5,MOD6.status,features,reference_objective,solution_kind,reference_solution_data,initial_guess_data,SAME_SOLUTION) are now exports of their submodule: reachable as before asOptimalControlProblems.status, and listed in the public part of the API reference.eval(Expr(:export, Metadata.PROBLEM_NAMES...)), inCatalogueand in the package: the list is the files ofext/MetaData/, never written (MOD2allows only declarations in a manifest; this is the declaration of a generated list).docs/api_reference.jl: the submodules are read withnames(O; all=true), their files withreaddir(src/<Name>). The extensions keep their list (out of scope).backends.jl,objectives.jl, notmodelings.jl,references.jl): on macOS and Windows file names ignore case, andmodelings.jloverwroteModelings.jlduring the work. Written insrc/README.md.Base.binding_module), every problem function is exported, every export of a submodule is reachable from the package. A frozen list of names would be hand-written; the unchanged API is shown above instead.Order
Part 2 of #409 (typed references) is stacked on this branch: its types go into
src/References/.Labels
run ci github-runner(scope: everything,src/changed),run documentation(the API reference is built from the submodules).Main checkout
git -C OptimalControlProblems status --short: empty before and after.🤖 Generated with Claude Code