Skip to content

Conversation

@fso42
Copy link
Contributor

@fso42 fso42 commented Dec 23, 2025

Currently, simulation names follow the format:

relNameSim_simHash_defID_frictIndi_simType_modelType

This format lacks information about which computational module generated the simulation, making it difficult to:

  • Track simulations across multiple computational modules
  • Distinguish simulations from different modules with identical parameters
  • Support multi-module workflows and comparisons

New Format

Add modName as the third component:

relNameSim_simHash_modName_defID_frictIndi_simType_modelType

Example:

  • Old: release1_a1b2c3_C_S_ent_dfa
  • New: release1_a1b2c3_com1DFA_C_S_ent_dfa

Backward Compatibility

Implement a centralized parser that:

  • Automatically detects old vs new format
  • Returns structured dictionary instead of position-based arrays
  • Provides sensible defaults for missing components
  • Handles both simName and full filenames (with resType/timeStep)

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

qltysh bot commented Dec 23, 2025

Qlty

Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 0.11%.

Modified Components (1)

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

Modified Files with Diff Coverage (7)

RatingFile% DiffUncovered Line #s
Coverage rating: D Coverage rating: D
avaframe/ana5Utils/DFAPathGeneration.py0.0%693
Coverage rating: B Coverage rating: B
avaframe/com1DFA/com1DFA.py100.0%
Coverage rating: B Coverage rating: B
avaframe/in3Utils/fileHandlerUtils.py100.0%
Coverage rating: B Coverage rating: B
avaframe/ana3AIMEC/dfa2Aimec.py100.0%
Coverage rating: A Coverage rating: A
avaframe/in3Utils/cfgUtils.py100.0%
Coverage rating: F Coverage rating: F
avaframe/ana1Tests/rotationTest.py0.0%14-123
Coverage rating: B Coverage rating: B
avaframe/log2Report/generateReport.py100.0%
Total95.9%
🤖 Increase coverage with AI coding...

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

- `avaframe/ana1Tests/rotationTest.py` -- Line 14-123
- `avaframe/ana5Utils/DFAPathGeneration.py` -- Line 693

🚦 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.

…imName`

- Integrated `cfgUtils.parseSimName` to simplify extraction of simulation components across old and new formats.
- Unified reconstruction logic for `simName` using parsed components and removed redundant conditions.
- Updated corresponding logic in dataframe population to use parsed results for consistency.
- Added extensive unit tests in `cfgUtils` to validate `parseSimName` functionality across different naming conventions and edge cases.
- Minor refactors in test cases and `com1DFA` to align with new parsing logic.

refactor(cfgUtils): streamline `parseSimName` to extract short module names

- Updated `parseSimName` to extract short module names (e.g., "com1" instead of "com1DFA").
- Refactored multiple files to consistently use parsed components, replacing manual string parsing.
- Modified tests to cover enhanced `parseSimName` behavior, removing dependency on legacy module patterns.
…odule name addition

- Updated `cfgUtils` docstring with details about new and old simulation name formats, including components and structure.
- Revised `com1DFA` documentation to reflect the addition of the short module name (`com1`) to simulation names
- Noted backward compatibility with older naming conventions.

refactor(fileHandlerUtils): replace `parsed` with `simNameParts`

- Renamed variable `parsed` to `simNameParts`

refactor(dfa2Aimec): simplify mass balance file sorting with lambda function
@fso42 fso42 requested a review from awirb December 23, 2025 11:00
@fso42 fso42 linked an issue Dec 23, 2025 that may be closed by this pull request
8 tasks
@qltysh
Copy link
Contributor

qltysh bot commented Dec 23, 2025

1 new issue

Tool Category Rule Count
qlty Structure Function with high complexity (count = 13): parseSimName 1

- Adjusted simulation name structure in docstrings and parsing logic
- Updated examples for old and new formats to remove redundant brackets around `defID`.
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.

Breaking Change: Adding Module Name to SimName Breaks Parsing Logic

3 participants