Skip to content

[c2]: Add module c2TopRunDF - #52

Merged
fso42 merged 3 commits into
masterfrom
PS_topRunDF
Nov 6, 2026
Merged

fso42 merged 3 commits into
masterfrom
PS_topRunDF

Conversation

@PaulaSp3

@PaulaSp3 PaulaSp3 commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

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.

Documentation ends up here:
https://docs.debrisframe.org/en/ps_toprundf/installation.html

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

qltysh Bot commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

All good ✅

Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/testOutput.py Resolved
Comment thread debrisframe/c2TopRunDF/testOutput.py Resolved
Comment thread debrisframe/c2TopRunDF/testOutput.py Resolved
@qltysh

qltysh Bot commented Jan 28, 2026 •

Copy link
Copy Markdown
Contributor

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.

Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
@PaulaSp3 PaulaSp3 removed a link to an issue Jan 29, 2026
4 of 8 tasks
@PaulaSp3
PaulaSp3 requested a review from fso42 January 29, 2026 08:12
Comment thread debrisframe/c2TopRunDF/testClass.py Resolved
Comment thread debrisframe/c2TopRunDF/testRasterio.py Resolved
Comment thread debrisframe/tests/test_c2TopRunDF.py Resolved

@fso42 fso42 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please add an init.py in c2

Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread docs/source/installation.rst Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
@PaulaSp3
PaulaSp3 force-pushed the PS_topRunDF branch 2 times, most recently from 6974344 to 32cf3e2 Compare October 14, 2026 09:11
add computation

tidy up the code

tidy up

correct logger

use raster funtions from AvaFrame, still very slow

enable a faster simulation

add reference output from original pyTopRunDF and somple comparison test

Revert "enable a faster simulation"

This reverts commit a99540e.

Revert "use raster funtions from AvaFrame, still very slow"

This reverts commit 27bf58b.

try to use topRunDF modules from original repo

add c2TopRunDF to doc

update submodule

update ref data

update doc

random seed for reproducability

add author

add pytest to test if the output is the same as in the original script

delete simplle test scripts

for running pytest with submodule

fix import

fix paths; for QGIS connector

possibility for point as release

allow point as input iunstead of coordinates in ini file

only provide one point

next issue

delete temp folder first

comments FSO

adapt test

comment

Adjust docu

update docstring
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
Comment thread debrisframe/c2TopRunDF/c2TopRunDF.py Resolved
@PaulaSp3
PaulaSp3 requested a review from fso42 November 5, 2026 14:48
@fso42
fso42 merged commit a9b6321 into master Nov 6, 2026
4 checks passed
@fso42
fso42 deleted the PS_topRunDF branch November 6, 2026 06:58
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