docs: Readme read animation#17
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a Manim-based workflow for generating README-friendly animations and embeds the first “general-read” GIF into the project README to illustrate SparseIO’s read path.
Changes:
- Added animation tooling under
scripts/animations/(shared venv bootstrap, pinned Manim dependency, and a render script). - Introduced a
GeneralReadSceneManim scene to generatedocs/static/general-read.gif. - Embedded the generated GIF into the top-level
README.md.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/animations/requirements.txt | Pins the Manim dependency for animation rendering. |
| scripts/animations/README.md | Documents animation layout, setup, and rendering workflow. |
| scripts/animations/general-read/scene.py | Defines the Manim scene for the “general-read” animation. |
| scripts/animations/general-read/render.sh | Renders the scene to MP4 and converts it to a GIF in docs/static/. |
| scripts/animations/common.sh | Bootstraps a dedicated venv and installs animation requirements. |
| README.md | Embeds the generated general-read.gif into the project README. |
| .gitignore | Ignores local profiling artifacts and Python/animation-generated files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+16
| ```bash | ||
| python3 -m venv .venv | ||
| source .venv/bin/activate | ||
| python3 -m pip install --upgrade pip | ||
| python3 -m pip install manim==0.19.0 | ||
| ``` |
Comment on lines
+16
to
+17
| "$PYTHON_BIN" -m pip install -r "$REQUIREMENTS_FILE" | ||
| fi |
|
|
||
| manim_config.background_color = "#07111F" | ||
|
|
||
| FONT_FAMILY = "Verdana" |
| FILE_CHUNKS = 6 | ||
| CHUNK_SIZE_LABEL = "1 chunk" | ||
| FILE_SIZE_LABEL = "6 chunks" | ||
| PREFETCH_AHEAD_CHUNKS = 2 |
Comment on lines
+442
to
+455
| def make_prefetch_window(self, cache: FileColumn, start_chunk: int, chunk_span: int) -> DashedVMobject: | ||
| start = max(0, min(FILE_CHUNKS - 1, start_chunk)) | ||
| end = max(start, min(FILE_CHUNKS - 1, start + chunk_span - 1)) | ||
| top = cache.chunk_rect(start).get_top() | ||
| bottom = cache.chunk_rect(end).get_bottom() | ||
| window = Rectangle( | ||
| width=cache.body.width + 0.18, | ||
| height=top[1] - bottom[1], | ||
| stroke_color=PREFETCH_COLOR, | ||
| stroke_width=2, | ||
| ) | ||
| window.move_to([cache.body.get_center()[0], (top[1] + bottom[1]) / 2, 0]) | ||
| return DashedVMobject(window, num_dashes=18) | ||
|
|
Comment on lines
+455
to
+460
|
|
||
| def make_stream_slices(self, cache: FileColumn, start_chunk: int) -> VGroup: | ||
| first = self.make_slice(cache.chunk_rect(start_chunk), 0.58, 0.26, STREAM_COLOR) | ||
| second = self.make_slice(cache.chunk_rect(start_chunk + 1), 0.42, 0.72, STREAM_COLOR) | ||
| third = self.make_slice(cache.chunk_rect(start_chunk + 2), 0.24, 0.24, STREAM_COLOR) | ||
| return VGroup(first, second, third) |
Comment on lines
+24
to
+27
| ffmpeg -y \ | ||
| -i "$VIDEO_FILE" \ | ||
| -vf "fps=12,scale=960:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=128[p];[s1][p]paletteuse=dither=bayer:bayer_scale=3" \ | ||
| "$OUTPUT_GIF" |
| Instead of eagerly copying an entire object from source to destination, SparseIO allows you to fetch only the chunks you ask for. It tracks what is already present for efficient caching, and deduplicates concurrent reads for the same chunk. | ||
|
|
||
| <p align="center"> | ||
| <img width="600px" src="./docs/static/general-read.gif"> |
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.
Adds a basic gif outlining how reads occur and a framework for how future descriptive animations will be designed and generated.