docs: prepare Fern docs workflow#622
Conversation
|
MkDocs preview: https://4ee2ac0b.dd-docs-preview.pages.dev Fern preview: https://nvidia-preview-pr-622.docs.buildwithfern.com/nemo/datadesigner
|
PR #622 Review — docs: prepare Fern docs workflowSummaryThis PR lands the scaffolding needed to run the Fern docs stack alongside MkDocs for the next few releases: a Fern CI/publish workflow, a Dev-Notes-only publish workflow, Fern preview publishing in the existing 55 files changed; ~7k additions are dominated by new MDX recipe pages and regenerated notebook JSON/TS. Non-docs code is small. FindingsWorkflows
Makefile
Notebook pipeline
Fern content & routing
Non-docs production code
pyproject / dependencies
Risks
VerdictApprove (with optional follow-ups). This is a well-scoped docs-infrastructure PR. Workflow permissions are minimal, fork secrets are properly gated, the local-build Make targets are consistent with what CI runs, and the |
Greptile SummaryThis PR sets up a parallel Fern docs publishing workflow alongside the existing MkDocs path, including preview, release, and rolling Dev Notes automation. It also removes generated Fern artifacts from git tracking, adds version guard scripts, and ports VLM long-document content into the Fern structure.
|
| Filename | Overview |
|---|---|
| .github/workflows/build-fern-docs.yml | New workflow for release and manual Fern publish; correctly gates on version validation and downloaded notebooks, with Fern version pinned from fern.config.json. |
| .github/workflows/docs-preview.yml | Significantly reworked preview workflow; Fern check and deploy both use continue-on-error, and a terminal step re-raises the Fern check failure so broken docs are still visible while MkDocs preview always posts. |
| .github/workflows/publish-fern-devnotes.yml | Rolling Dev Notes workflow; reuses notebooks from the last successful docs run via a bash function that calls exit 0 on first successful download — correct bash idiom for early-exit within a loop. |
| fern/scripts/fern-release-version.py | Well-structured prepare/check script with correct regex patterns aligned to the actual docs.yml YAML format; version slug normalization handles refs/tags/ prefix and bare version strings. |
| fern/scripts/ipynb-to-fern-json.py | Adds GitHub Light syntax-highlight style with CSS variable shiki-light/shiki-dark mapping; Colab cell detection broadened from badge-only to metadata flag + content patterns. |
| Makefile | Adds Fern local targets (prepare-fern-docs, check-fern-docs, serve-fern-docs-locally, generate-fern-api-reference, prepare-fern-release); convert-execute-notebooks switches from soft-fail to hard-fail on notebook errors. |
| packages/data-designer-config/src/data_designer/config/mcp.py | Docstring-only change: switches double-quoted Literal strings to single-quoted to fix MDX rendering of the generated API reference. |
| .gitignore | Correctly ignores generated Fern notebook artifacts (*.json, *.ts) under fern/components/notebooks/ that are now regenerated in CI. |
| docs/scripts/generate_colab_notebooks.py | Adds nemo_colab_inject metadata flag to all Colab-injected cells so ipynb-to-fern-json.py can strip them by metadata rather than by content heuristics alone. |
Reviews (16): Last reviewed commit: "ci: align fern release docs behavior" | Re-trigger Greptile
…ern-generated-artifacts # Conflicts: # pyproject.toml # uv.lock
|
Thanks for putting this together, @andreatgretel. SummaryThis PR moves Fern docs toward a generated-artifact workflow, adds local/CI Make targets, wires Fern preview/publish automation, and keeps MkDocs previews active during the migration. The implementation matches the stated intent overall, but I found two docs-CI edge cases worth fixing before merge. FindingsWarnings — Worth addressing
What Looks GoodThe same-repo gating in The preview workflow now isolates Fern check/preview failures well enough to still post MkDocs preview status, which addresses the earlier review thread without turning Fern instability into a silent missing-comment failure. The generated Fern artifacts are treated consistently as build outputs: gitignored, regenerated through Make targets, and documented in VerdictNeeds changes: the release-version guard and dev-note artifact lookup should be adjusted so the new Fern CI paths behave reliably across release and dev-note publishing workflows. This review was generated by an AI assistant. |
|
Thanks, this was helpful. Addressed both in c02b685.
CI is green again, including docs preview and Greptile. |
Summary
This PR prepares DataDesigner's Fern docs workflow for local validation, preview, and publishing while keeping the existing MkDocs path active. It also removes generated Fern artifacts from git, adds version/dev-note handling, and hardens preview/publish automation before the eventual docs cutover.
Related Issue
N/A
Changes
Added
DOCS_FERN_TOKEN:build-fern-docs.yml.publish-fern-devnotes.yml.docs-preview.ymlbuilds/checks without secrets, anddocs-preview-deploy.ymldeploys MkDocs/Fern previews from the artifact for same-repo PRs.fern-release-version.py.latest,v0.5.9,v0.5.8, andOlder versionsentries, plus redirects for legacy MkDocs archives.README.md,CONTRIBUTING.md, andfern/README.md.Changed
docs/notebooks/when present and falls back todocs/notebook_source/*.pywithout outputs.latest, with release YAMLs including only posts available at that release point./nemo/datadesigner/older-versions, with the previous doubled route redirected.Fixed
Fern Make Targets
The intended user-facing surface is small. Full command descriptions also live in
fern/README.mdandmake help.Primary local commands:
make serve-fern-docs-locallyfern docs dev. Does not publish.make check-fern-docs-locallyfern check.make generate-fern-notebooks-with-outputsmake prepare-fern-release VERSION=X.Y.Zmake check-fern-release-version VERSION=X.Y.Zfern/docs.ymlandfern/versions/vX.Y.Z.ymlare prepared before release/manual Fern publish.Support and CI targets:
make install-docs-depsDOCS_PYTHON_VERSION(default3.13).make generate-fern-api-referencefern/code-reference/data-designer/withpy2fernfrompackages/data-designer-config/src/data_designer/config. No Fern login/token required.make generate-fern-api-reference-nativefern docs md generate. Requires Fern auth.make generate-fern-notebooksdocs/notebook_source/*.pyinto gitignoredfern/components/notebooks/*.{json,ts}. Uses executed notebooks per file when present.make prepare-fern-docsmake check-fern-docsprepare-fern-docs, thenfern check. CI-oriented; assumes dependencies are already installed.Attention Areas
docs-preview-deploy.yml- newworkflow_rundeploy workflow. GitHub only fully activates newworkflow_runworkflows once the file exists on the default branch, so the actual handoff can only be tested after merge.docs-preview.yml- PR build/check workflow now uploads the preparedsite/,fern/, and metadata artifact without secrets.Makefile- local Fern targets usepy2fern==0.1.6so contributors can generate API reference locally without Fern login.Testing
.venv/bin/ruff check --fix ..venv/bin/ruff format .git diff --check.venv/bin/mkdocs buildmake check-fern-docsmake serve-fern-docs-locallywith browser spot-checks for versions, Dev Notes, notebooks, recipes, API reference, and older-version routingnpx -y fern-api@4.106.0 generate --docsworkflow_rundeploy handoff tested after mergeChecklist
Signed-off-bytrailersDescription updated with AI