Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/instructions/docs.instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ When making changes:
- Variable names and values
4. After editing, verify the changes are truly equivalent


## Jupytext Usage Reference

### Critical pre-execution checklist
Expand Down Expand Up @@ -73,7 +74,7 @@ to surface in review; don't paper over it by committing an output-less notebook.

### Commands

Generate .ipynb from .py (with execution — preferred):
Generate .ipynb from .py (with execution — if it fails it means there are errors):
```bash
jupytext --to ipynb --execute doc/path/to/your_notebook.py
```
Expand All @@ -83,10 +84,9 @@ Generate .py from .ipynb:
jupytext --to py:percent doc/path/to/notebook.ipynb
```

Sync structure only without executing (rarely correct — outputs will be empty):
```bash
jupytext --to ipynb doc/path/to/your_notebook.py
```
If a `doc/**/*.py` notebook fails during `jupytext --execute` with errors that look like uninitialized state (missing env vars, undefined names, `initialize_pyrit_async` apparently not run, failing cell shows `Cell In[1]` despite earlier code), **check the `# %%` cell separators in the .py file first**.

A missing `# %%` between a `# %% [markdown]` block and the following code causes jupytext to silently absorb the code into the markdown cell, so it never executes. Symptoms in isolation (small repro scripts) will work fine — the bug is purely in the cell structure of the .py file. Do not chase env-loading or runtime issues until cell markers are verified.

## Summary
- **Default strategy**: Update both files inline for simple changes
Expand Down
Loading
Loading