Skip to content

[com1]: Add source line as start condition (initial)#1311

Open
PaulaSp3 wants to merge 3 commits into
masterfrom
PS_sourceLine
Open

[com1]: Add source line as start condition (initial)#1311
PaulaSp3 wants to merge 3 commits into
masterfrom
PS_sourceLine

Conversation

@PaulaSp3

@PaulaSp3 PaulaSp3 commented Jul 8, 2026

Copy link
Copy Markdown
Contributor
  • if the shp file in Inputs/REL is a line, in every cell along this line particles are initailized
    • with time dependent release
    • constant thickness ( in every timestep)
    • constant mass flow (in every timestep)

PR Checklist

Please confirm before requesting review:

  • I ran pytest locally without fails
  • I added/updated tests where needed
  • I updated documentation where needed

Confirm before the final merge/rebase into master

  • Commits are sensibly squashed and rebased onto latest master
  • Standardtest run without difference (with recompiled cython code)

@PaulaSp3 PaulaSp3 self-assigned this Jul 8, 2026
Comment thread avaframe/com1DFA/com1DFA.py Outdated
@qltysh

qltysh Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Analysis for project AvaFrame

❌ 2 blocking issues (3 total)

Tool Category Rule Count
ripgrep Lint # TODO: use this for sourceline? 1
ruff Lint Test for membership should be not in 1
qlty Structure Deeply nested control flow (level = 4) 1

Comment thread avaframe/com1DFA/com1DFA.py
Comment thread avaframe/com1DFA/com1DFA.py
Comment thread avaframe/com1DFA/com1DFA.py
releaseLine["thickness"] = "from raster"
log.info("Set %s for relThField" % relRasterPath)
# get line from release area polygon
# TODO: use this for sourceline?

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.

# TODO: use this for sourceline? [ripgrep:TODO]

else:
releaseLine["rasterData"] = (
releaseLine["cellsCrossed"].reshape(dem["header"]["nrows"], dem["header"]["ncols"])
* releaseLine["thickness"]

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.

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

not cfg.getboolean("iniStep")
and not cfg.getboolean("initialiseParticlesFromFile")
and len(relThField) == 0
and not releaseLine["shapeTypeName"] in ["POLYLINE", "POLYLINEZ"]

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.

Test for membership should be not in [ruff:E713]

Suggested change
and not releaseLine["shapeTypeName"] in ["POLYLINE", "POLYLINEZ"]
and releaseLine["shapeTypeName"] not in ["POLYLINE", "POLYLINEZ"]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant