Describe the Code Quality Issue
The definition of the global input singleton PARAM (module_parameter/) currently lives inside source_io, yet it is included by nearly every module:
Directory including module_parameter/parameter.h |
Files |
source_lcao |
105 |
source_io |
77 |
source_pw |
53 |
source_estate |
48 |
source_cell |
36 |
source_hsolver |
23 |
source_relax |
18 |
source_esolver |
14 |
source_hamilt |
14 |
source_md |
12 |
source_psi |
12 |
source_main |
3 |
Consequence: this single fact pins source_io to the very bottom ("depended on by everyone"). Yet io itself must also write dos/wannier/cube (which requires seeing high-level data), so io straddles L0↔L8 and becomes an unbreakable "god module".
Additional Context
It seems that a CI test has been added to block this problem from worsening. But this is still a huge problem in code quality.
Task list for Issue attackers (only for developers)
Describe the Code Quality Issue
The definition of the global input singleton
PARAM(module_parameter/) currently lives insidesource_io, yet it is included by nearly every module:module_parameter/parameter.hsource_lcaosource_iosource_pwsource_estatesource_cellsource_hsolversource_relaxsource_esolversource_hamiltsource_mdsource_psisource_mainConsequence: this single fact pins
source_ioto the very bottom ("depended on by everyone"). Yet io itself must also write dos/wannier/cube (which requires seeing high-level data), so io straddles L0↔L8 and becomes an unbreakable "god module".Additional Context
It seems that a CI test has been added to block this problem from worsening. But this is still a huge problem in code quality.
Task list for Issue attackers (only for developers)