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

jth mypy changes #258

Merged
merged 4 commits into from
Jan 7, 2025
Merged

jth mypy changes #258

merged 4 commits into from
Jan 7, 2025

Conversation

jtherrmann
Copy link
Contributor

@jtherrmann jtherrmann commented Jan 6, 2025

Changes:

  • Downgrade some of our reusable actions from v0.14.0 (not yet released)
  • Remove some unnecessary str() casts (I confirmed with reveal_type that mypy already correctly infers those types as str)
  • Change some usages of AttributeError to ValueError, because AttributeError specifically refers to Python object attributes, which isn't how we're using exceptions in this case.

Copy link
Contributor

github-actions bot commented Jan 6, 2025

Coverage

Coverage Report
FileStmtsMissCoverMissing
/home/runner/micromamba/envs/hyp3-isce2/lib/python3.11/site-packages/hyp3_isce2
   __main__.py26292%41, 55
   burst.py2635778%95, 105, 118–121, 134–139, 153–166, 184–191, 209–219, 287, 335–343, 363–377, 597–599, 625
   dem.py53394%103–112
   insar_stripmap.py755033%37–100, 104–106, 120–137
   insar_tops.py825533%52–117, 147–200, 225–243
   insar_tops_burst.py1359827%66–152, 163–217, 229–251, 255–257, 288–320
   logger.py4175%9
   merge_tops_bursts.py6319685%186, 203, 272, 278, 335, 351, 359, 394, 398, 486, 513, 591, 631–654, 702–717, 741, 746, 805, 834, 978, 1161–1181, 1200–1217, 1240–1273, 1284–1292, 1302–1322, 1326
   packaging.py19914826%45–47, 73–97, 145–243, 262–278, 297–307, 319–347, 359–361, 390–479, 483–489
   s1_auxcal.py21290%51, 59
   slc.py492353%23–30, 34–39, 50–62
   stripmapapp_alos.py50786%103, 144, 147–152
   topsapp.py71889%79, 109, 131–137
   utils.py1921095%108–119, 124, 202, 224–226, 233, 390, 435
   water_mask.py59592%94, 106–109
TOTAL193156571% 

Tests Skipped Failures Errors Time
81 0 💤 0 ❌ 0 🔥 31.646s ⏱️

@jtherrmann jtherrmann changed the title static analysis action versions jth mypy changes Jan 6, 2025
@jtherrmann jtherrmann marked this pull request as ready for review January 6, 2025 23:56
@jtherrmann jtherrmann requested a review from a team January 6, 2025 23:56
Comment on lines 5 to +17
jobs:
call-secrets-analysis-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-secrets-analysis.yml@v0.13.2

call-ruff-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.14.0
uses: ASFHyP3/actions/.github/workflows/reusable-ruff.yml@v0.13.2

call-mypy-workflow:
# Docs: https://github.com/ASFHyP3/actions
uses: ASFHyP3/actions/.github/workflows/[email protected]
# TODO: update version tag after actions release
uses: ASFHyP3/actions/.github/workflows/reusable-mypy.yml@develop
Copy link
Contributor

Choose a reason for hiding this comment

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

These will all be 14.0 after the release right? We have to do the actions release first anyway.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, but I wanted those workflows (especially the mypy workflow) to run on our hyp3-isce2 PRs so I could make sure I wasn't breaking anything. But, I'd be fine with reverting this change after we do the actions release.

@jtherrmann jtherrmann merged commit e17d644 into add-mypy Jan 7, 2025
4 checks passed
@jtherrmann jtherrmann deleted the jth-mypy branch January 7, 2025 18:28
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.

2 participants