Skip to content

docs: migrate to VitePress and overhaul documentation#164

Merged
ocots merged 7 commits into
mainfrom
docs/vitepress-migration
Jul 2, 2026
Merged

docs: migrate to VitePress and overhaul documentation#164
ocots merged 7 commits into
mainfrom
docs/vitepress-migration

Conversation

@ocots

@ocots ocots commented Jul 1, 2026

Copy link
Copy Markdown
Member

Summary

  • Migration VitePress : remplace Documenter.HTML par DocumenterVitepress.MarkdownVitepress, ajoute DocumenterInterLinks (CTBase + CTModels), sidebar_drawer, guard bases_file pour le déploiement
  • Refonte api_reference.jl : patron canonique CTModels — modules_config array, une page publique par module, une seule page Internals pour tous les symboles privés + toutes les extensions (au lieu de 12 pages extension séparées)
  • Nouvelle page getting-started.md : installation, mental model, quick start, options, next steps
  • Suppression de tous les diagrammes Mermaid (17 blocs) : remplacés par des schémas ASCII text dans architecture.md et les quatre guides, sans dépendance npm
  • Infrastructure VitePress : package.json, .vitepress/config.mts, mathjax-plugin.ts, julia-repl-transformer.ts, theme/, components/ (4 fichiers Vue) — copiés depuis CTModels
  • index.md mise à jour comme landing page VitePress propre
  • docs/Project.toml : retire DocumenterMermaid, ajoute DocumenterVitepress, DocumenterInterLinks, LiveServer

Test plan

  • julia --project=docs docs/make.jl s'exécute sans erreur
  • cd docs && npm install && npm run docs:build réussit
  • npx serve docs/build/1 --listen 5173 : navigation correcte, 5 pages API publiques + Internals, aucun diagramme Mermaid cassé
  • Les blocs @repl affichent les erreurs colorées correctement (via julia-repl-transformer.ts)
  • Les liens InterLinks vers CTBase et CTModels résolvent correctement

🤖 Generated with Claude Code

- Replace Documenter.HTML with DocumenterVitepress.MarkdownVitepress
- Add DocumenterInterLinks for cross-package links to CTBase and CTModels
- Add package.json, .vitepress/ config, theme, and Vue components (copied from CTModels)
- Refactor api_reference.jl to canonical CTModels pattern: modules_config array,
  one public page per module, single Internals page for all private symbols + extensions
- Add getting-started.md (quick start, options, mental model)
- Replace all 17 Mermaid diagrams with ASCII text blocks
- Update index.md as VitePress landing page
- Remove DocumenterMermaid dependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ocots and others added 6 commits July 2, 2026 10:39
- error_messages.md: CTBase.Options.NotProvided → CTBase.Core.NotProvided
- implementing_a_modeler.md: convert metadata/constructor @example blocks
  to julia blocks — these require ADNLPModels extension not in docs deps
- implementing_an_optimization_problem.md: full rewrite — the guide
  described a fictional Builder API; real DiscretizedModel is
  {ocp, discretizer, cache} with build_model/build_solution dispatch

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Per Handbook philosophy (docstrings.md): every exported symbol carries a
docstring; all @ref use the full module path (CTSolvers.Module.symbol).

- Optimization/building.jl: add docstrings to build_model/build_solution
  generic function declarations (were missing despite being exported)
- docs/api_reference.jl: add building.jl to Optimization page file list
  so build_model/build_solution appear in the generated API reference
- Optimization/built_model.jl: qualify all @ref (BuiltModel, NoCache,
  build_model, build_solution)
- Modelers/contract.jl: qualify all @ref (Optimization.BuiltModel →
  CTSolvers.Optimization.BuiltModel, etc.)
- Integrators/abstract_integrator.jl: qualify AbstractIntegrationResult,
  merge, options_point, options_trajectory @ref
- Integrators/contract.jl: qualify AbstractIntegrationResult @ref

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Intro: clarify CTSolvers provides infrastructure consumed by CTDirect
  (direct methods) and CTFlows (flows for indirect methods)
- Module table: update Optimization row (remove "builder pattern"),
  add CTDirect link in DOCP row
- Guide links: replace "builder interaction" / "builder pattern" with
  accurate descriptions of the dispatch-based contract

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The guides described pre-refactor code: callable modelers with get_*_builder
lookups (removed in v0.4.21-beta) and non-parameterized solver/modeler
constructors. Rewrite them to match the current API.

- implementing_a_modeler: modelers are options-carrying strategies; build_model/
  build_solution are dispatched on the (problem, modeler) pair by the package
  providing the problem (e.g. CTDirect). Parameterized structs, real ADNLP/Exa
  snippets, BuiltModel/cache flow.
- implementing_a_solver: parameterized {P} constructor chain and tag-dispatch
  (tag and parameter passed as types); extension signatures matched to
  ext/CTSolversIpopt.jl; added a Parameterization {P} section.
- architecture: type hierarchy with {P}, corrected Strategy Parameters and Tag
  Dispatch sections, added Solvers.Uno to the module table.
- implementing_an_optimization_problem: real discretize (get_docp + DOCPCache),
  realistic build_model/build_solution example, full-path @ref links.
- error_messages: the build_model NotImplemented demo now runs against a fake
  problem+modeler in an isolated block label instead of passing an abstract type.
- index: drop the stale "callable contracts" mention.

Docs build clean (julia --project=docs docs/make.jl): no @ref or example warnings.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ocots
ocots merged commit 0a17c42 into main Jul 2, 2026
2 checks passed
@ocots
ocots deleted the docs/vitepress-migration branch July 2, 2026 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant