Skip to content

fix(docs): use Data.VectorField qualification instead of dotted using (tenet 2 compliant) - #26

Merged
ocots merged 1 commit into
mainfrom
fix/docs-qualify-data
Jul 30, 2026
Merged

fix(docs): use Data.VectorField qualification instead of dotted using (tenet 2 compliant)#26
ocots merged 1 commit into
mainfrom
fix/docs-qualify-data

Conversation

@ocots

@ocots ocots commented Jul 30, 2026

Copy link
Copy Markdown
Member

Problem

PR #25 used using CTBase.Data: VectorField, Hamiltonian, HamiltonianVectorField to fix the UndefVarError in @example blocks. However, this dotted using Pkg.Sub form is rejected by the test_no_import.jl regression guard (Handbook tenet 2):

No `import` / no dotted `using Pkg.Sub` (Handbook tenet 2): Test Failed
  Expression: !(occursin(DOTTED_USING_RE, line))
   Evaluated: !(occursin(r"^\s*using\s+[A-Za-z_]\w*\.[A-Za-z_]", "using CTBase.Data: VectorField, Hamiltonian, HamiltonianVectorField"))

Fix

Replace the dotted using with the qualified call-site approach:

using CTBase: Data                 # submodule in scope

X = Data.VectorField(x -> [x[2], -x[1]]; is_autonomous=true)

All VectorField, Hamiltonian, and HamiltonianVectorField calls in @example blocks are now qualified with Data..

Files changed

  • docs/src/lie_derivative_bracket.md
  • docs/src/lie_macro.md
  • docs/src/lift.md
  • docs/src/poisson.md
  • docs/src/time_derivative.md

Verification

  • julia --project=docs docs/make.jl — builds with zero @example errors
  • Pkg.test(; test_args=["test/suite/meta/test_no_import.jl"]) — 13420 tests pass, 0 failures

The dotted form using CTBase.Data: VectorField is rejected by the
test_no_import.jl regression guard (Handbook tenet 2). Replace it with
using CTBase: Data and qualify all call sites as Data.VectorField,
Data.Hamiltonian, Data.HamiltonianVectorField.
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