Skip to content

Commit 161bcc9

Browse files
pesapmicahpwjarry7Jarrad Wrightmcllerena
committed
feat!: v2.0.0 (#187)
BREAKING CHANGE: Replace monolithic parser/exporter with plugin architecture. - Introduce R2X Plugin Management System with discoverable plugin configs - Restructure into four independent packages under packages/: r2x-reeds-to-sienna, r2x-reeds-to-plexos, r2x-sienna-to-plexos, r2x-plexos-to-sienna - Extract parsing/exporting into separate model plugins, translations are now pure mapping logic - Overhaul CI/CD with per-package release-please, dependabot, auto-labeler, and commit linting - Add taplo (TOML linting), ty (type checking), and updated pre-commit hooks - Expand test coverage across all translation packages (getters, rules, utilities) - Fix min stable level zeroing, duplicated arcs, time series store, and template injection bugs - Fix smoke test to build all workspace packages locally for dependency resolution - Rewrite documentation to match new framework style and update README --------- Signed-off-by: pesap <pesap@users.noreply.github.com> Signed-off-by: Kinshuk Panda <kinshukpanda@gmail.com> Signed-off-by: Marck Llerena V. <140716266+mcllerena@users.noreply.github.com> Co-authored-by: Micah Webb <6476273+micahpw@users.noreply.github.com> Co-authored-by: Jarrad Wright <jarry7@gmail.com> Co-authored-by: Jarrad Wright <jwright2@nrel.gov> Co-authored-by: mcllerena <marckcode@gmail.com> Co-authored-by: Marck Llerena V <140716266+mcllerena@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Kinshuk Panda <kinshukpanda@gmail.com> Co-authored-by: Micah Webb <webbmp91@gmail.com> Co-authored-by: Srihari Sundar <hari.sundar@nrel.gov> Co-authored-by: mvelasqu <marck.velasquez@nrel.gov>
1 parent 0f938e3 commit 161bcc9

File tree

321 files changed

+524793
-1087770
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+524793
-1087770
lines changed
Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: Setup uv environment
2+
description: Restore uv cache, install Python and uv, and optionally sync dependencies.
3+
4+
inputs:
5+
python-version:
6+
description: Python version to install (for matrix jobs). Leave empty to use python-version-file.
7+
required: false
8+
default: ""
9+
python-version-file:
10+
description: File that defines the Python version when python-version is not set.
11+
required: false
12+
default: "pyproject.toml"
13+
uv-version:
14+
description: uv version to install. No default; callers must pass this explicitly.
15+
required: true
16+
lockfile-path:
17+
description: File(s) hashed for uv cache key.
18+
required: false
19+
default: "uv.lock"
20+
install-python:
21+
description: Whether to install Python.
22+
required: false
23+
default: "true"
24+
sync-dependencies:
25+
description: Whether to run uv sync.
26+
required: false
27+
default: "true"
28+
sync-args:
29+
description: Arguments passed to uv sync.
30+
required: false
31+
default: "--all-groups"
32+
save-uv-cache:
33+
description: Whether to save uv cache updates.
34+
required: false
35+
default: "true"
36+
37+
runs:
38+
using: composite
39+
steps:
40+
- name: Restore uv cache
41+
id: uv-cache-restore
42+
uses: actions/cache/restore@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
43+
with:
44+
path: ${{ github.workspace }}/.uv-cache
45+
key: ${{ runner.os }}-uv-${{ inputs.uv-version }}-py${{ inputs.python-version || 'from-file' }}-${{ hashFiles(inputs.lockfile-path) }}
46+
restore-keys: |
47+
${{ runner.os }}-uv-${{ inputs.uv-version }}-py${{ inputs.python-version || 'from-file' }}-
48+
${{ runner.os }}-uv-${{ inputs.uv-version }}-
49+
50+
- name: Set up Python (explicit version)
51+
if: ${{ inputs.install-python == 'true' && inputs.python-version != '' }}
52+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
53+
with:
54+
python-version: ${{ inputs.python-version }}
55+
56+
- name: Set up Python (from file)
57+
if: ${{ inputs.install-python == 'true' && inputs.python-version == '' }}
58+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
59+
with:
60+
python-version-file: ${{ inputs.python-version-file }}
61+
62+
- name: Install uv
63+
uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7
64+
env:
65+
UV_CACHE_DIR: ${{ github.workspace }}/.uv-cache
66+
with:
67+
version: ${{ inputs.uv-version }}
68+
enable-cache: false
69+
70+
- name: Sync dependencies
71+
if: ${{ inputs.sync-dependencies == 'true' }}
72+
shell: bash
73+
env:
74+
UV_CACHE_DIR: ${{ github.workspace }}/.uv-cache
75+
SYNC_ARGS: ${{ inputs.sync-args }}
76+
run: uv sync $SYNC_ARGS
77+
78+
- name: Save uv cache
79+
if: ${{ inputs.save-uv-cache == 'true' && steps.uv-cache-restore.outputs.cache-hit != 'true' }}
80+
uses: actions/cache/save@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5
81+
with:
82+
path: ${{ github.workspace }}/.uv-cache
83+
key: ${{ runner.os }}-uv-${{ inputs.uv-version }}-py${{ inputs.python-version || 'from-file' }}-${{ hashFiles(inputs.lockfile-path) }}

.github/dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: "uv"
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
cooldown:
9+
default-days: 7
10+
open-pull-requests-limit: 2
11+
commit-message:
12+
prefix: "build"
13+
include: "scope"
14+
rebase-strategy: "auto"
15+
- package-ecosystem: github-actions
16+
directory: /
17+
commit-message:
18+
prefix: "build"
19+
include: "scope"
20+
rebase-strategy: "auto"
21+
schedule:
22+
interval: "weekly"
23+
cooldown:
24+
default-days: 7

.github/labeler.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
dependencies:
2+
- changed-files:
3+
- any-glob-to-any-file:
4+
- "uv.lock"
5+
- "pyproject.toml"
6+
- "packages/*/pyproject.toml"
7+
8+
github_actions:
9+
- changed-files:
10+
- any-glob-to-any-file: ".github/**"
11+
12+
docs:
13+
- changed-files:
14+
- any-glob-to-any-file:
15+
- "**/*.md"
16+
- "docs/**"
17+
18+
release:
19+
- changed-files:
20+
- any-glob-to-any-file:
21+
- ".github/workflows/release.yaml"
22+
- "docs/source/CHANGELOG.md"
23+
- "docs/source/release_notes.md"
24+
25+
tests:
26+
- changed-files:
27+
- any-glob-to-any-file:
28+
- "tests/**"
29+
- "packages/**/tests/**"
30+
31+
r2x:
32+
- changed-files:
33+
- any-glob-to-any-file:
34+
- "src/**"
35+
- "pyproject.toml"
36+
37+
r2x_plexos_to_sienna:
38+
- changed-files:
39+
- any-glob-to-any-file: "packages/r2x-plexos-to-sienna/**"
40+
41+
r2x_reeds_to_plexos:
42+
- changed-files:
43+
- any-glob-to-any-file: "packages/r2x-reeds-to-plexos/**"
44+
45+
r2x_reeds_to_sienna:
46+
- changed-files:
47+
- any-glob-to-any-file: "packages/r2x-reeds-to-sienna/**"
48+
49+
r2x_sienna_to_plexos:
50+
- changed-files:
51+
- any-glob-to-any-file: "packages/r2x-sienna-to-plexos/**"

.github/workflows/CI.yaml

Lines changed: 0 additions & 100 deletions
This file was deleted.

0 commit comments

Comments
 (0)