Skip to content

📚 DOCS: Add new tutorial modules#7205

Open
GeigerJ2 wants to merge 27 commits intoaiidateam:mainfrom
GeigerJ2:docs/integrate-tutorials
Open

📚 DOCS: Add new tutorial modules#7205
GeigerJ2 wants to merge 27 commits intoaiidateam:mainfrom
GeigerJ2:docs/integrate-tutorials

Conversation

@GeigerJ2
Copy link
Copy Markdown
Collaborator

@GeigerJ2 GeigerJ2 commented Feb 6, 2026

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.84%. Comparing base (82d5ca7) to head (01a726b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/aiida/tools/ipython/ipython_magics.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #7205      +/-   ##
==========================================
- Coverage   79.86%   79.84%   -0.01%     
==========================================
  Files         566      566              
  Lines       43936    43943       +7     
==========================================
  Hits        35084    35084              
- Misses       8852     8859       +7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

GeigerJ2 and others added 15 commits March 26, 2026 14:15
CalcJob concepts, static script, cleaner UX

Intro:
- Add teaser section heading with TODO checklist for showcasing key
  features (WorkGraph, error handling, querying, visualization)
- Fix module count: six → seven

Module 1:
- Add tip about `verdi node graph generate <PK>` CLI alternative

Module 2:
- Introduce CalcJob concept properly before first use, explain
  difference to calcfunction, link to topics/how-to docs
- Reference static script file (gp/reaction-diffusion.py) via
  literalinclude + dropdown instead of writing 100-line script
  on-the-fly
- Make work_dir creation visible (was hidden as tutorial_dir)
- Access output via node.outputs (AiiDA pattern) instead of results dict
- Hide parser function cell (hide-cell tag)
- Fix failure demo: remove outputs/parser from failing run so
  aiida-shell surfaces the actual non-zero exit status instead of
  misleading 303
- Put load_profile instructions in proper code block
- Suppress write_text() return value ("80") with semicolons
- Rephrase Computer/Code section to acknowledge verdi presto
- Add cross-references to topics:calculations, how-to:run-codes,
  how-to:plugin-codes throughout
- Update learning objectives and summary to match actual content
Move inline code snippets (simulation script, parser, plotting) from
markdown code cells to standalone `.py` files under `include/`. This
enables LSP support (type checking, autocomplete) for tutorial code and
uses `{literalinclude}` + `{dropdown}` for display, `%run -i` for
notebook execution.

All three files pass mypy --strict, and ruff:

Also updates module1.md to use `%run -i include/plot_fields.py` instead
of inline matplotlib code.
Tutorials infrastructure:
- Add `_ext/inline_downloads.py` Sphinx extension that post-processes
  downloaded notebooks: inlines `%run -i` files, converts MyST
  admonitions to HTML alert divs, dropdowns to `<details>`,
  literalinclude to code blocks, and strips MyST-only roles/labels —
  making notebooks fully self-contained and Jupyter-compatible
- Add `{nb-download}` links to module1 and module2 for one-click
  download
- Register extension in conf.py

Content:
- Add `teaser.md`: user-focused preview of AiiDA capabilities
  (monitoring, error recovery, querying, provenance, sharing, workflow
  extensibility)
- Convert `index.rst` → `index.md` (MyST); separate "AiiDA in Action"
  card above the module grid; update redirects.txt accordingly
- Generalize example-specific language in headings, learning objectives,
  and module tables across intro.md, module3.md, and module6.md

Tutorial code cleanup:
- Extract inline `simulate()` from module1.md to typed
  `include/simulate.py` with `SimParams(TypedDict)`, loaded via `%run
  -i`
- Extract provenance graph boilerplate to `include/plot_provenance.py`
- Add IPython magic commands note in module1.md explaining `%run -i`,
  `%verdi`, and `%load_ext aiida`
- Pre-register `InstalledCode('python3')` in module2.md hidden cell so
  `verdi process list` shows `python3@localhost` instead of full venv
  path
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant