Skip to main content

xstrumodeler

Python bindings (Boost.Python) for the xstrucore cross-section modeler.

The repository is self-contained:

Path Content
boost-wrap.cpp Boost.Python module definition (xstrumodeler)
lib/coreobj/ core objects library (functions, units, keys, ...)
lib/xstrucore/ structural section modeler library
src/xstrumodeler/ Python package; the compiled module is installed here
tests/ tests of the Python module (pytest)
docs/, mkdocs.yml documentation (MkDocs)

Boost 1.88 is downloaded automatically at configure time (CMake FetchContent) and Boost.Python is compiled statically into the module, so no system Boost is required. The wheel depends only on the C++ runtime.

Requirements

  • Python >= 3.10 (with headers)
  • a C++17 compiler:
    • Linux: GCC or Clang (g++)
    • Windows: Visual Studio 2022 Build Tools with the Desktop development with C++ workload
  • network access on first build (≈100 MB Boost download)

CMake is provided by scikit-build-core if not installed.

Build

pip wheel . -w dist          # build a wheel
pip install .                # or install directly
from xstrumodeler import xstrumodeler
modeler = xstrumodeler.XStruModeler()

Faster rebuilds (development)

By default pip builds in a temporary directory, so every build downloads Boost again and recompiles everything (about a minute). To reuse a build directory, install the build tools once and disable build isolation:

pip install "scikit-build-core>=0.11" ninja
pip install --no-build-isolation . -Cbuild-dir=build/{wheel_tag}

Following builds only recompile the changed files (seconds). Build isolation must be off: with it, pip uses a different temporary ninja on each run and the build directory is discarded.

Offline build

Download and extract boost-1.88.0-cmake.tar.xz then:

pip wheel . -w dist -Ccmake.define.FETCHCONTENT_SOURCE_DIR_BOOST=/path/to/boost-1.88.0

Plain CMake (development)

cmake -S . -B build
cmake --build build -j
PYTHONPATH=build python -c "import xstrumodeler; print(xstrumodeler.XStruModeler())"

Here the compiled module is imported directly (import xstrumodeler), while the installed package is from xstrumodeler import xstrumodeler.

Wheels for all Python versions (like CI)

pipx run cibuildwheel --platform linux     # requires Docker
pipx run cibuildwheel --platform windows   # on Windows

Wheels are written to wheelhouse/. Locally cibuildwheel uses its default manylinux image, so Linux wheels may be tagged manylinux_2_28 instead of the manylinux_2_34 built by CI.

Tests and documentation

The repository has a Taskfile driving uv:

task test          # build the module and run the tests in tests/
task docs          # live preview of the documentation on http://localhost:8080
task docs:build    # build the documentation into ./site

The documentation is written for MkDocs (mkdocs.yml, docs/). It includes the verification manual of the elastic solver, with the proof of convergence for sections under N, Mx and My. Building it does not compile the module: only the docs dependency group is installed.

Without task:

uv run --only-group docs mkdocs build
uv run --group test pytest tests

GitLab CI publishes the documentation on GitLab Pages when docs/, mkdocs.yml or the locked docs dependencies change on the default branch, and checks that it builds (mkdocs build --strict) in merge requests. Changes to the documentation alone don't start the wheel builds.

Releasing

GitLab CI builds the sdist, manylinux_2_34 wheels (cp310–cp314) and Windows wheels (cibuildwheel):

  • on pushes to master and merge requests that change build files (sources, CMake, pyproject.toml, CI), or from Run pipeline in the GitLab UI: build only, to catch problems before a release;
  • on version tags: it also checks that the tag matches version in pyproject.toml and, if every build succeeds, uploads them all:
Tag Upload to
vX.Y.ZrcN TestPyPI
vX.Y.Z PyPI

Uploads use Trusted Publishing: no token is stored in GitLab.

Release steps:

  1. Set version = "X.Y.ZrcN" in pyproject.toml, commit, push, then git tag vX.Y.ZrcN && git push origin vX.Y.ZrcN.
  2. Check the release candidate: pip install -i https://test.pypi.org/simple/ xstrumodeler==X.Y.ZrcN.
  3. Set version = "X.Y.Z" in pyproject.toml and CITATION.cff, commit, push, then git tag vX.Y.Z && git push origin vX.Y.Z.

A version can be uploaded only once: if a release fails after uploading, use the next rc number.

One-time setup:

  • PyPI → xstrumodeler → Settings → Publishing → add a GitLab publisher: namespace luigi_paone, project xstrumodeler, pipeline file .gitlab-ci.yml, environment pypi.
  • TestPyPI → Account → Publishing → add a pending publisher with the same values, project name xstrumodeler, environment testpypi.
  • GitLab → Settings → Repository → Protected tags: v*, Maintainers only.

Provenance

Extracted from the exagon repository (commit 5455d2d) with history preserved: src/app/xstrumodeler → repository root, src/lib/coreobj and src/lib/xstrucore → lib/. The copies in lib/ are now independent from exagon; changes are not synchronized automatically.

License

Licensed under the Apache License, Version 2.0. Redistributions must retain the NOTICE file. If you use xstrumodeler in published work, please cite it as described in CITATION.cff.

Boost is distributed under the Boost Software License, Version 1.0.

Metadata

Release files for xstrumodeler 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xstrumodeler 0.0.5
File Size Uploaded Provenance Actions
xstrumodeler-0.0.5.tar.gz 156.4 kB Without provenance Details for xstrumodeler-0.0.5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for xstrumodeler 0.0.5
File Actions
xstrumodeler-0.0.5-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details for xstrumodeler-0.0.5-cp314-cp314-win_amd64.whl
xstrumodeler-0.0.5-cp314-cp314-manylinux_2_34_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.34+ x86-64 Details for xstrumodeler-0.0.5-cp314-cp314-manylinux_2_34_x86_64.whl
xstrumodeler-0.0.5-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for xstrumodeler-0.0.5-cp313-cp313-win_amd64.whl
xstrumodeler-0.0.5-cp313-cp313-manylinux_2_34_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.34+ x86-64 Details for xstrumodeler-0.0.5-cp313-cp313-manylinux_2_34_x86_64.whl
xstrumodeler-0.0.5-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for xstrumodeler-0.0.5-cp312-cp312-win_amd64.whl
xstrumodeler-0.0.5-cp312-cp312-manylinux_2_34_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.34+ x86-64 Details for xstrumodeler-0.0.5-cp312-cp312-manylinux_2_34_x86_64.whl
xstrumodeler-0.0.5-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for xstrumodeler-0.0.5-cp311-cp311-win_amd64.whl
xstrumodeler-0.0.5-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details for xstrumodeler-0.0.5-cp311-cp311-manylinux_2_34_x86_64.whl
xstrumodeler-0.0.5-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for xstrumodeler-0.0.5-cp310-cp310-win_amd64.whl
xstrumodeler-0.0.5-cp310-cp310-manylinux_2_34_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.34+ x86-64 Details for xstrumodeler-0.0.5-cp310-cp310-manylinux_2_34_x86_64.whl

Total release size: 4.2 MB

Release files / xstrumodeler-0.0.5.tar.gz

Download URL xstrumodeler-0.0.5.tar.gz
Size 156.4 kB
Tags Source
SHA-256 checksum
How to use checksums
cfeb1794d4c9a681d50c6f6b4e2f50f7aa4d34170227a72290134c34ad856813
BLAKE2b-256 checksum
How to use checksums
a16b0a2ab751607d4cea0f172da0fc8776b8339bd035afaa2faf725f2008c606
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp314-cp314-win_amd64.whl

Download URL xstrumodeler-0.0.5-cp314-cp314-win_amd64.whl
Size 275.9 kB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
e84642b4f916a48e2e36968a075d83dc75465f23da4bd207b4e1c4d36c028c61
BLAKE2b-256 checksum
How to use checksums
0886c704b079c6a0d97efda46b3d993a2fa083c3b6473d1faf59369807583255
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp314-cp314-manylinux_2_34_x86_64.whl

Download URL xstrumodeler-0.0.5-cp314-cp314-manylinux_2_34_x86_64.whl
Size 549.8 kB
Tags CPython 3.14 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
3dc2e75a1a6059af135e6ab0cd1c229309de581e68ce28dec101280efa425fb3
BLAKE2b-256 checksum
How to use checksums
3728e90bd739e47db459d84224fc38661c75e4c41bdd648546f4bf1611ae2c38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp313-cp313-win_amd64.whl

Download URL xstrumodeler-0.0.5-cp313-cp313-win_amd64.whl
Size 267.6 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4bbe0b9db70474987339365b5cf6159e1d0acb43d263115652ecc1a30c709342
BLAKE2b-256 checksum
How to use checksums
5d0f6806b37f99a6cc78b9dea3da138f9f9c3575e7e1128b1197c27889541b05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp313-cp313-manylinux_2_34_x86_64.whl

Download URL xstrumodeler-0.0.5-cp313-cp313-manylinux_2_34_x86_64.whl
Size 546.6 kB
Tags CPython 3.13 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
8e2d7d8e75ec6201c6dc0f81a118b051f43b1658efd7af836c1fa7892897d392
BLAKE2b-256 checksum
How to use checksums
aada7f81b1e0385f1ce1e8b9d43718c54ba15b2d51ce47a83a490e4cbce14f22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp312-cp312-win_amd64.whl

Download URL xstrumodeler-0.0.5-cp312-cp312-win_amd64.whl
Size 267.6 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ebbebf08fb74bbacdf751a6886c7f891d3a9f2e6944fabe1a84720bdd95321f4
BLAKE2b-256 checksum
How to use checksums
cb8db7058f88d48cbf5b5c04cf65065fdb72e2b62c291c681bc42602efe4c594
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp312-cp312-manylinux_2_34_x86_64.whl

Download URL xstrumodeler-0.0.5-cp312-cp312-manylinux_2_34_x86_64.whl
Size 546.5 kB
Tags CPython 3.12 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
7ece0fce6fd219115c9411900960663051d56a531bd672fb35b5b4b52db1e2eb
BLAKE2b-256 checksum
How to use checksums
07b89784097ce8ffcbf0a585823230f19d63a676a3b8f8071331e41e185f0cde
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp311-cp311-win_amd64.whl

Download URL xstrumodeler-0.0.5-cp311-cp311-win_amd64.whl
Size 266.2 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
80bca1e140c658ccf0b085665875d5c99cf609de3a5aa9c894ad88885630a663
BLAKE2b-256 checksum
How to use checksums
26720fad5dc7f57f28242334f4e26df5ac069b149946e5cc5be0821bb3c1faa7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL xstrumodeler-0.0.5-cp311-cp311-manylinux_2_34_x86_64.whl
Size 550.3 kB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
783fa5558014a932eca38ac062b048fa340f02d08a1a646d93fa80a03889f2e5
BLAKE2b-256 checksum
How to use checksums
1e5d71a8d0a8b679a69e64531e9bd398abe5c1012422ffebc6de2b71d48e468f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp310-cp310-win_amd64.whl

Download URL xstrumodeler-0.0.5-cp310-cp310-win_amd64.whl
Size 266.3 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
7791cc246adaab5f0c003f28efea1b3867f7a7123b733fadcfa0e50a4c17e280
BLAKE2b-256 checksum
How to use checksums
a60b1af31c2c5b3d0903b4d5152cea1cecbb9f451cd2ec904518a1b8c7bede0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / xstrumodeler-0.0.5-cp310-cp310-manylinux_2_34_x86_64.whl

Download URL xstrumodeler-0.0.5-cp310-cp310-manylinux_2_34_x86_64.whl
Size 550.5 kB
Tags CPython 3.10 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
ff4cb3dece50f3d0afbcde1f0e507d3cfbe9ace46acec49c2bbaa4a7a5982d17
BLAKE2b-256 checksum
How to use checksums
bbae8e9b524e205d6456780072eca62f2d720bf9a71189259755a7b6373b660f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.12.15

Security for xstrumodeler 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page