Skip to content

openEDI/oedisi-components

Repository files navigation

OEDISI-Components

Publish on Version Matrix

Update Components Submodules

Update Version Matrix

Lint and Format

Key Workflows

Repository-wide automation:

  • lint-format.yml - Code quality enforcement using pre-commit hooks (ruff, trailing whitespace, YAML validation). Runs on every push.
  • publish-on-version-matrix.yml - Builds and publishes Docker images when version_matrix.csv changes. Triggered on main branch push or manual workflow dispatch.
  • update-components-submodules.yml - Automatically updates all component submodules under Components/. Scheduled weekly (Monday 8 AM UTC) or triggered manually.
  • update-version-matrix.yml - Updates version_matrix.csv from working tree and submodule release tags. Creates a pull request with changes. Triggered on release published events or manual workflow dispatch.

Integration Test Status

Workflow Components Status Uses Multi-contianer Setup
RunExample broker, lindistflow_federate, LocalFeeder, measuring_federate, recorder, wls_federate RunExample False
TestDOPFOMOO broker, LocalFeeder, measuring_federate, recorder, omoo_federate TestDOPFOMOO False

Component Status

Component Version Tests Config files Docker Maintainer
Broker Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
LinDistFlow Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
LocalFeeder Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
Measuring Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
OMOO Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
Recorder Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
WLS Version Unit Tests Verify Components Verify Dockerfiles Joseph.McKinsey@nlr.gov
PNNL-DOPF-ADMM Release Unit Tests Verify Components Verify Dockerfiles tylor.slay@pnnl.gov
PNNL-Hub-Voltage Release - Verify Components Verify Dockerfiles tylor.slay@pnnl.gov
PNNL-Hub-Control Release - Verify Components Verify Dockerfiles tylor.slay@pnnl.gov
PNNL-Hub-Power Release - Verify Components Verify Dockerfiles tylor.slay@pnnl.gov
PNNL-DSSE-EKF Release Unit Tests Verify Components Verify Dockerfiles tylor.slay@pnnl.gov
PNNL-Imputation-FFNN Release - - - tylor.slay@pnnl.gov
PNNL-Profiler-SDV Release - - - tylor.slay@pnnl.gov
NLP-DOPF Release Unit Tests Verify Components Verify Dockerfiles -
NLP-DSSE Release Unit Tests Verify Components Verify Dockerfiles -
ORNL-EV-PSO Release Unit Tests Verify Components Verify Dockerfiles liub@ornl.gov
ORNL-DOPF-PSO Release Unit Tests Verify Components Verify Dockerfiles liub@ornl.gov
ORNL-DSSE-GNWLS Release Unit Tests Verify Components Verify Dockerfiles liub@ornl.gov

Repository Structure

This repository is organized as a Python repository containing components for power system co-simulation. See the Component Status table above for test and Docker build status for each component.

Components:

Each component includes:

  • pyproject.toml for modern Python packaging (PEP 621)
  • Comprehensive test suite with pytest
  • Individual README documentation
  • Standardized code quality tools (mypy, pytest, black, isort)
  • Dockerfile for containerization
  • GitHub Actions workflow for automated testing

Continuous Integration

Each component has its own GitHub Actions workflow that:

  • Runs tests on Python 3.10 and 3.11
  • Performs type checking with mypy
  • Generates code coverage reports
  • Triggers on changes to component code

Additionally:

  • Dockerfile Verification: Ensures all components have valid Dockerfiles
  • Integration Tests: End-to-end system testing
  • Docker Build Tests: Validates container builds

Quick Start - Development Installation

Install all components in editable mode from the repository root:

# Install all components for development
pip install -e Components/broker -e Components/lindistflow_federate -e Components/LocalFeeder \
            -e Components/measuring_federate -e Components/omoo_federate \
            -e Components/recorder -e Components/wls_federate

# Or install with dev dependencies
pip install -e "Components/broker[dev]" -e "Components/lindistflow_federate[dev]" \
            -e "Components/LocalFeeder[dev]" -e "Components/measuring_federate[dev]" \
            -e "Components/omoo_federate[dev]" -e "Components/recorder[dev]" \
            -e "Components/wls_federate[dev]"

Running Tests

Run all tests from the repository root:

pytest Components/

Run tests for a specific component:

pytest Components/broker/tests/
pytest Components/wls_federate/tests/

Run with coverage:

pytest --cov=Components --cov-report=html Components/

Code Quality

The repository enforces code quality standards through automated linting and formatting via GitHub Actions and pre-commit hooks.

GitHub Actions Lint Workflow (.github/workflows/lint-format.yml):

  • Runs on every push and can be triggered manually
  • Uses Python 3.13 to ensure compatibility with latest standards
  • Executes all pre-commit hooks to validate code quality

Pre-commit Hooks (.pre-commit-config.yaml):

  • Standard hooks: Trailing whitespace removal, EOF fixing, YAML validation, large file detection
  • Ruff: Modern Python linter and formatter (replaces flake8, black, isort)
    • ruff check --fix: Automatic fixing of linting issues
    • ruff format: Code formatting for consistency

To set up pre-commit hooks locally:

pip install pre-commit
pre-commit install

# Run manually on all files
pre-commit run --all-files

Install and Running Locally

Installation

  1. Install component dependencies. You can either:

    Option A: Install all components in editable mode (recommended for developers)

    pip install -e Components/broker \
                -e Components/LocalFeeder \
                -e Components/measuring_federate \
                -e Components/recorder \
                -e Components/wls_federate
  2. Verify Installation development tools (optional):

    pip install pytest mypy ruff pre-commit

About

Minimum working example for oedisi API

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors