DTCC Core provides the core functionality for DTCC Platform, including data modeling, data wrangling, data generation, and data input/output.
This project is part of the Digital Twin Platform (DTCC Platform) developed at the Digital Twin Cities Centre supported by Sweden’s Innovation Agency Vinnova under Grant No. 2019-421 00041.
This project is documented as part of the DTCC Platform Documentation.
- Anders Logg
- Vasilis Naserentin
- Dag Wästerberg
- Orfeas Eleutheriou
- Anton Olsson
- Anton Annlöv
- George Spaias
This project is licensed under the MIT license.
Copyrights are held by the individual authors as listed at the top of each source file.
Comments, contributions, and questions are welcome. Please engage with us through Issues, Pull Requests, and Discussions on our GitHub page.
CI enforces that every public API function (exported via __all__) in dtcc_core is executed at least once by the test suite. You can run the same check locally:
-
Create a virtual environment and install the project and test tools:
python -m venv .venv && source .venv/bin/activate(Windows:python -m venv .venv && .venv\\Scripts\\activate)pip install -e .pip install pytest pytest-cov
-
Run tests with coverage to produce
tests/coverage.json(run from thetestsdirectory to match CI):cd testspytest --maxfail=1 --disable-warnings --cov=dtcc_core --cov-report=term-missing --cov-report=json:coverage.json
-
From the project root, run the function-call checker:
cd ..python scripts/check_public_api_calls.py --package dtcc_core --coverage-file tests/coverage.json
Exit status 0 means all public functions were exercised by tests. A non‑zero exit prints the list of missed functions with their source locations so you can add or adjust tests.
-
Surface meshing backends: SPADE is used by default via
dtcc-pyspade-native. Earcut is provided as a fast alternative for cases where a lightweight triangulation method is preferred. Support for the Triangle backend is optional and disabled by default to keep the standard installation minimal. -
Enabling Triangle: If you wish to build with Triangle support, ensure that the Triangle library is available on your system (a header-only setup is sufficient) and install
dtcc-corewith:pip install . \ --config-settings=cmake.define.DTCC_USE_TRIANGLE=ON \ --config-settings=cmake.define.DTCC_TRIANGLE_DIR=/path/to/triangle/prefixIf these options are omitted, the build will proceed without Triangle and will use SPADE or earcut depending on configuration and availability.
-
Volume meshing with TetGen: TetGen can be used for tetrahedral meshing through the minimal wrapper provided in the
dtcc-tetgen-wrapperrepository:git clone https://github.com/dtcc-platform/dtcc-tetgen-wrapper.git cd dtcc-tetgen-wrapper pip install .
If you have make available, you can use these shortcuts from the repository root:
make install— install the package and test tooling.make test— run the test suite.make coverage— run tests with coverage and writetests/coverage.json.make check-public-api— check that all public API functions were executed.make verify-public-api— run coverage and then the public API check.