Skip to content

[com1] Add cfg override folder / expert configuration#1230

Merged
fso42 merged 6 commits intomasterfrom
overrideFolder2
Feb 3, 2026
Merged

[com1] Add cfg override folder / expert configuration#1230
fso42 merged 6 commits intomasterfrom
overrideFolder2

Conversation

@fso42
Copy link
Contributor

@fso42 fso42 commented Jan 23, 2026

  • Adds expert configuration override folder: New Inputs/CFGs/ directory in avalanche projects takes priority
    over local config files
  • Refactors cfgUtils.getModuleConfig(): Replaces positional parameters with explicit fileOverride and
    avalancheDir arguments
  • Removes deprecated functions: Eliminates rewriteLocalCfgs and _removeCfgItemsNotInOverride from cfgHandling
  • Removes checkCfgInfoType from com1DFA and redundant type checks

Documentation update follows in a separate PR.

@fso42 fso42 self-assigned this Jan 23, 2026
@fso42 fso42 added the enhancement New feature or request label Jan 23, 2026
@qltysh
Copy link
Contributor

qltysh bot commented Jan 23, 2026

❌ 1 blocking issue (5 total)

Tool Category Rule Count
black Style Incorrect formatting, autoformat by running qlty fmt. 1
qlty Duplication Found 55 lines of similar code in 2 locations (mass = 151) 2
qlty Structure Function with many returns (count = 7): getModuleConfig 1
qlty Structure Function with high complexity (count = 29): getModuleConfig 1

@qltysh one-click actions:

  • Auto-fix formatting (qlty fmt && git push)

@qltysh
Copy link
Contributor

qltysh bot commented Jan 23, 2026

Qlty

Coverage Impact

⬇️ Merging this pull request will decrease total coverage on master by 0.05%.

Modified Components (1)

RatingComponent% Diff
Coverage rating: C Coverage rating: C
com1DFA100.0%

Modified Files with Diff Coverage (10)

RatingFile% DiffUncovered Line #s
Coverage rating: C Coverage rating: C
avaframe/ana5Utils/DFAPathGeneration.py0.0%54-67
Coverage rating: B Coverage rating: B
avaframe/com1DFA/com1DFA.py100.0%
Coverage rating: B Coverage rating: B
avaframe/ana1Tests/simiSolTest.py100.0%
Coverage rating: A Coverage rating: A
avaframe/in3Utils/MoTUtils.py100.0%
Coverage rating: F Coverage rating: F
avaframe/com3Hybrid/com3Hybrid.py0.0%56-139
Coverage rating: C Coverage rating: C
avaframe/ana5Utils/distanceTimeAnalysis.py100.0%
Coverage rating: A Coverage rating: A
avaframe/in3Utils/cfgUtils.py93.8%176, 179
Coverage rating: F Coverage rating: F
avaframe/com6RockAvalanche/com6RockAvalanche.py0.0%32
Coverage rating: B Coverage rating: B
avaframe/com7Regional/com7Regional.py100.0%
Coverage rating: A Coverage rating: A
avaframe/com1DFA/com1DFATools.py100.0%
Total78.6%
🤖 Increase coverage with AI coding...

In the `overrideFolder2` branch, add test coverage for this new code:

- `avaframe/ana5Utils/DFAPathGeneration.py` -- Line 54-67
- `avaframe/com3Hybrid/com3Hybrid.py` -- Line 56-139
- `avaframe/com6RockAvalanche/com6RockAvalanche.py` -- Line 32
- `avaframe/in3Utils/cfgUtils.py` -- Lines 176 and 179

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@fso42 fso42 requested a review from awirb January 26, 2026 09:40
fso42 added 4 commits January 29, 2026 14:25
…verride` keyword argument

- Updated all `cfgUtils.getModuleConfig` calls to use the explicit `fileOverride` parameter
… calls

- Updated all instances of `cfgUtils.getModuleConfig` to include the `avalancheDir` parameter
…NotInOverride` functions along with associated tests
@fso42 fso42 requested a review from awirb January 30, 2026 10:58
fso42 added 2 commits February 3, 2026 10:03
…o` parameters from `getModuleConfig` calls

- Cleaned up calls to `cfgUtils.getModuleConfig` by removing redundant `fileOverride` and `modInfo` arguments across multiple scripts and modules.
- Addressed AW comments

fix(com1DFA): update module exclusion condition in `getModuleNames`

- Adjusted logic to exclude all modules under the `com1DFA` package using `startswith("avaframe.com1DFA")` instead of an exact match
…plify config handling

- Removed `checkCfgInfoType` from `com1DFATools.py` and related calls across `com1DFA` modules.
- Replaced redundant type checks with direct handling of `cfgInfo` as `ConfigParser`, `Path`, or string.
- Extennd `getModuleConfig to support `batchCfgDir` for directory-based batch processing.
- Updated related tests

refactor(tests, com1DFA,com3): simplify config handling and improve simulation calls

- Replaced redundant `fileOverride` usage in test configurations with direct `cfg` handling.
- Updated multiple test scripts to streamline `com1DFAMain` calls
- Adjusted hybrid module to directly modify config values, removing `ConfigUpdater` dependency.

refactor(com1DFA): improve code readability and fix logging messages; comments AW

- Introduced a deep copy for `com1DFA` configuration to prevent unintended mutations
- `getModuleConfig` priority documentation and logic handling
- Added warning for ignored friction calibration in expert mode
@fso42
Copy link
Contributor Author

fso42 commented Feb 3, 2026

Standardtests ident

@fso42 fso42 merged commit 075c6a2 into master Feb 3, 2026
4 checks passed
@fso42 fso42 deleted the overrideFolder2 branch February 3, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants