docs: fix broken code examples and stale references across the doc set - #45
Merged
Merged
Conversation
for more information, see https://pre-commit.ci
Contributor
Author
|
@keewis To review ? |
keewis
reviewed
Aug 31, 2026
keewis
left a comment
Contributor
There was a problem hiding this comment.
looks good to me, but I have two comments. The first can be a separate PR (so doesn't have to be addressed here), but the second is a very common LLM-ism comparing to the previous version that I'd just remove.
Comment on lines
+38
to
+45
| ```{warning} | ||
| This pattern does **not** work for `indexing_scheme="zuniq"`. `as_keyword_params()` | ||
| always includes `depth=grid.level`, but zuniq cell ids already encode their own | ||
| depth, so `healpix_geo.zuniq.healpix_to_lonlat` does not take a separate `depth` | ||
| argument the way `nested`/`ring` do. For zuniq data, call | ||
| `healpix_geo.zuniq.healpix_to_lonlat` directly instead of going through | ||
| `grid.operations`/`grid.as_keyword_params()`. | ||
| ``` |
Contributor
There was a problem hiding this comment.
that's a bug in the implementation, so I'd argue we should rather improve our code. Switching from the internal dispatching to healpix_geo.auto should get us most of the way.
Co-authored-by: Justus Magin <keewis@users.noreply.github.com>
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.
Summary
Audited every doc page against the actual source (
healpix_plot/*.py) and fixedeverything that was factually wrong or would error if a user copy-pasted it.
axpassed toplot()must be a CartopyGeoAxescreated withsubplot_kw={"projection": ...}— a plainplt.subplots()axis raisesAttributeError: 'Axes' object has no attribute 'set_extent'. Added a "Multiple panels side by side" example, and documentedthe previously-missing
viewandrgb_clipparameters.mollviewmodule (from mollview import ...→from healpix_plot.mollview import ...); corrected the ellipsoid section, which claimedhealpix_geo.nested.lonlat_to_healpixis always used (it'shealpix_geo.ringunlessnest=True).healpix_plot.SamplingGrid.from_bbox(...), which doesn't exist —from_bboxis a classmethod ofParametrizedSamplingGrid.as_keyword_params()always passes
depth, whichhealpix_geo.zuniq.healpix_to_lonlatdoesn'taccept).
healpix-plottingin 4 places (includingthe
pip installcommand) vs. the realhealpix-plot; fixed a dead#healpixgridanchor link.>= 3.11(perpyproject.toml)across
README.md,docs/installation.md, andmollview.md, whichpreviously disagreed (3.13 / 3.13 / 3.10).
Test plan
grep -rn "healpix-plotting\|from mollview import\|SamplingGrid.from_bbox" docs/ README.mdreturns no false positives