Skip to content

Conversation

@espg
Copy link
Collaborator

@espg espg commented Oct 2, 2025

Description

This PR adds a test notebook to verify whether GitHub issue #23 (Map module does not display in jupyter notebooks without cell magic) is fixed with the current implementation of polar.html.

Context from Issue #23

The issue reported that the polar map module wasn't displaying properly when called from Python using IPython.display.HTML, but worked with the %%html cell magic.

The root cause was that there wasn't a clean way to pass the CONFIG object to the iframe when generating HTML from Python.

What Changed Since the Issue Was Opened

The polar.html file now supports URL parameters for configuration, which means the CONFIG can be passed directly in the iframe URL rather than relying on JavaScript object injection.

Test Notebook

The new notebook (docs/notebooks/test_map_display.ipynb) tests:

  1. HTML Cell Magic - The method that was reportedly working
  2. Python HTML Display - The method that was broken (should now work with URL params)
  3. File Groups - New feature for displaying multiple files with different colors
  4. Legacy CONFIG Method - For backward compatibility
  5. Both Poles - Arctic and Antarctic projections

To Verify the Fix

  1. Build the docs with this PR
  2. Open the test notebook in the built docs on surge.sh
  3. Run all cells and verify that all map display methods work
  4. If all methods work, the issue can be closed

Related Issues

Fixes #23

🤖 Generated with Claude Code

- Create comprehensive test notebook to verify if GitHub issue #23 is fixed
- Tests multiple methods of displaying polar maps in Jupyter notebooks:
  - HTML cell magic (previously working)
  - Python HTML display with URL params (previously broken)
  - File groups with colors
  - Legacy CONFIG object method
  - Both Arctic and Antarctic projections
- polar.html now supports URL parameters which should resolve the issue

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@espg espg changed the title Test fix for map display issue in Jupyter notebooks (#23) [WIP] Test fix for map display issue in Jupyter notebooks (#23) Oct 2, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2025

📚 Documentation Preview Ready!

🌐 Live Preview

URL: https://xopr-pr-33.surge.sh/xopr/

Preview updates automatically with new commits while the preview-docs label is present.

📦 Download Artifact

You can also download the docs for local viewing.

Commit: f46a3fa


To trigger a preview, add the preview-docs label or use the /preview command.

espg and others added 2 commits October 1, 2025 23:44
- Changed from relative path (../_static/maps/polar.html) to GCS path
- Use https://storage.googleapis.com/opr_stac/map/polar.html
- Updated all 5 test cases in the notebook
- This matches the actual deployment location of polar.html

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Map module does not display in jupyter notebooks without cell magic

2 participants