Skip to content
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

tcoh_view: fix mintpy.utils.arg_utils import #101

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

Conversation

yunjunz
Copy link
Member

@yunjunz yunjunz commented Dec 12, 2024

This PR does the following:

  • fixes the mintpy.utils.arg_utils import error (tcoh_view.py not working #100) in tcoh.view.py
  • use the dynamic version badge in README.md, instead of manually updating it for each release

Summary by Sourcery

Fix the import error in 'tcoh_view.py' by using 'arg_utils' instead of 'arg_group' for function calls, and update the version badge in 'README.md' to dynamically display the latest release version.

Bug Fixes:

  • Fix the import error of 'mintpy.utils.arg_utils' in 'tcoh_view.py' by replacing 'arg_group' with 'arg_utils' for function calls.

Enhancements:

  • Update the version badge in 'README.md' to dynamically reflect the latest release version from GitHub.

Copy link

sourcery-ai bot commented Dec 12, 2024

Reviewer's Guide by Sourcery

This PR addresses an import error by updating the module references from arg_group to arg_utils in the argument parser setup, and implements a dynamic version badge in the README instead of a static one.

Class diagram for updated argument parser setup

classDiagram
    class ArgUtils {
        +add_timefunc_argument(parser)
        +add_data_disp_argument(parser)
        +add_dem_argument(parser)
        +add_figure_argument(parser)
        +add_gps_argument(parser)
        +add_mask_argument(parser)
        +add_map_argument(parser)
        +add_memory_argument(parser)
        +add_reference_argument(parser)
        +add_save_argument(parser)
        +add_subset_argument(parser)
    }

    class TcohView {
        +create_parser()
    }

    TcohView --> ArgUtils : uses
    note for ArgUtils "Methods previously accessed via arg_group are now accessed via arg_utils"
Loading

File-Level Changes

Change Details Files
Update argument parser utility imports and references
  • Replace all arg_group references with arg_utils
  • Update multiple argument parser function calls to use the correct module
src/miaplpy/tcoh_view.py
Implement dynamic version badge in documentation
  • Replace static version badge with dynamic GitHub release version badge
docs/README.md
Code formatting improvements
  • Remove trailing whitespace
src/miaplpy/prep_slc_isce.py

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.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a 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. You can also use
    this command to specify where the summary should be inserted.

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

@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: 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.

src/miaplpy/prep_slc_isce.py Show resolved Hide resolved
@yunjunz yunjunz linked an issue Dec 12, 2024 that may be closed by this pull request
Copy link

codeautopilot bot commented Dec 15, 2024

PR summary

This Pull Request addresses two main issues: it fixes an import error in the tcoh_view.py file by correctly importing arg_utils from mintpy.utils, and it updates the README.md to use a dynamic version badge, which automatically reflects the latest release version. The import fix resolves a specific error (#100) that likely prevented the script from running correctly, while the dynamic badge ensures that the documentation remains up-to-date without manual intervention.

Suggestion

Consider adding a test case to verify that the import issue is resolved and that the tcoh_view.py script functions as expected. This could help prevent similar issues in the future and ensure that the fix is robust. Additionally, ensure that any dependencies or requirements are updated to reflect the changes in import paths.

Disclaimer: This comment was entirely generated using AI. Be aware that the information provided may be incorrect.

Current plan usage: 0.00%

Have feedback or need help?
Discord
Documentation
[email protected]

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.

tcoh_view.py not working
1 participant