Add resolution-based chunking to ABI L1b reader #2621
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
- Declining Code Health: 2 findings(s) 🚩
- Improving Code Health: 3 findings(s) ✅
- Affected Hotspots: 1 files(s) 🔥
Recommended Review Level: Detailed -- Inspect the code that degrades in code health.
View detailed results in CodeScene
Details
🚩 Declining Code Health (highest to lowest):
- Lines of Code in a Single File utils.py 🔥
- Excess Number of Function Arguments test_abi_l1b.py: _create_reader_for_data
✅ Improving Code Health:
- Complex Method abi_base.py: NC_ABI_BASE._adjust_data
- Bumpy Road Ahead abi_base.py: NC_ABI_BASE._adjust_data
- Code Duplication test_abi_l1b.py
Annotations
Check notice on line 169 in satpy/readers/abi_base.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Complex Method
NC_ABI_BASE._adjust_data decreases in cyclomatic complexity from 14 to 13, threshold = 9. 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 169 in satpy/readers/abi_base.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Bumpy Road Ahead
NC_ABI_BASE._adjust_data decreases from 3 to 2 logical blocks with deeply nested code, threshold is one single block per function. 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 241 in satpy/tests/reader_tests/test_abi_l1b.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
_create_reader_for_data has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 1 in satpy/tests/reader_tests/test_abi_l1b.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ No longer an issue: Code Duplication
The module no longer contains too many functions with similar structure
Check warning on line 1 in satpy/utils.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 602 lines of code, improve code health by reducing it to 600. The number of Lines of Code in a single file. More Lines of Code lowers the code health.
Check notice on line 1 in satpy/utils.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Low Cohesion
The number of different responsibilities increases from 20 to 21, 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.