teksi / Home

TEKSI : open source management of public infrastructures
https://www.teksi.ch
GNU General Public License v3.0
2 stars 0 forks source link

Improve datamodel unitary tests for SWMM #76

Open sjib opened 1 year ago

sjib commented 1 year ago

Description

In https://github.com/QGEP/datamodel/blob/master/test/test_swmm.py, the tests are based on the number of object expected in the views. Once that the SWMM export will be more mature, the tests should rely on the number of objects in the main tables.

Exemple: If there are 5095 reaches in qgep_od.reach, there should be 5095 conduits in SWMM.

However, other relations might be less straightforward.

Even with the reaches the number of objects should differ eventually, as we dont need abandonded reaches in the SWMM model. In general, we should overthink the way we handle the statuses planned and current. Elements may be only current (statuses operational.tentative and operational.will_be_suspended), current and planned (operative), planned only (other.) or none of the above (inoperative, abandoned.)

Related issue: