Skip to content

2025 01 16 adapt swmm code#534

Merged
ponceta merged 26 commits intomainfrom
2025-01-16-adapt-swmm-code
Aug 11, 2025
Merged

2025 01 16 adapt swmm code#534
ponceta merged 26 commits intomainfrom
2025-01-16-adapt-swmm-code

Conversation

@sjib
Copy link
Copy Markdown
Contributor

@sjib sjib commented Jan 16, 2025

General

  • Fix a bug
  • Add a feature
  • Maintenance / sustainability
  • Add Documentation

Describe your changes

  • Alter swmm files to work with new TEKSI wastewater module
  • Alter swmm QGIS projects

Screenshots

Issue ticket number and link

Checklist before requesting a review

  • I have performed a self-review of my code
  • If it is a core feature, I have added thorough tests.
  • CI Tests are green
  • The documentation is up to date with the proposed change.
  • My work is ready for review

Checklist before merge

  • A review has been performed
  • Comments are resolved
  • Documentation is ready

@sjib sjib added the fix Fixing something not working label Jan 16, 2025
@sjib sjib requested a review from cymed January 16, 2025 15:56
@sjib sjib self-assigned this Jan 16, 2025
@sjib sjib requested a review from tproduit January 16, 2025 15:58
@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 16, 2025

Should solve #532

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 16, 2025

to do:

  • Adapt swmm_full_report.qgs
  • Adapt swmm_summary.qgs

Do not fit new tww yet

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 16, 2025

Seems to work now:
`QGIS-Version: 3.34.8-Prizren
QGIS-Codeversion: 91642333
Qt-Version: 5.15.13
Python-Version: 3.12.4
GDAL-Version: 3.9.0
GEOS-Version: 3.12.2-CAPI-1.18.2
PROJ-Version: Rel. 9.4.0, March 1st, 2024
PDAL-Version: 2.6.3 (git-version: b5523a)
Algorithmus gestartet um: 2025-01-16T17:18:07
Algorithmus SWMM Create Input startet…
Eingabeparameter:
{ 'DATABASE' : 'pg_tww', 'INP_FILE' : 'C:/Users/Stefan/Desktop/tww_swmm_test.inp', 'ONLY_SELECTED' : False, 'STATE' : 0, 'TEMPLATE_INP_FILE' : 'C:\Daten\QGEP\github\wastewater\plugin\teksi_wastewater\swmm_templates\default_teksi_swmm_parameters.inp' }

There is no FILES in the template file
There is no EVENTS in the template file
There is no HYDROGRAPHS in the template file
There is no TEMPERATURE in the template file
Process vw_RAINGAGES
Process vw_SYMBOLS
Process vw_SUBCATCHMENTS
Process vw_SUBAREAS
Process vw_AQUIFERS
Process vw_INFILTRATION
Process vw_POLYGONS
There is no GROUNDWATER in the template file
There is no SNOWPACKS in the template file
There is no HYDROGAPHS in the template file
There is no LID_CONTROLS in the template file
There is no LID_USAGE in the template file
Process vw_JUNCTIONS
Process vw_OUTFALLS
Process vw_STORAGES
Process vw_COORDINATES
Process vw_DWF
Process vw_DIVIDERS
Process vw_CONDUITS
Process vw_LOSSES
Process vw_PUMPS
Process vw_ORIFICES
Process vw_WEIRS
Leaping weirs are not supported by SWMM, ch080qwzLW001275see: https://swmm5.org/2013/07/19/leaping-weir-example-in-swmm-5-and-infoswmm-alternative/
Process vw_XSECTIONS
Process vw_LOSSES
Process vw_OUTLETS
Process vw_VERTICES
There is no TRANSECTS in the template file
There is no CONTROLS in the template file
Process vw_LANDUSES
Process vw_COVERAGES
There is no POLLUTANTS in the template file
There is no BUILDUP in the template file
There is no WASHOFF in the template file
There is no TREATMENT in the template file
There is no RDII in the template file
There is no LOADINGS in the template file
Process vw_CURVES
There is no LABELS in the template file
Process vw_TAGS
Execution completed in 0.50 Sekunden
Ergebnisse:
{'INP_FILE': 'C:/Users/Stefan/Desktop/tww_swmm_test.inp'}

Lade Ergebnis Layer
Algorithmus 'SWMM Create Input' beendet`

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 16, 2025

@tproduit Did you adapt the two sample qgs already so that they could be updated also? Or should we make a separate issue for that?

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 16, 2025

@cymed Is there any change needed with the tww_cfg schema - see #522

Adapt swmm_full_report.qgs to TWW
 Adapt swmm_summary.qgs to TWW
@cymed
Copy link
Copy Markdown
Contributor

cymed commented Jan 20, 2025

@cymed Is there any change needed with the tww_cfg schema - see #522

I would personally move the tww_cfg tables to tww_od

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 24, 2025

@cymed Is there any change needed with the tww_cfg schema - see #522

I would personally move the tww_cfg tables to tww_od

Let's solve this in this issue: #522

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jan 24, 2025

@tproduit Did you adapt the two sample qgs already so that they could be updated also? Or should we make a separate issue for that?

thanks @ponceta for the adaptions.
@tproduit Can you check if this is how we had it? And then add a review?

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Mar 3, 2025

@cymed move tww_cfg to tww_od for friction

@cymed
Copy link
Copy Markdown
Contributor

cymed commented Mar 5, 2025

Fixes #522

@cymed
Copy link
Copy Markdown
Contributor

cymed commented Mar 5, 2025

TODO (in general): include deltas in generation of dumps

@cymed
Copy link
Copy Markdown
Contributor

cymed commented Jun 30, 2025

Move to od

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jul 7, 2025

________________________ TestSchemas.test_list_schemas _________________________

self = <datamodel.test.test_schemas.TestSchemas testMethod=test_list_schemas>

    def test_list_schemas(self):
        schemas = ", ".join([f"'{schema}'" for schema in TWW_SCHEMAS + PG_SCHEMAS + ILI_SCHEMAS])
        list_schemas = f"SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ({schemas});"
>       self.check_empty(list_schemas)

datamodel/test/test_schemas.py:29: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
datamodel/test/utils.py:49: in check_empty
    self.assertIsNone(cur.fetchone())
E   AssertionError: ('tww_cfg',) is not None
=========================== short test summary info ============================
FAILED datamodel/test/test_schemas.py::TestSchemas::test_list_schemas - AssertionError: ('tww_cfg',) is not None

@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Jul 7, 2025

@cymed / @ponceta From what I understood today I should not adapt any code in wastewater\datamodel\changelogs\2025.0.1 - so can we adapt the test above to run only after it has applied the delta from changelogs\2025.0.2

Or how to deal with that?

Comment thread datamodel/scripts/pum_version.txt Outdated
Comment thread datamodel/scripts/setup.sh Outdated
Comment thread datamodel/update/delta_2025.0.1_remove_tww_cfg.sql
Comment thread plugin/teksi_wastewater/processing_provider/swmm_create_input.py Outdated
@sjib sjib requested a review from cymed July 8, 2025 12:28
Comment thread datamodel/scripts/pum_version.txt Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_execute.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_execute.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_extract_results.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_extract_results.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_import_results.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_import_results.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_set_friction.py Outdated
Comment thread plugin/teksi_wastewater/processing_provider/swmm_set_friction.py Outdated
@sjib
Copy link
Copy Markdown
Contributor Author

sjib commented Aug 8, 2025

@cymed You're review comments have been integrated

@cymed cymed self-requested a review August 8, 2025 08:14
@ponceta ponceta merged commit 990d63e into main Aug 11, 2025
14 checks passed
@ponceta ponceta deleted the 2025-01-16-adapt-swmm-code branch August 11, 2025 14:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Fixing something not working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants