Skip to content

WIP: Add documentation site with Material for MkDocs#204

Draft
EiffL wants to merge 13 commits intomainfrom
documentation
Draft

WIP: Add documentation site with Material for MkDocs#204
EiffL wants to merge 13 commits intomainfrom
documentation

Conversation

@EiffL
Copy link
Copy Markdown
Member

@EiffL EiffL commented Feb 20, 2026

Summary

  • Adds a full documentation site using Material for MkDocs with mkdocstrings for auto-generated API reference from docstrings
  • Includes getting started guides (installation, quick start), notable differences from GalSim, API coverage page, and complete API reference stubs for all implemented modules
  • Adds GitHub Actions workflow for building docs on PRs and deploying to GitHub Pages on push to main

What's included

  • Home page with feature highlights, quick install, and minimal code example
  • Getting Started section: installation (pip, GPU, dev setup) and quick start tutorial with jit/grad/vmap examples
  • Notable Differences from GalSim: thorough guide covering immutability, array views, RNG, PyTree registration, control flow/tracing, profile restrictions, numerical precision, and the @implements decorator
  • API Coverage page (22.5% of GalSim API)
  • API Reference (~30 pages) auto-generated from docstrings via mkdocstrings
  • CI workflow (.github/workflows/docs.yml): mkdocs build --strict on PRs, mkdocs gh-deploy on push to main

Known limitations

  • API function documentation is incomplete — the @implements decorator copies GalSim's docstrings at runtime, but mkdocstrings doesn't always pick them up cleanly. RST cross-references (:func:, :class:) from GalSim's docstrings render as literal text rather than links.
  • Some API pages show minimal content where docstring propagation from GalSim didn't work as expected.

🤖 Generated with Claude Code

EiffL and others added 3 commits February 20, 2026 17:52
Set up full documentation infrastructure with auto-generated API reference
from docstrings, narrative guides, and GitHub Pages deployment via CI.

- Add mkdocs-material and mkdocstrings[python] as docs dependencies
- Create mkdocs.yml with Material theme, left sidebar nav, Mermaid, MathJax
- Add narrative pages: home, getting started, architecture, notable differences
- Add API reference stubs for all public modules targeting specific classes
- Add GitHub Actions workflow for build on PR / deploy on push to main

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove duplicated explanations, tighten prose, and condense sections
that repeated information already covered on other pages. Net reduction
of ~80 lines with no content loss -- cross-links replace duplication.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove the architecture/ pages (pytree, implements, gsobject, drawing)
and key-concepts page. Consolidate their most useful content into
notable-differences.md, which now thoroughly covers immutability, array
views, RNG, PyTree registration, control flow/tracing, profile
restrictions, numerical precision, and the @implements decorator.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@EiffL EiffL changed the title Add documentation site with Material for MkDocs WIP: Add documentation site with Material for MkDocs Feb 20, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Feb 20, 2026

Merging this PR will degrade performance by 35.68%

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 4 improved benchmarks
❌ 3 regressed benchmarks
✅ 29 untouched benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
WallTime test_benchmark_spergel_xvalue[run] 1.6 s 2.3 s -31.09%
WallTime test_benchmarks_lanczos_interp[xval-conserve_dc-run] 124.7 µs 82.1 µs +51.82%
WallTime test_benchmark_moffat_init[run] 95.5 µs 66.5 µs +43.68%
WallTime test_benchmarks_lanczos_interp[kval-no_conserve_dc-run] 56 µs 41.5 µs +34.86%
WallTime test_benchmarks_lanczos_interp[xval-no_conserve_dc-run] 113.1 µs 74.1 µs +52.65%
WallTime test_benchmark_moffat_conv[run] 187.9 ms 282.4 ms -33.48%
WallTime test_benchmark_spergel_conv[run] 159.3 ms 247.6 ms -35.68%

Comparing documentation (3660b3f) with main (ef2c37a)

Open in CodSpeed

Copy link
Copy Markdown
Collaborator

@ismael-mendoza ismael-mendoza left a comment

Choose a reason for hiding this comment

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

I flagged a couple of cases in the examples provided that don't actually work. @EiffL could you modify as needed?

Comment on lines +204 to +206
These differences are typically at the level of floating-point round-off
($\sim 10^{-7}$ for float32, $\sim 10^{-15}$ for float64) and should not
affect scientific conclusions.
Copy link
Copy Markdown
Collaborator

@ismael-mendoza ismael-mendoza Apr 3, 2026

Choose a reason for hiding this comment

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

Is this really true in all cases? For example, the difference between 32-bit floats and 64-bits float can be an issue for very precise shear measurements no?

@ismael-mendoza
Copy link
Copy Markdown
Collaborator

ismael-mendoza commented Apr 3, 2026

I think this is basically good to go. The last thing is that there is an issue with the API reference as none of the original GalSim or lax description docstrings are showing up at all. Maybe there is an issue with the implements decorator? (other docstrings do show up)

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.

3 participants