Skip to content

Split remaining ValueError test in two

d619238
Select commit
Loading
Failed to load commit list.
Open

Track and write measurement time for area #3168

Split remaining ValueError test in two
d619238
Select commit
Loading
Failed to load commit list.
CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (main) failed Aug 5, 2025 in 2m 17s

CodeScene PR Check

Quality Gate Failed

Code Health Improved (1 files improve in Code Health)

Gates Failed
Enforce critical code health rules (1 file with Low Cohesion)
Enforce advisory code health rules (3 files with Large Method, Complex Method, Excess Number of Function Arguments)

Gates Passed
2 Quality Gates Passed

See analysis details in CodeScene

Reason for failure
Enforce critical code health rules Violations Code Health Impact
test_resample.py 1 critical rule 8.82 → 7.11 Suppress
Enforce advisory code health rules Violations Code Health Impact
simple_image.py 1 advisory rule 10.00 → 9.69 Suppress
ninjogeotiff.py 1 advisory rule 8.65 → 8.61 Suppress
geotiff.py 1 advisory rule 8.68 → 8.66 Suppress
View Improvements
File Code Health Impact Categories Improved
scene.py 6.96 → 7.26 Complex Method, Bumpy Road Ahead

Quality Gate Profile: Clean Code Collective
Want more control? Customize Code Health rules or catch issues early with our IDE extension and CLI tool.

Details

🚩 Declining Code Health (highest to lowest):

  • Low Cohesion test_resample.py
  • Complex Method geotiff.py: GeoTIFFWriter.save_image
  • Large Method ninjogeotiff.py: NinJoGeoTIFFWriter.save_image
  • Excess Number of Function Arguments simple_image.py: PillowWriter.save_image

✅ Improving Code Health:

  • Complex Method scene.py: Scene._resampled_scene 🔥
  • Bumpy Road Ahead scene.py: Scene._resampled_scene 🔥

Annotations

Check warning on line 1 in satpy/tests/test_resample.py

See this annotation in the file changed.

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

❌ New issue: Low Cohesion

This module has at least 16 different responsibilities amongst its 37 functions, threshold = 4. Cohesion is calculated using the LCOM4 metric. Low cohesion means that the module/class has multiple unrelated responsibilities, doing too many things and breaking the Single Responsibility Principle.

Check notice on line 1 in satpy/scene.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

Scene._resampled_scene is no longer above the threshold for cyclomatic complexity. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check notice on line 1 in satpy/scene.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

Scene._resampled_scene is no longer above the threshold for logical blocks with deeply nested code. The Bumpy Road code smell is a function that contains multiple chunks of nested conditional logic. The deeper the nesting and the more bumps, the lower the code health.

Check warning on line 183 in satpy/writers/ninjogeotiff.py

See this annotation in the file changed.

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

❌ Getting worse: Large Method

NinJoGeoTIFFWriter.save_image increases from 90 to 97 lines of code, threshold = 70. Large functions with many lines of code are generally harder to understand and lower the code health. Avoid adding more lines to this function.

Check warning on line 249 in satpy/writers/geotiff.py

See this annotation in the file changed.

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

❌ Getting worse: Complex Method

GeoTIFFWriter.save_image already has high cyclomatic complexity, and now it increases in Lines of Code from 138 to 143. This function has many conditional statements (e.g. if, for, while), leading to lower code health. Avoid adding more conditionals and code to it without refactoring.

Check warning on line 69 in satpy/writers/simple_image.py

See this annotation in the file changed.

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

❌ New issue: Excess Number of Function Arguments

PillowWriter.save_image has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.