Structural-engineering calculation library where Jupyter notebooks are the living, reviewable deliverable.
Project description
civix
A structural-engineering design library for Python where Jupyter notebooks are the primary deliverable — living calculation documents suitable for review and submission.
Status: foundation cycle. The cross-cutting infrastructure (errors, logging, notebook display, and the Quarto export pipeline) is in place; structural-domain modules (codes, elements, materials) arrive in later cycles.
Civix has two rendering paths:
civix.display— the live view inside a running notebook (self-rendering PASS/FAIL cards, headers, input tables).civix.report— the printed deliverable: scaffold a Quarto project and render a notebook to PDF/HTML/docx.
Quickstart
uv sync # core library only
uv sync --extra notebook # add Jupyter + handcalcs (optional, needed to run notebooks)
make demo # executes the foundation reporting demo notebook
In a notebook:
from civix.display import setup_notebook, CheckResult, CalculationReport
setup_notebook(project_name="Office Building A", engineer="J. Doe")
report = CalculationReport(title="Beam B-101")
report.add(CheckResult("Bending", unity_ratio=0.73, demand=180.0,
capacity=245.6, demand_unit="kNm", capacity_unit="kNm"))
report # renders a styled PASS/FAIL report
Exporting a PDF
Scaffold a Quarto project, then render a notebook. Export needs the external Quarto CLI plus a LaTeX engine (e.g. TinyTeX).
from civix.report import init_calc_project, render_report
init_calc_project("calcs", include_sample=True) # writes Quarto templates
render_report("calcs/sample-calcsheet.ipynb") # -> calcs/sample-calcsheet.pdf
The scaffold also has a CLI:
uv run python -m civix.report calcs --sample
For a complete worked example — an ACI 318M-25 (SI) flexure calc note that pairs
handcalcs equation rendering with
civix CheckResult/CalculationReport cards — see
notebooks/examples/sample-calcsheet.ipynb
and render it with uv run --extra notebook quarto render notebooks/examples/sample-calcsheet.ipynb --to pdf.
Conventions
Notebooks are submission-grade calculation documents. Units are never encoded
in identifier names — use clean engineering symbols (A_s, M_u, f_c) and
annotate the unit on the value (a handcalcs trailing comment, the value string
in calc_input_table, demand_unit/capacity_unit on CheckResult, or a
library docstring). The default system is metric: N/mm/MPa for section and
material values, kN/m/kPa/kN·m for loads and spans. Convert at boundaries; never
mix unit systems silently. Full discipline lives in
docs/calc-note-style-guide.md and CLAUDE.md.
Development
make check # format, lint, type-check, test
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file civix-0.1.1.tar.gz.
File metadata
- Download URL: civix-0.1.1.tar.gz
- Upload date:
- Size: 23.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
757850f174dd2c998fa717408f4ef5499ce12d02af7c2503f0e61344e48ca20a
|
|
| MD5 |
b6882c8a09051eaa6d9be48eedc4cd93
|
|
| BLAKE2b-256 |
beb6a9fb16af76d114de599963d7ae1430e31f050bce99c3cb28b02eb507b6de
|
Provenance
The following attestation bundles were made for civix-0.1.1.tar.gz:
Publisher:
release.yml on mohamadalitellawi/civix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civix-0.1.1.tar.gz -
Subject digest:
757850f174dd2c998fa717408f4ef5499ce12d02af7c2503f0e61344e48ca20a - Sigstore transparency entry: 2048560688
- Sigstore integration time:
-
Permalink:
mohamadalitellawi/civix@132813cdfd0edc40cee109d312d244446adceaa3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mohamadalitellawi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@132813cdfd0edc40cee109d312d244446adceaa3 -
Trigger Event:
push
-
Statement type:
File details
Details for the file civix-0.1.1-py3-none-any.whl.
File metadata
- Download URL: civix-0.1.1-py3-none-any.whl
- Upload date:
- Size: 33.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3edd6e022bc478cd46932d18bed7e671e774446389e8fee887b7a587da09d6cd
|
|
| MD5 |
789baf90b130091a70cd7606993b6900
|
|
| BLAKE2b-256 |
77a7784b67e26b99f70dc4241c0ad55958437c4ca87133bc91068b4c2363cb3c
|
Provenance
The following attestation bundles were made for civix-0.1.1-py3-none-any.whl:
Publisher:
release.yml on mohamadalitellawi/civix
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
civix-0.1.1-py3-none-any.whl -
Subject digest:
3edd6e022bc478cd46932d18bed7e671e774446389e8fee887b7a587da09d6cd - Sigstore transparency entry: 2048560706
- Sigstore integration time:
-
Permalink:
mohamadalitellawi/civix@132813cdfd0edc40cee109d312d244446adceaa3 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/mohamadalitellawi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@132813cdfd0edc40cee109d312d244446adceaa3 -
Trigger Event:
push
-
Statement type: