Skip to main content

The schema of 3Di schematization files

Project description

threedi-schema

https://img.shields.io/pypi/v/threedi-schema.svg Github Actions status

The schema of 3Di schematisation files.

This project exposes:

  • A ThreediDatabase object to interact with schematisation files.

  • A ModelSchema object (ThreediDatabase().schema) for adapting schema versions (called “migration”).

  • The 3Di schema as SQLAlchemy models and python Enum classes.*

*This package exposes SQLAlchemy models of the schematisation files directly. A minor release of this package may change these models and will be backwards incompatible. If the SQLAlchemy models are used, we strongly advise to fix the minor version as follows: threedi-schema==0.214.*. Otherwise, just fixing the major version is sufficient.

Example

The following code sample shows how you can upgrade a schematisation file:

from threedi_schema import ThreediDatabase

db = ThreediDatabase("<Path to your sqlite file>")
db.schema.upgrade()

The following code sample shows how you can list Channel objects:

from threedi_schema import models
# NB: Ensure that you pin the minor version of threedi-schema
# when using models (or constants).

channels = db.get_session().query(models.Channel).all()

Command-line interface

Migrate to the latest schema version:

threedi_schema -s path/to/model.sqlite migrate

Ensure presence of spatial indexes:

threedi_schema -s path/to/model.sqlite index

Installation

Install with:

$ pip install threedi-schema

Changelog of threedi-schema

0.217.1 (2023-05-17)

  • Rewrite release workflow to use a supported github action for github release.

  • Build the threedi-schema release with the build package instead of setuptools.

0.217.0 (2023-05-08)

  • Rename vegetation columns to match raster options.

0.216.4 (2023-04-11)

  • Fixed libspatialite 4.3 incompatibility (introduced in 0.216.3).

0.216.3 (2023-04-04)

  • Fixed DROP TABLE in migration 214 (tables “v2_connected_pnt”, “v2_calculation_point”, “v2_levee” remained present). The DROP TABLE is emitted again in migration 216.

0.216.2 (2023-03-24)

  • Remove groundwater columns from beta columns for 1d boundary conditions.

  • Check on vegetation drag settings id in global settings instead of vegetation drag id for beta columns.

0.216.1 (2023-03-23)

  • Add beta_features.py to contain a list of spatialite columns and values for columns still in beta status.

0.216.0 (2023-03-15)

  • Add v2_vegation_drag table.

  • Add 1D2D groundwater attributes to Pipes, Channels and Manholes

0.214.6 (2023-03-13)

  • Make timeseries non-nullable for BoundaryCondition1D and BoundaryConditions2D.

0.214.5 (2023-02-16)

  • Add SQLAlchemy 2.0 support and drop 1.3 support.

0.214.4 (2023-01-31)

  • Properly cleanup geo-tables in migration 214.

0.214.3 (2023-01-19)

  • Adapted versioning: prefix existing versions with 0.

  • Fixed deprecation warnings of Geoalchemy2 0.13.0

0.214.2 (2023-01-17)

  • Fixed packaging (also include migrations).

0.214.1 (2023-01-17)

  • Fixed packaging.

0.214.0 (2023-01-17)

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

threedi-schema-0.217.1.tar.gz (39.0 kB view details)

Uploaded Source

Built Distribution

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

threedi_schema-0.217.1-py3-none-any.whl (51.7 kB view details)

Uploaded Python 3

File details

Details for the file threedi-schema-0.217.1.tar.gz.

File metadata

  • Download URL: threedi-schema-0.217.1.tar.gz
  • Upload date:
  • Size: 39.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.3

File hashes

Hashes for threedi-schema-0.217.1.tar.gz
Algorithm Hash digest
SHA256 9606d8289e7acbc91ec1ab380e7e2e0b7b3c686cd4148ef93c3516176d7a3b7a
MD5 23b4135de4bf64319d3dc1c358a743f7
BLAKE2b-256 ad013214a12e8bfeab50c406d59cf28ba9ab2db17116f29697f6cde1482756c1

See more details on using hashes here.

File details

Details for the file threedi_schema-0.217.1-py3-none-any.whl.

File metadata

File hashes

Hashes for threedi_schema-0.217.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ebf175c1d4a17282903d86e67923c36e84c9cdb2efa737f2bb05fea55c203d59
MD5 8ecbff1b14a119c650c5e21ca3e4ef6e
BLAKE2b-256 a567f3f9ec2b3d3c613f7bb3dbacc9bdfc2b553780c58e95353fd5adff67f0d3

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