Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@yunjunz
Copy link
Member

@yunjunz yunjunz commented Jun 10, 2025

Description of proposed changes

  • .circleci/config.yml: unpin gdal<=3.8 constraint (tests: pin gdal"<=3.8" for circle ci #1235) as the issue seems to have been fixed by the latest version 3.11 (it occurred on gdal-3.9.0, I have not tested on other gdal-3.9.x versions)

  • GDAL-3.9 did a huge split. As a result, the netCDF driver (packaged as libgdal-netcdf), as required by GMTSAR, needs to be explicitly specified in the environment. This PR address this dependency change and update the related documentation.

  • minor updated related to IONEX plotting via ionex.plot_ionex(): show coastline in the animation

    • add cl.set_visible(True)
    • set FuncAnimation(blit=False)
    • use mpl_toolkits.axes_grid1.make_axes_locatable() for a more compact whitespace around the axes
  • utils.map.draw_lalo_label(): add direction option to change the tick direction

Reminders

Summary by Sourcery

Support GDAL 3.9+ by unpinning the GDAL version constraint and explicitly requiring libgdal-netcdf across docs, CI, and tests. Add configurable tick direction to map utilities and refine IONEX plotting to show coastlines, improve colorbar placement, and disable blitting for animations.

Enhancements:

  • Unpin GDAL version constraint and add libgdal-netcdf requirement to support GDAL 3.9+.
  • Add direction parameter to draw_lalo_label for configurable tick orientation.
  • Enhance plot_ionex to display coastline, optimize colorbar layout, adjust figure size, and disable blitting for animations.

CI:

  • Update CircleCI config to unpin GDAL and install libgdal-netcdf.

Documentation:

  • Update installation guide to include libgdal-netcdf for GMTSAR dependencies.

Tests:

  • Modify test requirements to remove GDAL version pin and add libgdal-netcdf.

+ `.circleci/config.yml`: unpin `gdal<=3.8` constraint as the issue seems to have been fixed by the latest version 3.11 (it occurred on gdal-3.9.0, I have not tested on other gdal-3.9.x versions)

+ GDAL-3.9 did a huge split. As a result, the `netCDF` driver (packaged as `libgdal-netcdf`), as required by GMTSAR, needs to be explicitly specified in the environment. This PR address this dependency change and update the related documentation.

+ minor updated related to IONEX plotting via ionex.plot_ionex(): show coastline in the animation
   - add `cl.set_visible(True)`
   - set `FuncAnimation(blit=False)`
   - use `mpl_toolkits.axes_grid1.make_axes_locatable()` for a more compact whitespace around the axes

+ utils.map.draw_lalo_label(): add `direction` option to change the tick direction
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 10, 2025

Reviewer's Guide

This PR adapts the project to GDAL 3.9+ by removing the pin on GDAL ≤3.8, explicitly adding the netCDF driver, updating installation docs and CI configs accordingly, and enhances plotting and map utilities to support new visualization options.

File-Level Changes

Change Details Files
Unpin GDAL version and add netCDF driver dependency
  • Remove gdal≤3.8 pin in CircleCI
  • Include libgdal-netcdf in CI install
  • Update installation docs to require “gdal libgdal-netcdf”
  • Amend tests/requirements.txt to unpin GDAL and add netCDF driver
.circleci/config.yml
docs/installation.md
tests/requirements.txt
Enhance ionex.plot_ionex animation and layout
  • Import and use make_axes_locatable for compact colorbar
  • Adjust figure width and manually position colorbar axes
  • Show coastline explicitly each frame
  • Switch FuncAnimation to blit=False and return coastline artist
src/mintpy/objects/ionex.py
Allow custom tick direction in map drawing
  • Add “direction” parameter to draw_lalo_label signature
  • Pass direction into ax.tick_params
src/mintpy/utils/map.py

Assessment against linked issues

Issue Objective Addressed Explanation
#1236 Address the split of GDAL dependencies in version 3.9, specifically the netCDF driver dependency for GMTSAR.
#1236 Unpin the gdal<=3.8 constraint in .circleci/config.yml.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @yunjunz - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟡 General issues: 2 issues found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

+ utils.map.draw_lalo_label(): set all arguments since direction as keyword only arguments.
@yunjunz yunjunz merged commit de40c88 into insarlab:main Jun 10, 2025
7 checks passed
@yunjunz yunjunz deleted the gdal branch June 10, 2025 09:34
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.

gdal-3.9 conda package did a huge split of its of dependencies

1 participant