Skip to content

Pr/84 - #87

Merged
AadilLatif merged 7 commits into
mainfrom
pr/84
Jul 16, 2026
Merged

AadilLatif merged 7 commits into
mainfrom
pr/84

Conversation

@AadilLatif

@AadilLatif AadilLatif commented Jul 16, 2026

Copy link
Copy Markdown
Collaborator

This pull request introduces a major feature: a new DuckDB-powered simulation engine for ERAD, which enables high-performance, scalable simulations and flexible data export. It also adds a comprehensive command-line interface (CLI) for running, converting, querying, and summarizing simulation results, and updates the documentation to reflect these enhancements. Several minor fixes and improvements are included as well.

Simulation Engine and CLI Enhancements:

  • Added a new DuckDB-based simulation engine for large-scale, vectorized simulations, including direct array loading and fast exports to Parquet, SQLite, CSV, and Arrow formats (src/erad/engine/core.py, src/erad/cli.py, docs/simulation/engine.ipynb). [1] [2] [3]
  • Introduced a new CLI group erad engine with subcommands for running simulations, converting between formats, querying results with SQL, and displaying summary statistics (src/erad/cli.py). [1] [2]
  • Updated the documentation and table of contents to include a detailed DuckDB engine tutorial and reference section (docs/_toc.yml, docs/simulation/engine.ipynb). [1] [2]

Project and Metadata Updates:

  • Bumped the package version to 0.1.14 to reflect the new features (src/erad/__init__.py).
  • Added code quality configuration for the new CLI source file (pyproject.toml).

Documentation and Branding:

  • Fixed a funding attribution typo in the README (NLR → NREL) and removed a duplicate downloads badge (README.md). [1] [2]

These changes significantly improve ERAD's scalability, usability for large datasets, and user experience via both Python and the CLI.

- SimulationEngine.from_asset_system(asset_system): Pydantic → DuckDB
- SimulationEngine.from_parquet(path): Parquet file → DuckDB
- SimulationEngine.load_from_asset_system(): load existing results into engine
- SimulationEngine.to_asset_states(): DuckDB → list of AssetState objects
- AssetSystem.from_engine(engine): DuckDB → full Pydantic AssetSystem
- New CLI commands: erad engine run|convert|query|info
- engine run: run simulation via DuckDB, export to parquet/sqlite/csv
- engine convert: convert between result formats
- engine query: SQL queries against result files
- engine info: summary statistics for result files
- New docs page: simulation/engine.ipynb
- Added wind_gust to docs TOC
…ies)

- Updated org name in README, docs/intro.md
- Updated author/maintainer emails to @nlr.gov
- Updated badge links from NREL/erad to NLR-Distribution-Suite/erad
- Package name remains NREL-erad on PyPI for backward compatibility
@AadilLatif
AadilLatif merged commit 6e2c22c into main Jul 16, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant