Add LiveServer setup with optional draft mode for building docs - #85
Merged
Conversation
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
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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.
No description provided.