Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds repository branding assets and updates the Sphinx docs configuration to display the new logo and apply minor theme styling.
Changes:
- Added a
make_logo.pyscript to generatedoc_source/images/logo.pngandlogo_with_text.pngfrom an example Reeb graph. - Updated Sphinx configuration to use the new logo, add custom CSS, and adjust notebook highlighting.
- Added a BibTeX database file and a custom CSS override for the RTD theme sidebar header.
Reviewed changes
Copilot reviewed 4 out of 7 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
make_logo.py |
Adds a script to generate logo images used by the documentation. |
doc_source/conf.py |
Configures Sphinx to show the logo and load custom CSS; adds lexer override for notebook code blocks. |
doc_source/cereeberus.bib |
Adds bibliography entries for documentation. |
doc_source/_static/custom.css |
Adds minor RTD theme sidebar styling to match the new logo presentation. |
Comments suppressed due to low confidence (3)
make_logo.py:59
Image.open(...)is used without a context manager and then written back to the same path. On some platforms this can leave the file handle open and interfere with overwriting; using awithblock ensures the input file is closed before saving the cropped output.
from PIL import Image
img1 = Image.open(out1)
img1 = img1.crop(img1.getbbox())
img1.save(out1)
make_logo.py:128
- The second output image repeats
from PIL import Imageand also opens/saves the same file without closing the input handle first. This can be simplified by reusing the earlier import and using a context manager here as well.
from PIL import Image
img = Image.open(out2)
img = img.crop(img.getbbox())
img.save(out2)
make_logo.py:19
make_logo.pyexecutes file-writing code at import time (module top-level). Adding amain()function and anif __name__ == "__main__":guard would prevent accidental imports (e.g., by tooling) from overwriting tracked image assets.
# ── Build the Reeb graph ──────────────────────────────────────────────────────
R = ex_rg.dancing_man(seed=5)
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+11
to
+13
| import matplotlib as mpl | ||
| import matplotlib.pyplot as plt | ||
| import matplotlib.patheffects as pe |
Comment on lines
+63
to
+66
| # Configure Pygments lexer mapping for ipython3 | ||
| from pygments.lexers import PythonLexer | ||
| from sphinx.highlighting import lexer_classes | ||
| lexer_classes['ipython3'] = PythonLexer |
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
Made a logo for the repo and updated the documentation
Motivation and Context
How has this been tested?
Types of changes
Checklist
pyproject.tomlfile.