changing how the Makefile locally deals with preview files#130
Closed
changing how the Makefile locally deals with preview files#130
Conversation
|
Review these changes at https://app.gitnotebooks.com/wherobots/wherobots-examples/pull/130 |
Contributor
There was a problem hiding this comment.
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
converttarget to no longer depend onclean(no automatic output directory removal before conversion).
Comments suppressed due to low confidence (1)
Makefile:40
- Removing the
cleanprerequisite fromconvertmeans the output dir isn’t cleared between runs. Sinceupdate_docs_navigation.pydiscovers notebooks viaglob("*.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) keepingcleanin thepreview/allworkflow 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.
Contributor
Author
|
Closing in favor combining change with #129 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Remove clean as a dependency of the convert Makefile target.
Problem
Every time
make convert(ormake preview) runs, it first executes clean, which doesrm -rfon the entiretutorials/example-notebooksdirectory in thedocsrepo. Since those.mdxfiles are tracked by git in the docs repo, this causes them to show up as deleted ingit status— especially when switching branches inwherobots-examples, where the new branch may generate a different set of notebooks than what was previously committed.Fix
convertno longer depends onclean, so it overwrites.mdxfiles in place without deleting the entire output directory.make cleanis still available for explicit use when a full wipe is needed.