Skip to content

upgrade to mypy action v0.15.0#307

Merged
jtherrmann merged 2 commits intodevelopfrom
update-mypy-options
Jan 18, 2025
Merged

upgrade to mypy action v0.15.0#307
jtherrmann merged 2 commits intodevelopfrom
update-mypy-options

Conversation

@jtherrmann
Copy link
Copy Markdown
Contributor

@jtherrmann jtherrmann commented Jan 18, 2025

mypy can't find several libraries:

src/hyp3_autorift/s1_isce2.py:36: error: Cannot find implementation or library stub for module named "topsApp"  [import-not-found]
        from topsApp import TopsInSAR
    ^
src/hyp3_autorift/s1_isce2.py:441: error: Cannot find implementation or library stub for module named "contrib.geo_autoRIFT.geogrid"  [import-not-found]
        from contrib.geo_autoRIFT.geogrid import Geogrid
    ^
src/hyp3_autorift/s1_isce2.py:442: error: Cannot find implementation or library stub for module named "isceobj.Orbit.Orbit"  [import-not-found]
        from isceobj.Orbit.Orbit import Orbit
    ^
src/hyp3_autorift/s1_isce2.py:443: error: Cannot find implementation or library stub for module named "isceobj.Sensor.TOPS.Sentinel1"  [import-not-found]
        from isceobj.Sensor.TOPS.Sentinel1 import Sentinel1
    ^
src/hyp3_autorift/s1_isce2.py:443: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
src/hyp3_autorift/s1_isce2.py:504: error: Cannot find implementation or library stub for module named "isceobj"  [import-not-found]
        import isceobj
    ^
src/hyp3_autorift/s1_isce2.py:505: error: Cannot find implementation or library stub for module named "contrib.demUtils"  [import-not-found]
        from contrib.demUtils import createDemStitcher
    ^
Found 6 errors in 1 file (checked 17 source files)

I also can't execute these imports within the mamba environment. How are those libraries installed?


call-mypy-workflow:
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@v0.15.0

Check warning

Code scanning / CodeQL

Workflow does not contain permissions

Actions Job or Workflow does not set permissions
@jhkennedy
Copy link
Copy Markdown
Contributor

jhkennedy commented Jan 18, 2025

@jtherrmann it's because ISCE2 blows up it's namespace:

https://github.com/isce-framework/isce2/blob/main/__init__.py#L41

You need to import isce before these can be imported.

I would have expected this in hyp3-isce2 as well, did you encounter it there at all?

@jhkennedy
Copy link
Copy Markdown
Contributor

We're working to depreciate and remove ISCE2, so you could probably just ignore s1_isce2.py entirely.

@jtherrmann
Copy link
Copy Markdown
Contributor Author

@jhkennedy Got it, thanks! Yeah, I see similar errors in hyp3-isce2

@jtherrmann jtherrmann marked this pull request as ready for review January 18, 2025 01:44
@jtherrmann jtherrmann requested a review from a team January 18, 2025 01:44
@jtherrmann jtherrmann added the bumpless Changes to documentation, CI/CD pipelines, etc that don't affect the project's version label Jan 18, 2025
Copy link
Copy Markdown
Contributor

@jhkennedy jhkennedy left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@jtherrmann jtherrmann merged commit 2457c12 into develop Jan 18, 2025
@jtherrmann jtherrmann deleted the update-mypy-options branch January 18, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bumpless Changes to documentation, CI/CD pipelines, etc that don't affect the project's version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants