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

2024 10 02 addcheck mandatory fk owner fk_operator fk_dataowner fk_provider fix missing references #163

Merged
merged 70 commits into from
Oct 10, 2024

Conversation

sjib
Copy link
Contributor

@sjib sjib commented Oct 3, 2024

Adds additional checks for references

  • fk_owner (only the ones that are MANDATORY)
  • fk_operator (only the ones that are MANDATORY)
  • fk_dataowner (all, as preparation for beeing MANDATORY in VSA-DSS / SIA405 Abwasser 2020.xx)
  • fk_provider (all, as preparation for beeing MANDATORY in VSA-DSS / SIA405 Abwasser 2020.xx)

Export will not be cancelled if fk_dataowner and fk_provider are missing, as we will get errors anyway (updated 4.10.2024)

@sjib sjib self-assigned this Oct 3, 2024
@sjib sjib added enhancement New feature or request Sustainability labels Oct 3, 2024
@sjib sjib changed the title 2024 10 02 addcheck mandatory fk owner fk provider 2024 10 02 addcheck mandatory fk owner fk_operator fk_dataowner fk_provider Oct 3, 2024
@sjib sjib requested a review from ponceta October 3, 2024 14:50
@sjib
Copy link
Contributor Author

sjib commented Oct 3, 2024

@ponceta Here my improvements. Does this fit your needs? And support the migration process?

@sjib
Copy link
Contributor Author

sjib commented Oct 3, 2024

Should support and solve QGEP/QGEP#871

@sjib
Copy link
Contributor Author

sjib commented Oct 3, 2024


19s
Run python -m unittest qgepqwat2ili.tests.test_$SUITE
  python -m unittest qgepqwat2ili.tests.test_$SUITE
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
    SUITE: qgep
    QGEPQWAT2ILI_TESTDB_IMAGE: postgis/postgis:12-3.0
    PGHOST: 127.0.0.1
    PGPORT: 5432
    PGDATABASE: qgep_prod
    PGUSER: postgres
    PGPASS: postgres
Get:1 http://security.debian.org/debian-security buster/updates InRelease [34.8 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [56.6 kB]
Get:4 http://security.debian.org/debian-security buster/updates/main amd64 Packages [610 kB]
Get:5 http://deb.debian.org/debian buster/main amd64 Packages [7,909 kB]
Ign:6 http://apt.postgresql.org/pub/repos/apt buster-pgdg InRelease
Get:7 http://deb.debian.org/debian buster-updates/main amd64 Packages [8,788 B]
Err:8 http://apt.postgresql.org/pub/repos/apt buster-pgdg Release
  404  Not Found [IP: 217.196.149.55 80]
Reading package lists...

I don't know why postgis 12-3.0 test are failing

@ponceta ponceta closed this Oct 4, 2024
@ponceta ponceta reopened this Oct 4, 2024
@sjib
Copy link
Contributor Author

sjib commented Oct 4, 2024

TypeError: 'bool' object is not callable 
Traceback (most recent call last):
  File "C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testing163neu2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\gui\__init__.py", line 490, in action_do_export
    check_fk_owner_null = check_fk_owner_null()
                          ^^^^^^^^^^^^^^^^^^^^^
TypeError: 'bool' object is not callable

@sjib sjib changed the title 2024 10 02 addcheck mandatory fk owner fk_operator fk_dataowner fk_provider 2024 10 02 addcheck mandatory fk owner fk_operator fk_dataowner fk_provider fix missing references Oct 4, 2024
@sjib
Copy link
Contributor Author

sjib commented Oct 4, 2024

should solve also QGEP/QGEP#872

@ponceta ponceta closed this Oct 10, 2024
@ponceta ponceta reopened this Oct 10, 2024
@sjib
Copy link
Contributor Author

sjib commented Oct 10, 2024

Testing export:

  • SIA405 Abwasser ok
  • VSA-DSS 2015 ok
  • VSA-KEK 2019 not ok - Model VSA_KEK_2019_LV95 requires column T_basket
2024-10-10T11:43:04        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:EXECUTING: "C:\Program Files\Eclipse Foundation\jre-11.0.12.7-hotspot\bin\java" -jar "C:\Users\Stefan\AppData\Roaming\QGIS\QGIS3\profiles\testing163neu2\python\plugins\QgisModelBaker\libs\modelbaker\iliwrapper\bin\ili2pg-5.1.0\ili2pg-5.1.0.jar" --schemaimport --dbhost "localhost" --dbport "5433" --dbusr "postgres" --dbpwd "sjib" --dbdatabase "qgep_plugin163_dm162neu2" --dbschema pg2ili_abwasser --setupPgExt --createGeomIdx --createFk --createFkIdx --createTidCol --importTid --noSmartMapping --defaultSrsCode 2056 --log "C:/Daten/QGEP/testing163neu2/20241010_qgep-export.xtf.241010114304.ili2pg-schemaimport.log" --nameLang de C:\Users/Stefan/AppData/Roaming/QGIS/QGIS3\profiles\testing163neu2/python/plugins\qgepplugin\qgepqwat2ili\qgepqwat2ili\ili\VSA_KEK_2019_2_d_LV95-20210120.ili
2024-10-10T11:43:07        qgepplugin.qgepqwat2ili.qgepqwat2ili.utils:Info: dburl 
             Info: dbusr 
             Info: ili2pg-5.1.0-58fc980cc6639b2c16a3cff8a0fa19ef1484b11c 
             Info: ili2c-5.4.0-91aba866d30f916433a776ce49d0b2e6d2883964 
             Info: iox-ili-1.22.0-0b7b9eae24ccb50d1b938cffdf2062748500c0c0 
             Info: java.version 11.0.12 
             Info: user.name 
             Info: maxMemory 4147200 KB 
             Info: currentTime 2024-10-10 11:43:05 
             Info: dbschema 
             Info: dburl 
             Info: dbusr 
             Info: databaseProduct 
             Info: databaseVersion 
             Info: driverName 
             Info: driverVersion 
             Info: postGISVersion 
             Info: max active DB statements 
             Info: compile models... 
             Info: lookup model 2.3 in repository 
             Info: lookup model 2.3 in repository 
             Info: lookup model 2.3 in repository 
             Info: lookup model 2.3 in repository 
             Info: ilifile 
             Info: ilifile 
             Info: ilifile 
             Info: ilifile 
             Info: ilifile 
             Model VSA_KEK_2019_LV95 requires column T_basket 

@sjib
Copy link
Contributor Author

sjib commented Oct 10, 2024

@ponceta Model VSA_KEK_2019_LV95 requires column T_basket - How far is the work of opengis on this?
#160
Will this replace your try? #138

@sjib
Copy link
Contributor Author

sjib commented Oct 10, 2024

qgepqwat2ili/utils/ili2db.py:472:9: F541 f-string is missing placeholders

@ponceta ponceta merged commit bb551e2 into master Oct 10, 2024
5 checks passed
@ponceta ponceta deleted the 2024-10-02-addcheck_mandatory_fk_owner_fk_provider branch October 10, 2024 13:37
@ponceta ponceta mentioned this pull request Oct 18, 2024
2 tasks
@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

Should support and solve QGEP/QGEP#889

@sjib
Copy link
Contributor Author

sjib commented Dec 20, 2024

Should also support and solve QGEP/QGEP#876

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Sustainability
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants