https://github.com/bedrock-engineer/cecode

Civil Engineering Codes in readable, usable, executable Python.

https://github.com/bedrock-engineer/cecode

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Civil Engineering Codes in readable, usable, executable Python.

Basic Info
  • Host: GitHub
  • Owner: bedrock-engineer
  • License: apache-2.0
  • Language: Python
  • Default Branch: main
  • Size: 90.8 KB
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 1 year ago · Last pushed about 1 year ago
Metadata Files
Readme License

README.md

cecode

Civil Engineering Codes in Readable, Usable, Executable Python

cecode is a Python library that implements civil engineering standards and codes of practice as structured, interactive marimo notebooks.

It enables engineers to:

  • Perform calculations as described in codes like the Eurocode using real code-compliant formulas.
  • Understand how results are derived via clear, documented, step-by-step notebooks.
  • Automate engineering workflows while retaining traceability to the source standards.

Designed for engineers who need transparency and repeatability—not just black-box results.

📦 What’s Inside

  • 💻 Python-first code that reflects the logic of engineering standards
  • 📓 Marimo notebooks that combine inputs, explanations, formulas, and results
  • ⚙️ Executable modules usable in automation pipelines or standalone analysis
  • 📖 Mapping of inputs and variables to code clauses, descriptions, units, and LaTeX symbols

🧱 Why cecode?

Civil engineering standards often describe calculations in written prose, diagrams, or formulae that must be manually translated into code. cecode bridges this gap by:

  • Replicating the logic of the code in precise Python
  • Making inputs explicit, with documented symbols, units, and meaning
  • Rendering results transparently in a visual notebook interface
  • Allowing batch or automated use, via the same functions used in notebooks

This makes it possible to write automated engineering tools while still complying with the original design intent of the code of practice that underpins the design.

🚀 Getting Started

  1. Clone the repo or download one of the marimo notebooks you're interested in.
  2. Run the notebook with:
    bash uvx marimo edit --sandbox path/to/cecode_marimo_notebook.py

📁 Proposed Project Structure

text cecode/ # Project root │ ├── src/ # Source directory (standard for modern Python packaging) │ └── cecode/ # `cecode` Python package │ │ │ ├── eurocode_1_1/ # Actions on structures (EN 1991-1) │ │ ├── defs.py # Variable definitions for Eurocode 1-1 │ │ ├── clause_2_3_imposed_loads.py │ │ └── ... │ │ │ ├── eurocode_2_1/ # Structural concrete (EN 1992-1) │ │ ├── defs.py # Variable definitions for Eurocode 2-1 │ │ ├── clause_3_1_design_strength.py │ │ └── ... │ │ │ ├── eurocode_3_1/ # Steel design (EN 1993-1) │ │ ├── defs.py # Variable definitions for Eurocode 3-1 │ │ ├── clause_6_2_buckling_resistance.py │ │ └── ... │ │ │ ├── eurocode_7_1/ # Geotechnical design (EN 1997-1) │ │ ├── defs.py # Variable definitions for Eurocode 7-1 │ │ ├── clause_6_5_bearing_resistance.py │ │ ├── clause_7_8_pile_design.py │ │ └── ... │ │ │ ├── bs_8004/ # British Standard: Foundations │ │ ├── defs.py │ │ ├── section_7_shallow_foundations.py │ │ └── ... │ │ │ ├── ciria_c580/ # CIRIA C580: Embedded retaining walls │ │ ├── defs.py │ │ ├── section_4_wall_design.py │ │ └── ... │ │ │ ├── aashto_lrfd/ # AASHTO LRFD Bridge Design (USA) │ │ ├── defs.py │ │ └── ... │ │ │ └── ... │ ├── tests/ # Unit tests and verification against worked examples │ ├── test_clause_6_5_bearing_resistance.py │ └── ... │ ├── pyproject.toml # Project metadata and build config └── README.md # Project overview

✍️ Contributing

If you'd like to add more clauses, improve notebook clarity, or expand coverage to other codes:

  • Fork the repo
  • Write clean, readable Python and nicely formatted marimo notebooks
  • Document inputs, intermediate variables and results clearly (symbol, units, description, bounds)
  • Match the logic of the source standard, clause by clause
  • Open a PR and reference the standard clauses you implemented

📄 License

This project is licensed under the Apache 2.0 License. See LICENSE for details.

Note: The actual texts of (most or all?) civil engineering codes (like the Eurocode) are copyrighted and not included in this repository.

👷 Maintainers

Owner

  • Name: Bedrock
  • Login: bedrock-engineer
  • Kind: organization
  • Email: info@bedrock.engineer
  • Location: Netherlands

The Open Source Foundation for Ground Engineering

GitHub Events

Total
  • Watch event: 2
  • Push event: 6
  • Pull request event: 2
  • Create event: 4
Last Year
  • Watch event: 2
  • Push event: 6
  • Pull request event: 2
  • Create event: 4

Committers

Last synced: 10 months ago

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Total issue authors: 0
  • Total pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 2
  • Average time to close issues: N/A
  • Average time to close pull requests: less than a minute
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
  • JoostGevaert (2)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 25 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 1
  • Total maintainers: 1
pypi.org: cecode

Civil Engineering Codes in readable, usable, executable Python.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 25 Last month
Rankings
Dependent packages count: 9.3%
Average: 30.8%
Dependent repos count: 52.3%
Maintainers (1)
Last synced: 10 months ago

Dependencies

pyproject.toml pypi
  • marimo >=0.12.10
  • matplotlib >=3.9.4
  • numpy >=2.0.2
uv.lock pypi
  • anyio 4.9.0
  • cecode 0.1.0
  • click 8.1.8
  • colorama 0.4.6
  • contourpy 1.3.0
  • contourpy 1.3.2
  • cycler 0.12.1
  • docutils 0.21.2
  • exceptiongroup 1.2.2
  • fonttools 4.57.0
  • h11 0.14.0
  • idna 3.10
  • importlib-metadata 8.6.1
  • importlib-resources 6.5.2
  • itsdangerous 2.2.0
  • jedi 0.19.2
  • kiwisolver 1.4.7
  • kiwisolver 1.4.8
  • marimo 0.12.10
  • markdown 3.8
  • matplotlib 3.9.4
  • matplotlib 3.10.1
  • narwhals 1.35.0
  • numpy 2.0.2
  • numpy 2.2.4
  • packaging 24.2
  • parso 0.8.4
  • pillow 11.2.1
  • psutil 7.0.0
  • pycrdt 0.11.1
  • pygments 2.19.1
  • pymdown-extensions 10.14.3
  • pyparsing 3.2.3
  • python-dateutil 2.9.0.post0
  • pyyaml 6.0.2
  • ruff 0.11.6
  • six 1.17.0
  • sniffio 1.3.1
  • starlette 0.46.2
  • tomlkit 0.13.2
  • typing-extensions 4.13.2
  • uvicorn 0.34.1
  • websockets 15.0.1
  • zipp 3.21.0