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

Skip to content

Conversation

@yunjunz
Copy link
Member

@yunjunz yunjunz commented Jun 4, 2025

Description of proposed changes

  • tropo_pyaps3: check ~/.cdsapirc file content for account setup

    • check_pyaps_account_config(): check the url address for CDS to ensure it's consistent with the latest CDS format
    • dload_grib_files(): printout the pyaps3 version, to facilitate the debugging.
  • other minor bug fixes and comment update

    • subset: bugfix for the print out msg of geo_box
    • objects.stack.ifgramStack.get_sequential_closure_phase(): grab processor info from PROCESSOR, if mintpy.load.processor does not exist
    • tests.smallbaselineApp: use HyP3 instead of ASF HyP3.
    • .circleci/config.yml: add link in the comment for miniforge

Reminders

Summary by Sourcery

Add content validation for ~/.cdsapirc in tropo_pyaps3, enhance download logging and fix minor bugs across subset, stack, tests, and CI configuration.

New Features:

  • Validate ~/.cdsapirc URL format for ERA5 model setup in tropo_pyaps3

Bug Fixes:

  • Correct processor name in smallbaselineApp tests from 'ASF HyP3' to 'HyP3'

Enhancements:

  • Print PyAPS version in dload_grib_files download logs
  • Fallback to PROCESSOR metadata in get_sequential_closure_phase when mintpy.load.processor is missing
  • Move and correct geo_box print position in subset.py
  • Add link to Miniforge repository in CircleCI config comment

+ `tropo_pyaps3`: check ~/.cdsapirc file content for account setup
   - `check_pyaps_account_config()`: check the url address for CDS to ensure it's consistent with the latest CDS format
   - `dload_grib_files()`: printout the pyaps3 version, to facilitate the debugging.

+ other minor bug fixes and comment update
   - `subset`: bugfix for the print out msg of `geo_box`
   - `objects.stack.ifgramStack.get_sequential_closure_phase()`: grab processor info from PROCESSOR, if mintpy.load.processor does not exist
   - `tests.smallbaselineApp`: use HyP3 instead of ASF HyP3.
   - `.circleci/config.yml`: add link in the comment for miniforge
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Jun 4, 2025

Reviewer's Guide

This PR strengthens the PyAPS integration by validating the ~/.cdsapirc URL format and reporting the PyAPS version during download, alongside minor bug fixes and doc updates in subset handling, stack processing, tests, and CI configuration.

File-Level Changes

Change Details Files
Enhance tropo_pyaps3 for account validation and version logging
  • Load and validate ~/.cdsapirc URL format against the latest CDS API, raising an error if mismatched
  • Update download message to include the PyAPS package version
src/mintpy/tropo_pyaps3.py
Adjust subset bounding box printout order
  • Remove premature print of geo_box
  • Move bounding-box display to after coordinate conversion
src/mintpy/subset.py
Add fallback to PROCESSOR metadata in stack closure phase
  • Retrieve processor from PROCESSOR key when mintpy.load.processor is absent
src/mintpy/objects/stack.py
Update processor label in smallbaselineApp test
  • Replace 'ASF HyP3' with 'HyP3' in test configuration
tests/smallbaselineApp.py
Document Miniforge install link in CI config
  • Append the Miniforge installation URL to the CI comment
.circleci/config.yml

Assessment against linked issues

Issue Objective Addressed Explanation
#1232 Enable subsetting files in radar coordinates using latitude and longitude coordinates in subset.py. The PR does not modify subset.py to support subsetting files in radar coordinates using lat/lon. The changes to subset.py are a minor bug fix for the print out message of geo_box.
#1232 Disable buffering for radar coordinate subsetting with lat/lon coordinates. The PR does not address the buffering issue mentioned in the issue. It focuses on other bug fixes and updates.
#1232 Improve the accuracy of subsetting by addressing potential issues with the buffer used in the process. The PR does not include any changes related to the buffer used during subsetting. The issue mentions a potential problem with the buffer, but the PR does not attempt to resolve it.

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

@yunjunz yunjunz requested a review from falkamelung June 4, 2025 14:20
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: 1 issue found
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟡 Complexity: 1 issue found
  • 🟢 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.

@yunjunz yunjunz merged commit ad9dcd1 into insarlab:main Jun 4, 2025
7 checks passed
@yunjunz yunjunz deleted the cdsapirc branch June 4, 2025 16:08
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Jun 10, 2025
+ tropo_pyaps3: fix a bug introduced by insarlab#1364

+ prep_aria: remove the print out msg for a more informative print out msg, which was duplicated.
yunjunz added a commit to yunjunz/MintPy that referenced this pull request Jun 10, 2025
+ objects.coord.coordinate._get_lookup_row_col(): if the given y/x_factor is too small, resulting in no overlap area, then iterate with larger y/x_factor values. This fixes the bug introduced in insarlab#1238, which reduced the default y/x_factor from 10 to 4.

+ tropo_pyaps3: fix a bug introduced by insarlab#1364

+ prep_aria: remove the print out msg for a more informative print out msg, which was duplicated.
@yunjunz yunjunz mentioned this pull request Jun 10, 2025
5 tasks
yunjunz added a commit that referenced this pull request Jun 10, 2025
+ `objects.coord.coordinate._get_lookup_row_col()`: if the given `y/x_factor` is too small, resulting in no overlap area, then iterate with larger `y/x_factor` values. This fixes the bug introduced in #1238, which reduced the default y/x_factor from 10 to 4.

+ `tropo_pyaps3`: fix a bug introduced by #1364, which did not specify the full path to the `~/.netrc` file.

+ `prep_aria`: remove the redundant print out msg for a nicer print out msg.
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.

Support of --lat --lon for subsetting files in radar coordinates

1 participant