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

Make caching warn if some of the args are unhashable #2585

Merged
merged 7 commits into from
Nov 15, 2023

Issue warning for caching only when caching is requested

aaec89a
Select commit
Loading
Failed to load commit list.
Merged

Make caching warn if some of the args are unhashable #2585

Issue warning for caching only when caching is requested
aaec89a
Select commit
Loading
Failed to load commit list.
This check has been archived and is scheduled for deletion. Learn more about checks retention
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) succeeded Oct 11, 2023 in 49s

CodeScene PR Check

Quality Gates: OK

  • Declining Code Health: 1 findings(s) 🚩
  • Improving Code Health: 2 findings(s) ✅
  • Affected Hotspots: 0 files(s) 🔥

Recommended Review Level: Lightweight sanity check
View detailed results in CodeScene

Details

🚩 Negative Code Health Impact (highest to lowest):

  • Code Duplication test_angles.py

✅ Positive Code Health Impact (highest to lowest):

  • Complex Method angles.py: ZarrCacheHelper.call
  • Bumpy Road Ahead angles.py: ZarrCacheHelper.call

Annotations

Check notice on line 170 in satpy/modifiers/angles.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Complex Method

ZarrCacheHelper.__call__ is no longer above the threshold for cyclomatic complexity

Check notice on line 170 in satpy/modifiers/angles.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

✅ No longer an issue: Bumpy Road Ahead

ZarrCacheHelper.__call__ is no longer above the threshold for logical blocks with deeply nested code

Check warning on line 335 in satpy/tests/modifier_tests/test_angles.py

See this annotation in the file changed.

@codescene-delta-analysis codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)

❌ New issue: Code Duplication

The module contains 4 functions with similar structure: TestAngleGeneration.test_cached_no_chunks_fails,TestAngleGeneration.test_cached_result_numpy_fails,TestAngleGeneration.test_caching_with_array_in_args_does_not_warn_when_caching_is_not_enabled,TestAngleGeneration.test_caching_with_array_in_args_warns. Avoid duplicated, aka copy-pasted, code inside the module. More duplication lowers the code health.