Skip to content

Conversation

@PaulaSp3
Copy link
Contributor

@PaulaSp3 PaulaSp3 commented Jan 28, 2026

runC2TopRunDF.pyexecutes pyTopRunDF for one scenario.

The file TopRunDF.py is modified, batch_select_process.py is not used here (since a run of multiple scenarios is not enabled yet), the other files are directly used from the pyTopRunDF repository. The pyTopRunDF repository is integrated via a submodule into c2TopRunDF/pyTopRunDF, from where the original scripts are executed.

The modification of TopRunDF.py enables more consistency with the AvaFrame/DebrisFrame configuration and input handling:

  • a different handling with input parameters: we use an c2TopRunDFCfg.ini file instead of a .json file (including a different location!)
  • Input data (the DEM) is located in avalanchedir/Inputs, the avalanchedir is defined in debrisframe.ini (or local_debrisframe.ini) instead of Scenarios/Scenario_{num}
  • Output data are saved in avalanchedir/Outputs instead of Outputs/Scenario_{num}

Adding a global seed to the random functions yields the same result as that computed with the original code (with the same seed) for Scenario_1 (in pyTopRunDF repository.

@PaulaSp3 PaulaSp3 self-assigned this Jan 28, 2026
@PaulaSp3 PaulaSp3 linked an issue Jan 28, 2026 that may be closed by this pull request
7 tasks
@PaulaSp3 PaulaSp3 added the enhancement New feature or request label Jan 28, 2026
@qltysh
Copy link
Contributor

qltysh bot commented Jan 28, 2026

❌ 3 blocking issues (5 total)

Tool Category Rule Count
black Style Incorrect formatting, autoformat by running qlty fmt. 2
ruff Lint pytest imported but unused 1
qlty Structure Function with high complexity (count = 40): c2TopRunDFMain 1
qlty Structure Deeply nested control flow (level = 4) 1

@qltysh one-click actions:

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

area += 1
else:
mcs += 1
position = [row, col]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deeply nested control flow (level = 4) [qlty:nested-control-flow]


plotter = HillshadePlotter()

# Generate the plot
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Function with high complexity (count = 40): c2TopRunDFMain [qlty:function-complexity]

@qltysh
Copy link
Contributor

qltysh bot commented Jan 28, 2026

Qlty

Coverage Impact

This PR will not change total coverage.

Modified Files with Diff Coverage (1)

RatingFile% DiffUncovered Line #s
New file Coverage rating: A
debrisframe/tests/test_c2TopRunDF.py100.0%
Total100.0%
🚦 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.

@@ -0,0 +1,231 @@
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 2 issues:

1. Incorrect formatting, autoformat by running qlty fmt. [black:fmt]


2. Incorrect formatting, autoformat by running qlty fmt. [ruff:fmt]

@PaulaSp3 PaulaSp3 requested a review from fso42 January 29, 2026 08:12
import configparser
import pathlib
import shutil
import pytest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest imported but unused [ruff:F401]

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