[Dev] Split src into submodules (ct-conventions MOD1, MOD2), keeping the public exports
Maintainer thường phản hồi trong vòng 1 ngày
@ocots đang làm issue này rồi.
Từ ngày 7/11/2026.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Agents: read the guide for agents in #310 first (order, difficulty, how to claim an issue, working method).
Goal
Split src/OptimalControlProblems.jl (683 lines: modelings, discovery of the problems, metadata schema and loading, references, parameters, initial guesses, aliases of CTModels) into submodules, one per responsibility, following ct-conventions (MOD1, MOD2), so that the package file only declares. Submodules also hide what users do not need: internals stay reachable as OptimalControlProblems.<Submodule>.f and no longer appear at the top level.
Decisions (maintainer, 2026-11-07)
- The package keeps its exports.
MOD8(no top-level export) is written for the internalCT*packages; OptimalControlProblems is user-facing, like OptimalControl.jl.using OptimalControlProblems; beam(OptimalControlBackend())keeps working. No breaking change of the public API. - Problems and public functions live in submodules that export them, and the package re-exports them. The public API is the union of the submodule exports re-exported by the package; what a submodule does not export stays qualified (
OptimalControlProblems.Metadata._references…). The extensions keep defining methods on the same functions (OptimalControlProblems.beamis the same function asOptimalControlProblems.<Submodule>.beam). - Wait for #408 (documentation rewrite): its API reference is generated per module (
docs/api_reference.jl). Start only once #408 is merged.
Proposed split (to confirm when taking the issue)
| Submodule | What moves there |
|---|---|
Modelings/ |
AbstractModelBackend, JuMPBackend, OptimalControlBackend, OptimalControlScalarizedBackend, MODELING_SPECS and what derives from it |
Catalogue/ |
discovery of the problems (make_list_of_problems, PROBLEM_NAMES), the problem functions (beam…), problems, status, the draft warning |
Metadata/ |
schema, loading of ext/MetaData/, problem_metadata, grid_size_data, parameters_data, initial_guess_data, merge |
References/ |
SAME_SOLUTION, loading of ext/MetaData/references/, reference_objective, solution_kind, the analytic solutions (solutions.jl); later the typed references of #409 |
Problems/ |
Problem (problem.jl), model, initial_guess, metadata, solution, the aliases of CTModels (state, control, objective…) |
Order of the submodules follows their dependencies (MOD7, one-way). The precompilation dependencies (Base.include_dependency on ext/ and the reference files) move with the code that reads them.
Order
- After #408 is merged.
- Before part 2 of #409, which adds
AbstractReferenceand its types: they go directly intoReferences/. Part 1 of #409 (#412) only touchestest/and is independent.
Done when
-
src/OptimalControlProblems.jlonly declares: imports, includes ofsrc/<Name>/<Name>.jl,using .<Name>, re-exports. - Each submodule follows
MOD1/MOD2, exports its public part. -
names(OptimalControlProblems)is unchanged (a test compares it with the list before the move, generated, not hand-written), and every internal used by the tests, tools, extensions and docs is reached through its submodule. - Extensions,
tools/,test/anddocs/updated; full test suite and documentation build green. - A README in
src/saying what each submodule holds (developer documentation lives next to the code, #307).
Related: #409 (typed references), #408 (documentation), #310.
- Ngôn ngữ chính
- Julia
- Star
- 13
- Fork
- 1
- Merge trung bình
- 3 giờ 9 phút
- Pull request đã merge (30 ngày)
- 47
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của control-toolbox/OptimalControlProblems.jl
-
[Cron] cron-convergenceĐang mởcron-convergence
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 28/100
control-toolbox/OptimalControlProblems.jl#418 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Metadata] Reference solutions with how they were obtained: typed references and APICó thể đã có người làm @ocots đã nhận hôm nay. Đang mởfeature
control-toolbox/OptimalControlProblems.jl#409 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Tests] Remove the MadNLP barrier bypass once CTSolvers ≥ 0.7.1 is usedCó thể đã có người làm @ocots đã nhận hôm nay. Đang mở
control-toolbox/OptimalControlProblems.jl#398 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Dev] One source of truth per problem, and the equality of the modelings checked by computationCó thể đã có người làm @ocots đã nhận 1 ngày trước. Đang mở
control-toolbox/OptimalControlProblems.jl#391 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Restore the full CI matrix (Julia 1.10, macOS, Windows) after the reorganisationCó thể đã có người làm @ocots đã nhận 2 ngày trước. Đang mở
control-toolbox/OptimalControlProblems.jl#344 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của control-toolbox/OptimalControlProblems.jl
Issue tương tự
-
lux
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
JuliaGraphs/GraphNeuralNetworks.jl#732 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
erfinv(::Float16) and erfcinv(::Float16) are wrong for abs(x) <= 0.75 (erfinv(Float16(0)) == 0.2201)Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
JuliaMath/SpecialFunctions.jl#571 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100