Change reader and component names from "VII" to "METimage" and fix minor issues #3395
CodeScene PR Check
Quality Gate Failed
Gates Failed
Enforce advisory code health rules
(1 file with Complex Method)
Gates Passed
3 Quality Gates Passed
See analysis details in CodeScene
Reason for failure
| Enforce advisory code health rules | Violations | Code Health Impact | |
|---|---|---|---|
| metimage_nc.py | 1 advisory rule | 9.51 → 9.49 | Suppress |
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
Details
🚩 Declining Code Health (highest to lowest):
- Complex Method metimage_nc.py: METimageNCBaseFileHandler.get_dataset
✅ Improving Code Health:
- Deep, Nested Complexity test_metimage_base_nc.py: TestViiNCBaseFileHandler.test_file_reading
- Large Method test_metimage_base_nc.py: TestViiNCBaseFileHandler.setUp
- Complex Method metimage_nc.py: ViiNCBaseFileHandler.get_dataset
- Bumpy Road Ahead metimage_nc.py: ViiNCBaseFileHandler.get_dataset
- Bumpy Road Ahead test_metimage_base_nc.py: TestViiNCBaseFileHandler.test_file_reading
Annotations
Check notice on line 1 in satpy/readers/core/metimage_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Complex Method
ViiNCBaseFileHandler.get_dataset 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 warning on line 119 in satpy/readers/core/metimage_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
❌ New issue: Complex Method
METimageNCBaseFileHandler.get_dataset has a cyclomatic complexity of 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 1 in satpy/readers/core/metimage_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Bumpy Road Ahead
ViiNCBaseFileHandler.get_dataset 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 notice on line 143 in satpy/tests/reader_tests/test_metimage_base_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Large Method
TestViiNCBaseFileHandler.setUp is no longer above the threshold for lines of code. 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 notice on line 195 in satpy/tests/reader_tests/test_metimage_base_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Bumpy Road Ahead
TestViiNCBaseFileHandler.test_file_reading 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 notice on line 195 in satpy/tests/reader_tests/test_metimage_base_nc.py
codescene-delta-analysis / CodeScene Code Health Review (main)
✅ No longer an issue: Deep, Nested Complexity
TestViiNCBaseFileHandler.test_file_reading is no longer above the threshold for nested complexity depth. This function contains deeply nested logic such as if statements and/or loops. The deeper the nesting, the lower the code health.