Skip to content

Move zensical.toml to docs/, convert write scripts to markdown, update nav#261

Open
joamatab wants to merge 8 commits into
mainfrom
fix/docs-round2
Open

Move zensical.toml to docs/, convert write scripts to markdown, update nav#261
joamatab wants to merge 8 commits into
mainfrom
fix/docs-round2

Conversation

@joamatab
Copy link
Copy Markdown
Contributor

@joamatab joamatab commented May 19, 2026

Summary

  • Move zensical.toml into docs/ directory
  • Convert write_cells/write_models scripts to output Markdown instead of RST
  • Add cells and models reference pages to docs navigation
  • Update Makefile to use zensical build -f docs/zensical.toml

Test plan

  • make docs builds successfully
  • Cells and models reference pages appear in navigation

Summary by Sourcery

Move documentation generation from reStructuredText to Markdown and update docs configuration and navigation accordingly.

New Features:

  • Expose auto-generated cells reference pages for multiple PDK variants in the docs navigation and PDF navigation.

Enhancements:

  • Update cell and model docs writer scripts to output Markdown content compatible with the zensical/MkDocs pipeline.
  • Relocate zensical configuration into the docs directory and adjust output paths for the built site.
  • Update Makefile docs and docs-serve targets to use the docs-local zensical configuration file.

@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented May 19, 2026

Reviewer's Guide

Updates documentation generation to use Markdown and MkDocs-style configuration, moves zensical config into docs/, and wires new cell/model reference pages into both HTML and PDF builds.

Flow diagram for updated docs build pipeline using Markdown and docs/zensical.toml

flowchart LR
    dev[Developer] --> make_docs[make docs]

    make_docs --> write_cells[write_cells_* scripts]
    write_cells --> md_files[Generate *.md reference files]

    make_docs --> changelog[Copy CHANGELOG.md to docs/changelog.md]

    make_docs --> zensical_build[zensical build -f docs/zensical.toml]
    zensical_build --> nav["Use docs/zensical.toml nav (includes cells_* pages)"]
    zensical_build --> html_site[Build HTML site to _build/html]

    dev --> make_docs_serve[make docs-serve]
    make_docs_serve --> zensical_serve[zensical serve -f docs/zensical.toml]
    zensical_serve --> local_preview[Serve docs on localhost:8080]
Loading

File-Level Changes

Change Details Files
Convert auto-generated cell reference docs from reStructuredText to Markdown with MkDocs/MyST syntax.
  • Change output filenames in write_cells_* scripts from .rst to .md under docs/
  • Update document headers to Markdown H1/H2 headings instead of RST titles/underlines
  • Replace Sphinx autodoc directives with MkDocs/MyST-style ::: references
  • Wrap example code in fenced Python code blocks instead of RST .. plot:: directives
.github/write_cells_si220_cband.py
.github/write_cells_si220_oband.py
.github/write_cells_si500.py
.github/write_cells_sin300.py
Relocate and adjust zensical site configuration for docs build.
  • Move zensical.toml into the docs/ directory
  • Add cells and models reference pages to the nav section in zensical.toml
  • Change site_dir to _build/html to match new output location
docs/zensical.toml
Update Makefile and mkdocs-pdf configuration to include new docs and use the relocated config file.
  • Update docs and docs-serve targets to call zensical with -f docs/zensical.toml
  • Ensure CHANGELOG.md is copied into docs/changelog.md before building or serving docs
  • Add cells reference pages to mkdocs-pdf.yml nav so they appear in the PDF build
Makefile
mkdocs-pdf.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request migrates the documentation generation scripts from reStructuredText (.rst) to Markdown (.md) and updates the documentation configuration files (zensical.toml and mkdocs-pdf.yml) to include the new cell documentation pages. Additionally, the Makefile was updated to point to the correct configuration file. The review identified several copy-paste errors in the .github/write_cells_sin300.py script where the module paths were incorrectly referencing si220_cband instead of sin300, which need to be corrected to ensure proper documentation generation.

Comment thread .github/write_cells_sin300.py Outdated


.. autofunction:: cspdk.si220.cband.cells.{name}
::: cspdk.si220.cband.cells.{name}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The module path for sin300 cells is incorrect. It appears to be a copy-paste error from the si220_cband script. It should reference cspdk.sin300.cells to correctly generate the documentation for this technology.

Suggested change
::: cspdk.si220.cband.cells.{name}
::: cspdk.sin300.cells.{name}

Comment thread .github/write_cells_sin300.py Outdated
:include-source:

import cspdk
::: cspdk.si220.cband.cells.{name}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The module path for sin300 cells is incorrect in the mkdocstrings directive. It should be updated to cspdk.sin300.cells.

Suggested change
::: cspdk.si220.cband.cells.{name}
::: cspdk.sin300.cells.{name}

Comment thread .github/write_cells_sin300.py Outdated
```python
import cspdk

c = cspdk.si220.cband.cells.{name}({kwargs}).copy()
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The module path in the Python code block is incorrect. It should use cspdk.sin300.cells to correctly instantiate and plot the sin300 cells.

Suggested change
c = cspdk.si220.cband.cells.{name}({kwargs}).copy()
c = cspdk.sin300.cells.{name}({kwargs}).copy()

joamatab added 7 commits May 19, 2026 06:10
- Handle colon-fence MyST directives

- Strip UPPERCASE braces that mkdocstrings resolves

- Output notebook markdown to docs root (zensical skips subdirs)
The sin300 write script was generating mkdocstrings directives pointing
to cspdk.si220.cband.cells instead of cspdk.sin300.cells (copy-paste
error). This caused the docs build to fail with "Could not collect
'cspdk.si220.cband.cells.array'" since array exists in sin300 but not
in si220.cband.
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