Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing concentration tables in QGIS. #1839

Merged
merged 1 commit into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
58 changes: 58 additions & 0 deletions ribasim_qgis/core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,64 @@
]


class BasinConcentrationExternal(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration_external"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

Check warning on line 367 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L367

Added line #L367 was not covered by tests

@classmethod
def attributes(cls) -> list[QgsField]:
return [

Check warning on line 371 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L371

Added line #L371 was not covered by tests
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("concentration", QVariant.Double),
]


class BasinConcentrationState(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration_state"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

Check warning on line 386 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L386

Added line #L386 was not covered by tests

@classmethod
def attributes(cls) -> list[QgsField]:
return [

Check warning on line 390 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L390

Added line #L390 was not covered by tests
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("concentration", QVariant.Double),
]


class BasinConcentration(Input):
@classmethod
def input_type(cls) -> str:
return "Basin / concentration"

@classmethod
def geometry_type(cls) -> str:
return "No Geometry"

Check warning on line 405 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L405

Added line #L405 was not covered by tests

@classmethod
def attributes(cls) -> list[QgsField]:
return [

Check warning on line 409 in ribasim_qgis/core/nodes.py

View check run for this annotation

Codecov / codecov/patch

ribasim_qgis/core/nodes.py#L409

Added line #L409 was not covered by tests
QgsField("time", QVariant.DateTime),
QgsField("node_id", QVariant.Int),
QgsField("substance", QVariant.String),
QgsField("drainage", QVariant.Double),
QgsField("precipitation", QVariant.Double),
]


class BasinSubgridLevel(Input):
@classmethod
def input_type(cls) -> str:
Expand Down