Contributing documentation

The v_ase documentation is part of the release contract, not a separate after-release artifact. User documentation, implementation behavior, the canonical agent control contract, rendered examples, package metadata, and the published Read the Docs version must describe the same tested release.

Write for the intended reader

The README is a visual tour of the major capabilities: show what users can build, inspect and export through real GIF demonstrations. Give each demonstration a short explanation and a link to its task guide. Keep the main workflows visible in the README rather than replacing them with a link directory. Avoid duplicate animations, unexplained spinning structures and implementation diaries. Keep installation easy to reach and saving concise. User guides explain where a control is, what to do, and what result to expect. Keep scientific definitions and limitations that affect interpretation.

Do not paste conversation replies, implementation notes, test counts, release checklists or account/certificate setup instructions into user guides. Explain maintainer-only questions directly to the maintainer. Existing contributor reference belongs under Contributing, not Get started. Mention installation warnings only where users encounter them, with a short actionable explanation.

A guide must stand on its own without phrases such as “as requested”, descriptions of an old broken UI, or a sequence of patch-specific promises. Link to the one canonical guide rather than duplicating saving, camera or installation details.

Documentation stack

The site uses:

  • Sphinx for document structure, cross-references, search and output;

  • MyST-Parser for Markdown sources;

  • the Read the Docs Sphinx theme;

  • the local vase-demo extension for live WebGL examples with print-safe fallbacks; and

  • .readthedocs.yaml for the hosted Python and build configuration.

The pinned documentation dependencies live in docs/requirements.txt. docs/conf.py reads the application release from v_ase/_version.py, so the site title follows the tested package version without importing the scientific runtime.

Build locally

From the repository root, create or activate a Python 3.12+ environment and install only the documentation toolchain:

python -m pip install -r docs/requirements.txt
make -C docs html

The generated site is under docs/_build/html. The Makefile enables warnings as errors and continues far enough to report all warnings in one run. A successful build must therefore finish with no missing documents, orphaned pages, unresolved references, duplicate targets, invalid MyST, or missing images.

Run the external-link builder separately:

make -C docs linkcheck

Transient publisher rate limits can be retried, but a repeatable 404 must be fixed. Prefer DOI landing pages over fragile publisher-specific supplementary file paths.

Clean generated output with:

make -C docs clean

docs/_build/ is generated and must not be committed.

Add or reorganize a page

  1. Put user and maintainer Markdown under docs/ with a descriptive, lower-case filename.

  2. Give the page exactly one level-one heading.

  3. Add it directly to the appropriate captioned feature toctree in index.md. Independent features must not be nested beneath a sequential workflow hub. Start with purpose and controls, then a downloadable example with numbered steps, figures, exact inputs and expected results. A page omitted from every toctree produces a strict-build warning unless it is deliberately marked orphaned.

  4. Use relative links between documentation pages, including the .md suffix in source.

  5. Build HTML with warnings as errors and inspect the rendered page, sidebar, tables, code blocks and narrow-screen layout.

Do not link to ../README.md, ../examples, or another file outside the Sphinx source tree as though it will automatically become a documentation page. Either create an internal documentation page, use a stable external source link, or include the content deliberately and verify rewritten links.

MyST conventions

Use ordinary CommonMark where it is sufficient. MyST directives are available for structured content:

:::{note}
This renders consistently in HTML and non-HTML Sphinx builders.
:::

```{toctree}
:maxdepth: 2

child-page
```

Follow these rules:

  • use fenced code blocks with a language such as bash, python, json, or text;

  • give links meaningful text instead of “here”;

  • provide accurate alt text for every meaningful image;

  • keep tables narrow enough for the Read the Docs content column;

  • use headings or MyST admonitions instead of raw HTML <details> blocks when content must also work in PDF/ePub; and

  • avoid hard-coded section-fragment links when a normal page link or Sphinx cross-reference is clearer.

The strict build is the final authority for parser and reference behavior; GitHub’s Markdown preview is not equivalent to Sphinx/MyST.

Keep all documentation surfaces synchronized

For every user-visible behavior change:

  • update the relevant user-guide or reference page;

  • update README.md as required by the repository release contract;

  • update CHANGELOG.md for the release;

  • update examples or troubleshooting when commands, dependencies, output, or errors change; and

  • update package metadata when the public documentation or release URL changes.

When a workflow, semantic operation, display setting, analysis feature, export, dependency, safety rule, or error changes, also update the canonical agent Skill and the necessary one-level references under v_ase/skills/visualizing-atomic-structures-with-v-ase/. Compare those files with the live semantic schema and capabilities. Add or update a regression if an agent could otherwise fail because the written contract is ambiguous or stale.

Do not copy a long canonical contract into two independently edited pages when a concise user explanation plus a clear reference can avoid divergence.

Verify the source distribution

The documentation build configuration and required source assets are included in the sdist through MANIFEST.in. After changing those rules, build and inspect the release artifacts:

python -m build
python -m twine check dist/*
tar -tf dist/v_ase_gui-*.tar.gz

Extract the new sdist into a clean temporary directory, install docs/requirements.txt, and run the same strict Sphinx HTML build there. This catches a missing configuration, CSS file, page, or required image that a checkout build would hide.

Read the Docs and release validation

Read the Docs builds from .readthedocs.yaml using the pinned requirements. Pull-request builds should pass before merge. After a release tag is published:

  1. confirm the tag-specific documentation build succeeds;

  2. confirm latest points to the intended commit; do not enable or make a stable alias the default until the project adopts a stable-channel policy;

  3. inspect the deployed navigation, search and representative images;

  4. confirm source/edit links point to the version being read rather than always to main; and

  5. verify the public Documentation URL from README and package metadata.

The complete package, browser, semantic-agent, media, GitHub and PyPI sequence remains mandatory. See Release checklist.

Documentation pull-request checklist

  • The page is in the correct toctree and has one clear audience.

  • Commands were checked against the documented v_ase version.

  • Local links, anchors and image paths resolve.

  • HTML builds with warnings as errors.

  • Live WebGL demos load, interact, and retain static PDF/ePub fallbacks.

  • Linkcheck has no repeatable broken URL.

  • Rendered HTML was inspected, not only the Markdown source.

  • README, Skill, changelog, metadata and tests were updated where required.

  • Required Sphinx sources/assets are present in the sdist.

Animation packaging

Use vase-animation with a local canonical GIF and an exact PNG fallback. GitHub and online documentation retain the original animations. Source packages include the static scientific previews and extracted steps instead of duplicating large GIFs; this keeps PyPI downloads small and the source-manual build complete. PDF/ePub also use the stills. Always check both checkout and sdist documentation.

When builders share a doctree directory, vase_demo reparses documents on a builder change. This prevents HTML GIFs or iframe markup from leaking into PDF/ePub output. The shared-cache regression must pass before a docs release.