Name | threedi-schema JSON |
Version |
0.219.1
JSON |
| download |
home_page | |
Summary | The schema of 3Di schematization files |
upload_time | 2024-01-30 09:56:13 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.7 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
|
threedi-schema
==========================================
.. image:: https://img.shields.io/pypi/v/threedi-schema.svg
:target: https://pypi.org/project/threedi-schema/
.. image:: https://github.com/nens/threedi-schema/actions/workflows/test.yml/badge.svg
:alt: Github Actions status
:target: https://github.com/nens/threedi-schema/actions/workflows/test.yml
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.219.1 (2024-01-30)
--------------------
- Fix migration to nullable friction_value that resulted in string type for friction_value.
- Update action versions to use a new NodeJS.
- Make CrossSectionLocation.friction_value nullable
0.218.0 (2024-01-08)
--------------------
- Add parameters vegetation_stem_density, vegetation_stem_diameter, vegetation_height and vegetation_drag_coefficient to CrossSectionLocation
- Add parameters friction_values, vegetation_stem_densities, vegetation_stem_diameters, vegetation_heights and vegetation_drag_coefficients to CrossSectionDefinition
0.217.13 (2023-10-02)
---------------------
- Change set_gate_height to set_gate_level
0.217.12 (2023-10-02)
---------------------
- Add set_gate_height to control structure options.
- Set timed control column restrictions similar to table control.
0.217.11 (2023-09-19)
---------------------
- Fix conveyance values list.
0.217.10 (2023-09-19)
---------------------
- Unmark conveyance columns as beta.
- Move zest.releaser config to pyproject.toml.
0.217.9 (2023-08-16)
--------------------
- Fix incorrectly formatted beta_features.py.
0.217.8 (2023-08-15)
--------------------
- Mark friction types with conveyance as beta features.
0.217.7 (2023-07-28)
--------------------
- Don't set journal_mode to MEMORY since it causes the schema version
field to not be updated, making migrations crash.
0.217.6 (2023-07-13)
--------------------
- Extend FrictionType enum with Chézy friction with conveyance and
Manning friction with conveyance.
0.217.5 (2023-06-15)
--------------------
- Fixed set_views (spatialite metadata tables wwere not updated).
0.217.4 (2023-06-15)
--------------------
- Fix SQLAlchemy engine and connection usage.
- Do not pool connections (solving file permission denied issues on Windows).
0.217.3 (2023-06-12)
--------------------
- Added groundwater 1D2D columns to the views.
0.217.2 (2023-05-24)
--------------------
- Remove vegetation and groundwater settings from beta features, since they are going to be released.
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)
--------------------
- Initial project structure created with cookiecutter and
https://github.com/nens/cookiecutter-python-template
- Ported code from threedi-modelchecker, rearranged into
'domain', 'application', 'infrastructure', 'migrations'.
Raw data
{
"_id": null,
"home_page": "",
"name": "threedi-schema",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "",
"author": "",
"author_email": "Nelen & Schuurmans <info@nelen-schuurmans.nl>",
"download_url": "https://files.pythonhosted.org/packages/ba/0b/0d1de9abfbe972750ee00089a13ecc390dc49f57033fb540122bace95c31/threedi-schema-0.219.1.tar.gz",
"platform": null,
"description": "threedi-schema\n==========================================\n\n\n.. image:: https://img.shields.io/pypi/v/threedi-schema.svg\n :target: https://pypi.org/project/threedi-schema/\n\n.. image:: https://github.com/nens/threedi-schema/actions/workflows/test.yml/badge.svg\n\t:alt: Github Actions status\n\t:target: https://github.com/nens/threedi-schema/actions/workflows/test.yml\n\n\nThe schema of 3Di schematisation files.\n\nThis project exposes:\n\n- A ``ThreediDatabase`` object to interact with schematisation files.\n- A ``ModelSchema`` object (``ThreediDatabase().schema``) for adapting\n schema versions (called \"migration\").\n- The 3Di schema as SQLAlchemy models and python Enum classes.\\*\n\n\\*This package exposes SQLAlchemy models of the\nschematisation files directly. A minor release of this package may\nchange these models and will be backwards incompatible.\nIf the SQLAlchemy models are used, we strongly advise to fix the\nminor version as follows: ``threedi-schema==0.214.*``. Otherwise, just\nfixing the major version is sufficient.\n\nExample\n-------\n\nThe following code sample shows how you can upgrade a schematisation file::\n\n from threedi_schema import ThreediDatabase\n\n db = ThreediDatabase(\"<Path to your sqlite file>\")\n db.schema.upgrade()\n\n\nThe following code sample shows how you can list Channel objects::\n\n from threedi_schema import models\n # NB: Ensure that you pin the minor version of threedi-schema\n # when using models (or constants).\n\n channels = db.get_session().query(models.Channel).all()\n\n\nCommand-line interface\n----------------------\n\nMigrate to the latest schema version::\n\n threedi_schema -s path/to/model.sqlite migrate \n\n\nEnsure presence of spatial indexes::\n\n threedi_schema -s path/to/model.sqlite index \n\n\nInstallation\n------------\n\nInstall with::\n\n $ pip install threedi-schema\n\nChangelog of threedi-schema\n===================================================\n\n0.219.1 (2024-01-30)\n--------------------\n\n- Fix migration to nullable friction_value that resulted in string type for friction_value.\n- Update action versions to use a new NodeJS.\n- Make CrossSectionLocation.friction_value nullable\n\n\n0.218.0 (2024-01-08)\n--------------------\n\n- Add parameters vegetation_stem_density, vegetation_stem_diameter, vegetation_height and vegetation_drag_coefficient to CrossSectionLocation\n- Add parameters friction_values, vegetation_stem_densities, vegetation_stem_diameters, vegetation_heights and vegetation_drag_coefficients to CrossSectionDefinition\n\n\n0.217.13 (2023-10-02)\n---------------------\n\n- Change set_gate_height to set_gate_level\n\n\n0.217.12 (2023-10-02)\n---------------------\n\n- Add set_gate_height to control structure options.\n\n- Set timed control column restrictions similar to table control.\n\n\n0.217.11 (2023-09-19)\n---------------------\n\n- Fix conveyance values list.\n\n\n0.217.10 (2023-09-19)\n---------------------\n\n- Unmark conveyance columns as beta.\n- Move zest.releaser config to pyproject.toml.\n\n\n0.217.9 (2023-08-16)\n--------------------\n\n- Fix incorrectly formatted beta_features.py.\n\n\n0.217.8 (2023-08-15)\n--------------------\n\n- Mark friction types with conveyance as beta features.\n\n\n0.217.7 (2023-07-28)\n--------------------\n\n- Don't set journal_mode to MEMORY since it causes the schema version\n field to not be updated, making migrations crash.\n\n\n0.217.6 (2023-07-13)\n--------------------\n\n- Extend FrictionType enum with Ch\u00e9zy friction with conveyance and\n Manning friction with conveyance.\n\n\n0.217.5 (2023-06-15)\n--------------------\n\n- Fixed set_views (spatialite metadata tables wwere not updated).\n\n\n0.217.4 (2023-06-15)\n--------------------\n\n- Fix SQLAlchemy engine and connection usage.\n\n- Do not pool connections (solving file permission denied issues on Windows).\n\n\n0.217.3 (2023-06-12)\n--------------------\n\n- Added groundwater 1D2D columns to the views.\n\n\n0.217.2 (2023-05-24)\n--------------------\n\n- Remove vegetation and groundwater settings from beta features, since they are going to be released.\n\n\n0.217.1 (2023-05-17)\n--------------------\n\n- Rewrite release workflow to use a supported github action for github release.\n- Build the threedi-schema release with the build package instead of setuptools.\n\n\n0.217.0 (2023-05-08)\n--------------------\n\n- Rename vegetation columns to match raster options.\n\n\n0.216.4 (2023-04-11)\n--------------------\n\n- Fixed libspatialite 4.3 incompatibility (introduced in 0.216.3).\n\n\n0.216.3 (2023-04-04)\n--------------------\n\n- Fixed DROP TABLE in migration 214 (tables \"v2_connected_pnt\", \"v2_calculation_point\",\n \"v2_levee\" remained present). The DROP TABLE is emitted again in migration 216.\n\n\n0.216.2 (2023-03-24)\n--------------------\n\n- Remove groundwater columns from beta columns for 1d boundary conditions.\n- Check on vegetation drag settings id in global settings instead of vegetation drag id for beta columns.\n\n\n0.216.1 (2023-03-23)\n--------------------\n\n- Add beta_features.py to contain a list of spatialite columns and values for columns still in beta status.\n\n\n0.216.0 (2023-03-15)\n--------------------\n\n- Add v2_vegation_drag table.\n- Add 1D2D groundwater attributes to Pipes, Channels and Manholes\n\n\n0.214.6 (2023-03-13)\n--------------------\n\n- Make timeseries non-nullable for BoundaryCondition1D and BoundaryConditions2D.\n\n\n0.214.5 (2023-02-16)\n--------------------\n\n- Add SQLAlchemy 2.0 support and drop 1.3 support.\n\n\n0.214.4 (2023-01-31)\n--------------------\n\n- Properly cleanup geo-tables in migration 214.\n\n\n0.214.3 (2023-01-19)\n--------------------\n\n- Adapted versioning: prefix existing versions with 0.\n\n- Fixed deprecation warnings of Geoalchemy2 0.13.0\n\n\n0.214.2 (2023-01-17)\n--------------------\n\n- Fixed packaging (also include migrations).\n\n\n0.214.1 (2023-01-17)\n--------------------\n\n- Fixed packaging.\n\n\n0.214.0 (2023-01-17)\n--------------------\n\n- Initial project structure created with cookiecutter and\n https://github.com/nens/cookiecutter-python-template\n\n- Ported code from threedi-modelchecker, rearranged into\n 'domain', 'application', 'infrastructure', 'migrations'.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The schema of 3Di schematization files",
"version": "0.219.1",
"project_urls": {
"Repository": "https://github.com/nens/threedi-schema"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6f7f7de609a95bbca45fe4b60dca317c9021e1750067bcb87e7f6ee112f2be1a",
"md5": "55a23577b2d0c2fe4e3c8e9c3228a00e",
"sha256": "d7b323666bf9f71f3bb896ae330449c5e8699b4870aebc075628065e9818e4cd"
},
"downloads": -1,
"filename": "threedi_schema-0.219.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "55a23577b2d0c2fe4e3c8e9c3228a00e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 54677,
"upload_time": "2024-01-30T09:56:12",
"upload_time_iso_8601": "2024-01-30T09:56:12.294485Z",
"url": "https://files.pythonhosted.org/packages/6f/7f/7de609a95bbca45fe4b60dca317c9021e1750067bcb87e7f6ee112f2be1a/threedi_schema-0.219.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ba0b0d1de9abfbe972750ee00089a13ecc390dc49f57033fb540122bace95c31",
"md5": "b6a6eac718a7a4dfaa5f8c48d35e17d8",
"sha256": "317e269adad1a415f811763e3af7acddb6209a781ac3367d7606894d6e6277f0"
},
"downloads": -1,
"filename": "threedi-schema-0.219.1.tar.gz",
"has_sig": false,
"md5_digest": "b6a6eac718a7a4dfaa5f8c48d35e17d8",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 41204,
"upload_time": "2024-01-30T09:56:13",
"upload_time_iso_8601": "2024-01-30T09:56:13.772054Z",
"url": "https://files.pythonhosted.org/packages/ba/0b/0d1de9abfbe972750ee00089a13ecc390dc49f57033fb540122bace95c31/threedi-schema-0.219.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-30 09:56:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "nens",
"github_project": "threedi-schema",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [],
"lcname": "threedi-schema"
}