Metadata-Version: 2.4
Name: bsit-bob
Version: 0.1.3
Summary: BACnet Semantic Interoperability Toolkit - Bob - Building Model Builder
License-Expression: MIT
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rdflib
Provides-Extra: templates
Requires-Dist: python-dotenv; extra == "templates"
Requires-Dist: pyyaml>=5.4.1; extra == "templates"
Requires-Dist: rich; extra == "templates"
Provides-Extra: tests
Requires-Dist: black>=25.1.0; extra == "tests"
Requires-Dist: flake8>=7.1.2; extra == "tests"
Requires-Dist: mypy>=1.17.1; extra == "tests"
Requires-Dist: ruff>=0.12.12; extra == "tests"
Requires-Dist: pytest-cov>=6.0.0; extra == "tests"
Requires-Dist: pytest>=4.6.11; extra == "tests"
Provides-Extra: doc
Requires-Dist: sphinx; extra == "doc"
Requires-Dist: myst_parser; extra == "doc"
Requires-Dist: sphinxawesome_theme; extra == "doc"
Requires-Dist: sphinx-copybutton; extra == "doc"
Requires-Dist: sphinxcontrib-mermaid; extra == "doc"
Dynamic: license-file

# SI-Builder

[![Python package](https://github.com/ChristianTremblay/bsit-bob/actions/workflows/python-package.yml/badge.svg)](https://github.com/ChristianTremblay/bsit-bob/actions/workflows/python-package.yml)

Build ASHRAE 223P–compliant models using YAML and Python. si-builder emits RDF (Turtle) and aligns key concepts with RealEstateCore.

Install

```bash
% mkdir my-building
% cd my-building
% uv init --python 3.13
Initialized project `my-building`
% uv add bsit-bob
# or uv pip install ".[tests,validation,templates,doc]", choose what you need
Using CPython 3.13.1
Creating virtual environment at: .venv
```

Verify import
```python
# ipython
import bob  # si-builder package
```

Environment
- Install python-dotenv (recommended). si-builder automatically loads a .env at the project root if present.
- See doc/environment.md for available variables and effects.

Run tests
- Windows (PowerShell)
```powershell
cd d:\0Programmes\Ashrae\si-builder
pytest .\tests\
```
- Linux (bash)
```bash
cd /path/to/si-builder
pytest tests/
```

Build documentation (HTML)
This runs helpers, executes examples to generate TTL, renders SVG graphs, and builds Sphinx.

Prerequisites (one-time)
- Windows (PowerShell)
```powershell
python -m pip install -U sphinx myst-parser rdflib graphviz python-dotenv sphinxawesome-theme
choco install graphviz
```
- Linux (bash)
```bash
python3 -m pip install -U sphinx myst-parser rdflib graphviz python-dotenv sphinxawesome-theme
sudo apt-get update && sudo apt-get install -y graphviz  # Debian/Ubuntu
# Fedora:
sudo dnf install -y graphviz
# Arch:
sudo pacman -S graphviz
```

Build and open
- Windows (PowerShell)
```powershell
python .\tools\build_docs.py
Start-Process .\doc\_build\html\index.html
```
- Linux (bash)
```bash
python3 ./tools/build_docs.py
xdg-open ./doc/_build/html/index.html
```

Docs contents (from doc/index.md)
- Getting Started
- Environment
- Core
- Enumerations
- Basics
- Syntax Operators
- Syntax
- Connections
- Junctions and Boundaries
- Sensors and Observation
- Controllers and BACnet
- References
- Systems vs Equipment
- Equipment
- Spaces
- Properties
- External References
- Templates and Catalog
- Validation and Export
- Examples from Tests
- Operators Implementation
