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

upgrade to mypy action v0.15.0 #307

Merged
merged 2 commits into from
Jan 18, 2025
Merged

upgrade to mypy action v0.15.0 #307

merged 2 commits into from
Jan 18, 2025

Conversation

jtherrmann
Copy link
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?

.github/workflows/static-analysis.yml Dismissed Show dismissed Hide dismissed
@jhkennedy
Copy link
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
Contributor

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

@jtherrmann
Copy link
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
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
10 of 11 checks passed
@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.

2 participants