Skip to content

threedi/hhnk-threedi-tools

Repository files navigation

HHNK Threedi Tools

pytests coverage PyPI version Code style

Tools used for analysing 3Di-models.

Used in QGIS with this plugin: https://github.com/threedi/hhnk-threedi-plugin Documentation: https://threedi.github.io/hhnk-threedi-plugin

Development Setup

Development is done in VS-Code with a Pixi environment. To setup the env open the cloned hhnk-threedi-tools folder in VS-Code or in a terminal in the folder and execute:
pixi install
pixi run postinstall -> does a local install of hhnk-research-tools and HyDAMOValidatieModule. Also installs githooks to do ruff checks before push.

Use pixi shell to open the command prompt with the python enviroment initialized.

Run tests locally

To run test locally:

  • Copy .env.example and rename to symple .env. This will ensure tests that required database access are skipped.
  • Run pixi run tests in terminal. Make sure postinstall has been run.

2025-06 -> migration towards python 3.12. Not all checks work yet on 3.12. The github checks therefore run on py39

Tests this locally with pixi run -e py39 tests

Not all checks work yet on 3.12. The github checks therefore run on python 3.9 (pixi environment py39)

2025-09: Beware that the py39 test environment uses the main from hhnk-research-tools and, not local editable install.

To run tests locally on python 3.9 use pixi run -e py39 tests

Model Repository

Initialize a model repository

Run this after cloning a model repository or creating a new one. This will add the nescessary git hooks (to .get/hooks), initialize git LFS (Large File Storage), create or append to the .gitattributes and .gitignore file.

Windows

# from the root of the model repository
<root of hhnk-treedi-tools repo>\hhnk_threedi_tools\git_model_repo\bin\initialize_repo.bat
# or from other path
<root of hhnk-treedi-tools repo>\hhnk_threedi_tools\git_model_repo\bin\initialize_repo.bat <path to model repo>

Or on Mac/ Linux

# from the root of the model repository
<root of hhnk-treedi-tools repo>/hhnk_threedi_tools/git_model_repo/bin/linux/initialize_repo.sh
# or from other path
<root of hhnk-treedi-tools repo>/hhnk_threedi_tools/git_model_repo/bin/linux/initialize_repo.sh <path to model repo>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors