Fix Cerebrovascular Reactivity Mapping (ch06) build: make it illustrative#87
Fix Cerebrovascular Reactivity Mapping (ch06) build: make it illustrative#87eurunuela wants to merge 2 commits into
Conversation
Every code cell in 06_Cerebrovascular_Reactivity_Mapping.md referenced
files absent from the repo (manual_classification.tsv, optcom.nii.gz,
co2.phys, masks, ROI) plus a bare `raise ValueError("SKIP")`, so the
chapter could never execute during the build. Jupyter Book halts a
notebook at its first error, so only the manual_classification.tsv
FileNotFoundError surfaced.
Convert all {code-cell} ipython3 blocks to plain ```python blocks
(matching 08_ICA_Based_Denoising.md), making this an illustrative
tutorial the reader runs on their own data, and drop the SKIP hack.
Verified: ch06 no longer appears in _build/html/reports/content/ and the
book build exits 0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR makes Chapter 06 (“Cerebrovascular Reactivity Mapping”) non-executable during the Jupyter Book build by converting MyST {code-cell} blocks into illustrative fenced python code blocks, removing the build-stopping execution failures caused by missing example data files.
Changes:
- Replaced
{code-cell} ipython3blocks with plain fenced```pythonblocks so the chapter renders as a runnable-on-your-own-data guide. - Removed the
raise ValueError("SKIP")execution hack by eliminating notebook execution of the chapter’s code blocks.
Comments suppressed due to low confidence (1)
content/06_Cerebrovascular_Reactivity_Mapping.md:48
- The fenced code block after the third bullet is no longer indented, so it will render outside the list item in Markdown/Jupyter Book. Also the example writes
accecpted_ic_timeseries.csv, which is inconsistent with later references toaccepted_ic_timeseries.csvand will cause a FileNotFoundError for readers following the tutorial.
```python
import pandas as pd
# Assuming RICA was used for manual classification, read the downloaded file (adjusting path as necessary)
man_class = pd.read_csv('../manual_classification.tsv', sep='\t', header=0)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…as example - The pandas example saved to '../accecpted_ic_timeseries.csv' (typo) while the phys2cvr calls read '../accepted_ic_timeseries.csv' — a reader following the tutorial would hit FileNotFoundError. Match the spelling. - Indent the first code block so it renders inside the list item that introduces it (it was at column 0, rendering outside the list). Verified it parses as a fenced python block nested in the list item. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Addressed the Copilot review feedback on the first code block (909b752):
Both were pre-existing in the chapter; folded them in here since the reviewer flagged them on the block this PR touches. |
|
No, sorry, I was about to write that it's a me issue as well now. I thought I copied another page example more closely, but probably I inserted some mistakes. Is there any action item I need to take care of? |
|
I was planning to work my way through this page and fix any missing paths, rather than disable the code cells. It may rely on files generated by the tedana workflow page (except for the manual classifications, which will need to be swapped out for the automatic ones from tedana). |
|
I don't have the bandwidth to fix the missing paths. This happens to be what I did to be able to build the book locally and I thought I'd open this to flag it. Again, feel free to work on it or close it. |
|
We'd also need a CO2 generated for and from peakdet. Is the automatically generated table from tedana the same as rica's? One thing we can try in the next days speaking with César is if we can use an extract of the data from EuskalIBUR for this purpose (like a half or a quarter of brain of a subject), if you can accept more data. |
Problem
content/06_Cerebrovascular_Reactivity_Mapping.mdfails the Jupyter Book build withFileNotFoundError: ../manual_classification.tsv. That error is only the first of several — Jupyter Book stops executing a notebook at its first failure, so the rest stay hidden. In fact every{code-cell}in the chapter references files that aren't in the repo (../optcom.nii.gz,../co2.phys, the brain/ROI masks, the ICA mixing matrix), plus a strayraise ValueError("SKIP"), and no CO₂/physio data ships with the book. The chapter can therefore never execute during a build.Fix
Convert the chapter's 9
{code-cell} ipython3blocks to plain```pythonblocks, matchingcontent/08_ICA_Based_Denoising.md— the analogous illustrative tutorial that the book already ships. The page now renders as a guide the reader runs on their own data, and theraise ValueError("SKIP")hack is dropped. Markdown-only change (+9 / −10).Verification
The book builds and
06_Cerebrovascular_Reactivity_Mapping.err.logis gone from_build/html/reports/content/(chapter 06 previously halted there).Out of scope
Pre-existing, non-blocking warnings remain on the page and are left untouched: a broken cross-reference to the rica
07page and a missing bibtex keyCohen2025RS.🤖 Generated with Claude Code