Skip to content

docs: unified user documentation site with cartesian and next subsites - #3005

Closed
egparedes wants to merge 10 commits into
GridTools:mainfrom
egparedes:docs-site-infrastructure
Closed

egparedes wants to merge 10 commits into
GridTools:mainfrom
egparedes:docs-site-infrastructure

Conversation

@egparedes

@egparedes egparedes commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

Sets up a single user documentation site, deployed to GitHub Pages, made of three independent Sphinx projects built into one tree:

Site Sources Published at
Welcome page docs/user/ /
gt4py.cartesian docs/user/cartesian/ /cartesian/
gt4py.next docs/user/next/ /next/

The welcome page introduces the project and links to both subsites, which can also be browsed on their own and link back to each other. This PR only contains the infrastructure and the existing content; new gt4py.next documentation will follow in separate PRs.

Changes

  • Build: new docs nox session (./noxfile.py -s docs) building the three projects into docs/user/_build/html.
  • Deployment: new Documentation workflow. It builds the site on pull requests and deploys it to GitHub Pages on pushes to main.
  • Theme: all sites use Furo (light/dark mode), configured once in docs/user/site_theme.py.
  • next subsite: new content written from scratch as executed MyST notebooks (myst-nb): a landing page and quickstart, a guide to the DSL (field operators, shifts and neighbors, scan operators, programs), the Python side (grids and fields, running operators with embedded execution and compiled backends) and three worked examples checked against NumPy. The old QuickstartGuide.md is removed. It has no API reference: the docstrings of the public API are not ready to be published yet.
  • README: gt4py.next is no longer described as experimental.
  • cartesian subsite: content unchanged. The build was broken with current Sphinx; the generated API reference now covers all subpackages except next and eve.
  • Dependencies (docs group): sphinx bumped to the latest release supported by each Python version (9.2 dropped Python 3.12), myst-parser>=5.2, new myst-nb, furo and sphinx-design, removed sphinx-rtd-theme.
  • Developer docs: new docs/development/tools/documentation.md describing the infrastructure.

Required before merging

  • Switch the Pages source of the repository to GitHub Actions (Settings > Pages). The site is currently served from the gh-pages branch.

Notes

  • After the switch, the old v1.0 documentation in the gh-pages branch is no longer published. The old latest/ URL redirects to the new welcome page.
  • The README logo now loads from main (docs/user/_static/logo.svg), so it only renders once this is merged.
  • The advanced toolchain guides and the workshop notebooks are not part of the site yet.

Requirements

  • All fixes and/or new features come with corresponding tests.
  • Important design decisions have been documented in the appropriate ADR inside the docs/development/ADRs/ folder: not an ADR, see docs/development/tools/documentation.md.

… subsites

Three independent Sphinx projects (welcome page, cartesian, next) built into one tree by a new 'docs' nox session and deployed to GitHub Pages by a new 'Documentation' workflow. See docs/development/tools/documentation.md.
@egparedes
egparedes force-pushed the docs-site-infrastructure branch from 704efaf to caa3c30 Compare November 19, 2026 14:14
The docstrings of the public API are not ready to be published yet, so the
'next' subsite only ships the quickstart guide for now.
Comment thread docs/user/index.md Outdated
applications in this area.

Currently, two generations live side by side in the library: `gt4py.next` and
`gt4py.cartesian`. `gt4py.next` is where all new development happens.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
`gt4py.cartesian`. `gt4py.next` is where all new development happens.
`gt4py.cartesian`. `gt4py.next` is where most of the active development happens.

Comment thread docs/user/index.md Outdated
Currently, two generations live side by side in the library: `gt4py.next` and
`gt4py.cartesian`. `gt4py.next` is where all new development happens.
`gt4py.cartesian` is the previous generation, which is still maintained for
the models relying on it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
the models relying on it.
the models relying on it and enriched with features where needed.

Comment thread docs/user/index.md Outdated
Comment on lines +46 to +53
Its current status is:

- **Maintained**: it is part of the `gt4py` package, and the GT4Py team keeps
fixing bugs, reviewing contributions and taking part in discussions with
external developers.
- **Feature complete**: the core team does not develop new features for it.
- **Not recommended for new developments**: use `gt4py.next` instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can drop this

Suggested change
Its current status is:
- **Maintained**: it is part of the `gt4py` package, and the GT4Py team keeps
fixing bugs, reviewing contributions and taking part in discussions with
external developers.
- **Feature complete**: the core team does not develop new features for it.
- **Not recommended for new developments**: use `gt4py.next` instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Or actually link to the paper.

Comment thread docs/user/index.md Outdated
Quick start, GTScript language reference and API documentation.
```

`gt4py.next` and `gt4py.cartesian` are independent from each other and each one

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
`gt4py.next` and `gt4py.cartesian` are independent from each other and each one
`gt4py.next` and `gt4py.cartesian` share common infrastructure, but are independent DSLs and each one

maybe?

@egparedes

Copy link
Copy Markdown
Contributor Author

Superseded by a stack of two PRs from branches in this repository: #3023 (documentation site infrastructure, with a placeholder page for gt4py.next) and #3024 (the new gt4py.next user documentation, stacked on #3023). The review comments made here have been addressed in those PRs.

@egparedes egparedes closed this Nov 20, 2026
egparedes added a commit that referenced this pull request Nov 20, 2026
…next subsites (#3023)

## Description

This PR supersedes #3005, which mixed the infrastructure with new
`gt4py.next` documentation. The review discussion so far is there. The
new `gt4py.next` pages follow in a stacked PR on top of this one.

Sets up a single user documentation site, deployed to GitHub Pages, made
of three independent Sphinx projects built into one tree:

| Site | Sources | Published at |
| --- | --- | --- |
| Welcome page | `docs/user/` | `/` |
| `gt4py.cartesian` | `docs/user/cartesian/` | `/cartesian/` |
| `gt4py.next` | `docs/user/next/` | `/next/` |

The welcome page introduces the project and links to both subsites,
which can also be browsed on their own and link back to each other.

### Changes

- **Build**: new `docs` nox session (`./noxfile.py -s docs`) building
the three projects into `docs/user/_build/html`.
- **Deployment**: new `Documentation` workflow. It builds the site on
every pull request and deploys it to GitHub Pages only when a (non-pre)
release is published. A manual run from a release tag with the `deploy`
input enabled allows republishing the docs of a release without a new
one.
- **Theme**: all sites use Furo (light/dark mode), configured once in
`docs/user/site_theme.py`.
- **`gt4py.next` subsite**: the subsite infrastructure is in place
(including `myst-nb` for executable MyST notebooks), but it only
contains a placeholder page saying that the documentation is being
rewritten and will be available soon. The new documentation follows in
the stacked PR. The old `QuickstartGuide.md` is removed.
- **README**: `gt4py.next` is presented as the current generation of the
library, and the cartesian-specific description and backends list are
dropped.
- **`gt4py.cartesian` subsite**: content unchanged. The build was broken
with current Sphinx; the generated API reference now covers all
subpackages except `gt4py.next` and `gt4py.eve`.
- **Dependencies** (`docs` group): `sphinx` bumped to the latest release
supported by each Python version (9.2 dropped Python 3.12),
`myst-parser>=5.2`, new `myst-nb`, `furo` and `sphinx-design`, removed
`sphinx-rtd-theme`.
- **Developer docs**: new `docs/development/tools/documentation.md`
describing the infrastructure.

### Required before merging

- [x] Switch the Pages source of the repository to _GitHub Actions_
(_Settings > Pages_). The site is currently served from the `gh-pages`
branch.
- [x] Add the `Build documentation` check to the required status checks
of the `main` branch protection, so that a broken documentation build
blocks merging. The workflow now runs on every pull request (no `paths`
filter) for this purpose.
- [x] Allow deployments from the release tags (`v*`) in the
`github-pages` environment (_Settings > Environments_). It currently
only allows the `gh-pages` branch, so the deployment would be rejected.

### Notes

- The documentation is published when the next release is made after
this PR is merged, so the old site stays up until then. After the
switch, the old v1.0 documentation in the `gh-pages` branch is no longer
published. The old `latest/` URL redirects to the new welcome page.
- The README logo now loads from `main` (`docs/user/_static/logo.svg`),
so it only renders once this is merged.
- The advanced toolchain guides and the workshop notebooks are not part
of the site yet.

## Requirements

- [ ] All fixes and/or new features come with corresponding tests.
- [x] Important design decisions have been documented in the appropriate
ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md)
folder: not an ADR, see `docs/development/tools/documentation.md`.
egparedes added a commit that referenced this pull request Nov 23, 2026
## Description

Follows #3023 (documentation site infrastructure, already merged).
Replaces the placeholder page of the `gt4py.next` subsite with new user
documentation, written from scratch as executed MyST notebooks: every
code cell runs when the site is built, so the outputs shown are the real
ones and a failing example fails the build.

The goal is a short and clear guide, not a complete reference:

| Section | Pages |
| --- | --- |
| Getting started | Landing page, quickstart |
| Data structures | Grids and fields (dimensions, domains, allocation,
unstructured meshes) |
| GT4Py DSL | Field operators, premap and neighbors (Cartesian,
unstructured, `concat_where`, staggered dimensions), scan operators,
programs |
| Execution | Executing GT4Py programs: embedded execution, compiled
backends (`dace_cpu`, `gtfn_cpu`), build cache, compiling in advance,
static parameters, static domains, short GPU note |

The worked examples (horizontal diffusion, implicit vertical diffusion,
operators on an unstructured mesh) are split out to #3032, stacked on
this PR, to be reviewed separately.

### Other changes

- `test_examples` nox session: runs every executable page of the
`gt4py.next` subsite, in any of its folders, including the landing page.
- The toolchain guides (`HackTheToolchain.md`, `WorkflowPatterns.md`)
move from `docs/user/next/advanced/` to
`docs/development/next/toolchain/`, since they are developer
documentation. They are still run by `test_examples`.
- The figures of the small unstructured mesh are generated by a script,
`docs/user/next/images/mesh_figures.py`, from the same tables used in
the pages.
- The `gt4py.cartesian` site is now titled "GT4Py Cartesian" instead of
"GT4Py (cartesian)".
- `Documentation` workflow: the site can also be deployed manually from
`main` (workflow dispatch with the `deploy` input), not only from a
release tag.
- The Sphinx configuration of the `gt4py.next` subsite drops the DaCe
SDFG viewer scripts which importing `dace` injects in the notebook
outputs, since they slowed down the loading of every page.
- Welcome page card and `docs/development/tools/documentation.md`
updated to describe the new content.

### Notes

- There is no API reference for `gt4py.next`: the docstrings of the
public API are not ready to be published yet.
- `concat_where` and staggered dimensions are documented and marked as
experimental.
- The GPU section is not executed in the build.
- Some cells hide warnings printed to stderr (`remove-stderr` tag).
#3022 removes those warnings in the library; the tags can be dropped
once it is merged.
- This content was previously part of #3005, where the first review
comments are.

## Requirements

- [x] All fixes and/or new features come with corresponding tests: the
pages are executed in the docs build and by the `test_examples` session.
- [ ] Important design decisions have been documented in the appropriate
ADR inside the [docs/development/ADRs/](docs/development/ADRs/README.md)
folder: not applicable.

🤖 Written by an agent on my behalf.
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