Skip to content

Closes #74 – Improve Readability of geoplot.py with Inline Comments #77

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

dhruvdk3
Copy link

@dhruvdk3 dhruvdk3 commented May 6, 2025

Summary

This PR adds clear, concise inline comments throughout src/visualize/geoplot.py to enhance code readability and developer onboarding. The comments clarify:

  • The purpose of each import and utility function
  • How the HTML/Cesium template integrates with the Python logic
  • Each major section of the GeoPlot.render() method (coordinate extraction, timestamping, GeoJSON generation, template substitution)
  • Time-series entity construction logic in the embedded JavaScript

Changes Made

  • Added file-level docstring to describe module usage
  • Added inline comments to:
    • all imports
    • read_var() helper
    • the GeoPlot class, its constructor, and render() method
    • JSON building logic and timestamp generation
    • Cesium template JS functions and rendering flow

Scope

  • No code logic changed
  • Fully PEP8-compliant
  • Linted using flake8 locally
  • File generates .geojson and .html correctly

Testing

  • Performed a manual smoke test with test.py using dummy trajectory data
  • Verified that test_run.geojson and test_run.html were created
  • Opened HTML in browser and verified Cesium viewer rendered correctly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant