Skip to content

Add LiveServer setup with optional draft mode for building docs - #85

Merged
KnutAM merged 1 commit into
KnutAM:mainfrom
knutambot:kam/liveserver.jl
Aug 4, 2026
Merged

Add LiveServer setup with optional draft mode for building docs#85
KnutAM merged 1 commit into
KnutAM:mainfrom
knutambot:kam/liveserver.jl

Conversation

@knutambot

Copy link
Copy Markdown
Contributor

No description provided.

Port the liveserver setup from Steel.jl to FerriteAssembly.jl.

* docs/liveserver.jl (new): activates and instantiates the docs environment,
  pushes "liveserver" to ARGS and runs LiveServer.servedocs, watching docs/
  and src/ (so docstrings can be Revise'd) while skipping the Literate output
  dirs docs/src/{tutorials,howto} and the downloaded docs/src/assets (avoids
  infinite rebuild loops). docs/generate.jl and docs/download_assets.jl are
  watched explicitly. Accepts an optional 'draft' argument.
* docs/Makefile (new): 'make -C docs' serves the full docs, 'make -C docs draft'
  serves draft docs, 'make -C docs clean' runs clean.jl.
* docs/make.jl: new 'liveserver' and 'draft' flags read from ARGS. With
  liveserver, Revise is loaded/triggered and deploydocs is skipped. draft is
  forwarded to makedocs. Since Literate generates no scripts/notebooks in draft
  mode, the links to those are dangling, so cross-references are downgraded to
  warnings for draft builds only (full builds stay strict).
* docs/generate.jl: skip Literate.script/Literate.notebook in draft mode and use
  a placeholder for @__CODE__; guard clean_output_files against missing dirs.
* docs/Project.toml + Manifest.toml: add LiveServer and Revise. Adding them
  forced a re-resolve, which also updated MaterialModelsBase 0.2.3 -> 0.4.0 and
  MechanicalMaterialModels 0.2.1 -> 0.3.0; the old manifest violated
  FerriteAssembly's compat entry (MaterialModelsBase = "0.3, 0.4").
* README.md: new "Building the documentation locally" section.

Test results:
* Pkg.test(): all testsets pass (heatequation 764/764, state variables 368/368,
  and all others).
* Draft build (ARGS = ["draft", "liveserver"]): completes, no scripts/notebooks
  generated, only the expected dangling-link warnings.
* Full build (docs/make.jl, no ARGS): all six tutorials and six how-tos execute,
  no cross-reference errors, deployment correctly skipped locally.
* Smoke test: 'julia --project=docs docs/liveserver.jl draft' serves
  http://localhost:8000/ (200) and /tutorials/heat_equation/ (200).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015coZNHnRhDneS4Km11wNBa
@KnutAM
KnutAM merged commit cf8d1fe into KnutAM:main Aug 4, 2026
8 checks passed
@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.89%. Comparing base (d64fccd) to head (87587ba).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #85   +/-   ##
=======================================
  Coverage   96.89%   96.89%           
=======================================
  Files          30       30           
  Lines        1190     1190           
=======================================
  Hits         1153     1153           
  Misses         37       37           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants