Skip to main content

Importer and Exporter for GWSW

Project description

A library for the GWSW-hydx exchange format

RioNED is going to release a new format for exchanging sewerage data called GWSW-hydx. This tool could be used to exchange sewerage data from and to a hydx format (*.csv).

For more information about GWSW-hydx: https://apps.gwsw.nl/item_definition

For more information about the database scheme of 3Di: https://docs.3di.lizard.net/en/stable/d_before_you_begin.html#database-overview

Purporse of this script is to exchange information between different formats. This means that this library doesn’t improve lacking or incorrect data. For example, it doesn’t remove double manholes on the same location. This libary does provide all kinds of checks with warning and error messages.

This tool is currently in development. Therefore only nodes, weirs, orifices and pumpstations are currently supported.

Installation

We’re installed with:

$ pip install hydxlib

Running script

It’s possible to run this tool on command line or with python

Commandline:

$ hydxlib --import_type hydx --export_type threedi etc.

Python:

from hydxlib import run_import_export, write_logging_to_file

log_relpath = os.path.join(os.path.abspath(options.hydx_path),
                           "import_hydx_hydxlib.log")
write_logging_to_file(hydx_path)
run_import_export(import_type, export_type, hydx_path, threedi_db_settings)

Installation for development

We’re installed with pipenv, a handy wrapper around pip and virtualenv. Install that first with pip install pipenv. Then run on Linux:

$ PIPENV_VENV_IN_PROJECT=1 pipenv --three
$ pipenv install --dev

on Windows:

$ set PIPENV_VENV_IN_PROJECT=1
$ pipenv --three
$ pipenv install --dev

There will be a script you can run like this:

$ pipenv run run-hydxlib

It runs the main() function in hydxlib/scripts.py, adjust that if necessary. The script is configured in setup.py (see entry_points).

In order to get nicely formatted python files without having to spend manual work on it, run the following command periodically:

$ pipenv run black hydxlib

Run the tests regularly. This also checks with pyflakes, black and it reports coverage. Pure luxury:

$ pipenv run pytest

The tests are also run automatically on “travis”, you’ll see it in the pull requests. There’s also coverage reporting on coveralls.io.

Changelog of hydxlib

0.6 (2019-11-22)

  • Using the final version of the hydx format.

0.5 (2019-02-12)

  • Bug fix discharge coefficient orifices in Threedi.

0.4 (2019-01-18)

  • Small fixes.

0.3 (2019-01-09)

  • Added docstrings and updated the readme.

0.2 (2019-01-09)

  • Enabled automatic pypi.org uploads from travis-ci.com

0.1 (2019-01-09)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hydxlib-0.6.tar.gz (42.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hydxlib-0.6-py3-none-any.whl (50.4 kB view details)

Uploaded Python 3

File details

Details for the file hydxlib-0.6.tar.gz.

File metadata

  • Download URL: hydxlib-0.6.tar.gz
  • Upload date:
  • Size: 42.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7

File hashes

Hashes for hydxlib-0.6.tar.gz
Algorithm Hash digest
SHA256 625990c0f3c29944f4f1a2d26fbbde235d4b8423f517a2877836b05cccadc791
MD5 4375fa5eb6b3633dc5a3b4db94b6f64e
BLAKE2b-256 fea0faab8c81ca2fa9b99ccfe1827babcfb3db0b17897c33568f20a23fb9ffeb

See more details on using hashes here.

File details

Details for the file hydxlib-0.6-py3-none-any.whl.

File metadata

  • Download URL: hydxlib-0.6-py3-none-any.whl
  • Upload date:
  • Size: 50.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.6.7

File hashes

Hashes for hydxlib-0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8152e0a4fb02b4c933be237a135528c8bdd95dbbefc35b93c093c0c3a446f778
MD5 9ece28bb85b5cac54b67b993d8976d86
BLAKE2b-256 1aa68cf34586f83b064799bb4894ff9a43ccfe7d8e4f24d2f0fa845dea8cc6b8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page