Skip to main content

r2x-reeds

ReEDS parser and transforms plugin for the r2x-core plugin framework.

CI Actions Quality Python PyPI License codecov Documentation

[!WARNING] This project is currently optimized for internal R2X workflows. You are welcome to use it, but APIs and behavior may continue to evolve as r2x-core evolves.

r2x-reeds integrates NREL ReEDS model data with r2x-core and infrasys. It provides a parser plugin for building infrasys.System objects from ReEDS data, plus a set of reusable post-parse transforms for common system-modification workflows.

Quickstart · Installation · What It Provides · Usage with r2x-core · Development · License

Quickstart

Install:

pip install r2x-reeds

Parse a ReEDS run directory into an infrasys.System:

from pathlib import Path

from r2x_core import DataStore, PluginContext
from r2x_reeds import ReEDSConfig, ReEDSParser

run_path = Path("path/to/reeds_run")

config = ReEDSConfig(
    solve_year=2030,
    weather_year=2012,
    case_name="test_Pacific",
)
ctx = PluginContext(
    config=config,
    store=DataStore.from_plugin_config(config, path=run_path),
)

system = ReEDSParser.from_context(ctx).run().system
print(system.name)

Installation

From PyPI

Python requirement: >=3.11, <3.14.

pip install r2x-reeds

Using uv:

uv add r2x-reeds

From Source

git clone https://github.com/NREL/r2x-reeds.git
cd r2x-reeds
uv sync --all-groups

What It Provides

  • ReEDSParser: reads ReEDS outputs and inputs (CSV/HDF5-backed mappings) into infrasys.System components and time series.
  • ReEDSUpgrader and run_reeds_upgrades(...): input version-detection and upgrade pipeline run during parser lifecycle.
  • Plugin entry point for r2x-core under the r2x_plugin group:
    • reeds-parser = r2x_reeds:ReEDSParser
  • Transform entry points under r2x.transforms:
    • add-pcm-defaults
    • add-emission-cap
    • add-electrolyzer-load
    • add-purchaser-load
    • add-ccs-credit
    • break-gens
    • add-imports
    • add-optimal-siting

Usage with r2x-core

r2x-reeds follows the r2x-core plugin lifecycle.

  • Build parser instances with PluginContext.
  • Run lifecycle hooks with .run().
  • Configure parsing through ReEDSConfig.
  • Apply optional r2x.transforms after parsing for scenario/system modifiers.

Development

Install dev dependencies:

uv sync --all-groups

Run the same checks used in CI:

uv run prek run --all-files --hook-stage pre-push

Targeted commands:

uv run pytest -q -m "not slow" --maxfail=1 --disable-warnings
uv run ty check ./src/r2x_reeds/

License

BSD 3-Clause. See LICENSE.txt.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

r2x_reeds-0.8.0.tar.gz (74.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

r2x_reeds-0.8.0-py3-none-any.whl (89.3 kB view details)

Uploaded Python 3

File details

Details for the file r2x_reeds-0.8.0.tar.gz.

File metadata

  • Download URL: r2x_reeds-0.8.0.tar.gz
  • Upload date:
  • Size: 74.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for r2x_reeds-0.8.0.tar.gz
Algorithm Hash digest
SHA256 f32d027d6e3159b91f4b118a9cb7cce1d27c297c91c8d51bf7fb608307224960
MD5 5d0e8d3ddbf66894958cbc6cbba87d6c
BLAKE2b-256 05762cbd911f08fa85e9e001dbbc7fd2d9dd68a6f6f7b26a480c4d78454eec9f

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_reeds-0.8.0.tar.gz:

Publisher: release.yaml on NatLabRockies/r2x-reeds

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file r2x_reeds-0.8.0-py3-none-any.whl.

File metadata

  • Download URL: r2x_reeds-0.8.0-py3-none-any.whl
  • Upload date:
  • Size: 89.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for r2x_reeds-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d2f73f17936ace794731cf4e77bfdd875cda43169f1671f2769dafa2af63a079
MD5 4f192a27ae749e719094374fb69f5a71
BLAKE2b-256 ffb7af529fcdeac3f87f8c40e41dff937a26421293fb049eab8446f3718fc4ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for r2x_reeds-0.8.0-py3-none-any.whl:

Publisher: release.yaml on NatLabRockies/r2x-reeds

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.8.0 This release

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.6

2 files

0.3.5

2 files

0.3.4

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page