Skip to content

changing how the Makefile locally deals with preview files#130

Closed
kadolor wants to merge 1 commit intomainfrom
fix-makefile
Closed

changing how the Makefile locally deals with preview files#130
kadolor wants to merge 1 commit intomainfrom
fix-makefile

Conversation

@kadolor
Copy link
Copy Markdown
Contributor

@kadolor kadolor commented Feb 24, 2026

Description

Remove clean as a dependency of the convert Makefile target.

Problem

Every time make convert (or make preview) runs, it first executes clean, which does rm -rf on the entire tutorials/example-notebooks directory in the docs repo. Since those .mdx files are tracked by git in the docs repo, this causes them to show up as deleted in git status — especially when switching branches in wherobots-examples, where the new branch may generate a different set of notebooks than what was previously committed.

Fix

convert no longer depends on clean, so it overwrites .mdx files in place without deleting the entire output directory. make clean is still available for explicit use when a full wipe is needed.

@kadolor kadolor requested a review from Copilot February 24, 2026 21:58
@kadolor kadolor self-assigned this Feb 24, 2026
@gitnotebooks
Copy link
Copy Markdown

gitnotebooks bot commented Feb 24, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR changes the local docs preview workflow by removing the implicit clean step from the convert Make target, altering how generated “preview” notebook files are handled in the docs repo.

Changes:

  • Update convert target to no longer depend on clean (no automatic output directory removal before conversion).
Comments suppressed due to low confidence (1)

Makefile:40

  • Removing the clean prerequisite from convert means the output dir isn’t cleared between runs. Since update_docs_navigation.py discovers notebooks via glob("*.mdx"), any stale MDX files left from previous runs will continue to be treated as valid pages and will remain in docs.json navigation, even if the source notebooks were removed/renamed. Consider either (a) keeping clean in the preview/all workflow so previews are always fresh, or (b) making the conversion step prune stale *.mdx/generated images (e.g., delete outputs not regenerated in the current run via a manifest).
convert:
	@echo "Converting notebooks to MDX..."
	python3 .github/workflows/scripts/notebook_to_mdx.py \
		$(NOTEBOOK_DIRS) \
		-o $(NOTEBOOKS_OUTPUT_DIR) \

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

kadolor added a commit that referenced this pull request Feb 25, 2026
Incorporate fix from PR #130: convert no longer depends on clean, so it
overwrites .mdx files in place without deleting the entire output directory.
make clean is still available for explicit use when a full wipe is needed.
@kadolor
Copy link
Copy Markdown
Contributor Author

kadolor commented Feb 25, 2026

Closing in favor combining change with #129

@kadolor kadolor closed this Feb 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants