Preload (FCI) filehandlers for eager processing #2686
CodeScene PR Check
❌ Code Health Quality Gates: FAILED
Change in average Code Health of affected files: -0.02 (7.79 -> 7.76)
- Declining Code Health: 4 findings(s) 🚩
- Improving Code Health: 2 findings(s) ✅
- Affected Hotspots: 3 files(s) 🔥
Details
🚩 Declining Code Health (highest to lowest):
- Lines of Code in a Single File init.py 🔥
- Excess Number of Function Arguments fci_l1c_nc.py: FCIL1cNCFileHandler.init 🔥
- Excess Number of Function Arguments test_utils.py: TestDistributed.test_get_serializable_dask_array
- Number of Functions in a Single Module test_yaml_reader.py
✅ Improving Code Health:
- Overall Code Complexity init.py 🔥
- Code Duplication test_netcdf_utils.py
Annotations
Check warning on line 1 in satpy/readers/__init__.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Lines of Code in a Single File
This module has 605 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/readers/__init__.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
✅ Getting better: Overall Code Complexity
The mean cyclomatic complexity decreases from 4.88 to 4.85, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
Check notice on line 1 in satpy/readers/yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1076 to 1186, 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/readers/yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Number of Functions in a Single Module
The number of functions increases from 102 to 111, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.
Check notice on line 1 in satpy/tests/test_yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 1066 to 1263, 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 warning on line 1 in satpy/tests/test_yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Number of Functions in a Single Module
This module has 79 functions, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.
Check notice on line 1708 in satpy/tests/test_yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
test_preloaded_instances_works has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 1734 in satpy/tests/test_yaml_reader.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
test_preloaded_instances_requirement has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check warning on line 215 in satpy/readers/fci_l1c_nc.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
FCIL1cNCFileHandler.__init__ has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.
Check notice on line 540 in satpy/readers/netcdf_utils.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ New issue: Excess Number of Function Arguments
PreloadableSegments.__init__ 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_netcdf_utils.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 notice on line 1 in satpy/tests/test_readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Lines of Code in a Single File
The lines of code increases from 848 to 879, 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/tests/test_readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Number of Functions in a Single Module
The number of functions increases from 99 to 100, threshold = 75. This file contains too many functions. Beyond a certain threshold, more functions lower the code health.
Check notice on line 1 in satpy/tests/test_readers.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
ℹ Getting worse: Low Cohesion
The number of different responsibilities increases from 52 to 53, 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 warning on line 572 in satpy/tests/reader_tests/test_utils.py
codescene-delta-analysis / CodeScene Cloud Delta Analysis (main)
❌ New issue: Excess Number of Function Arguments
TestDistributed.test_get_serializable_dask_array has 5 arguments, threshold = 4. This function has too many arguments, indicating a lack of encapsulation. Avoid adding more arguments.