From 9cdb7626c009c5765d7099609402eb9db3cfab09 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Mon, 20 Apr 2026 16:00:25 -0600 Subject: [PATCH 1/7] Upgrading PRAS and Julia dependencies, moving Julia from conda environment to juliaup installation based installation on Linux and MacOS, and updating to Julia 1.12+. --- .github/workflows/cache.yaml | 12 ++-- .github/workflows/python-app.yaml | 59 +++++----------- Project.toml | 9 ++- README.md | 9 +-- docs/source/setup.md | 114 ++++++++++++++++++++++-------- environment.yml | 6 -- instantiate.jl | 2 - reeds2pras/Project.toml | 26 ------- reeds2pras/README.md | 3 +- runbatch.py | 1 + 10 files changed, 123 insertions(+), 118 deletions(-) delete mode 100644 reeds2pras/Project.toml diff --git a/.github/workflows/cache.yaml b/.github/workflows/cache.yaml index aec36234..ca456923 100644 --- a/.github/workflows/cache.yaml +++ b/.github/workflows/cache.yaml @@ -21,15 +21,15 @@ env: jobs: python-cache: name: Python Cache - runs-on: ubuntu-latest + runs-on: reeds-runners permissions: contents: read actions: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 + - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 with: environment-file: environment.yml cache-environment: true @@ -40,12 +40,12 @@ jobs: julia-cache: name: Julia Cache - runs-on: ubuntu-latest + runs-on: reeds-runners permissions: contents: read actions: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false @@ -58,6 +58,8 @@ jobs: restore-keys: julia-${{ runner.os }}- - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 + with: + version: '1.12.1' env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt diff --git a/.github/workflows/python-app.yaml b/.github/workflows/python-app.yaml index cba98b27..8543d997 100644 --- a/.github/workflows/python-app.yaml +++ b/.github/workflows/python-app.yaml @@ -29,9 +29,9 @@ env: jobs: julia-setup: name: "Julia environment" - runs-on: ubuntu-latest + runs-on: reeds-runners steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false @@ -43,6 +43,8 @@ jobs: restore-keys: julia-${{ runner.os }}- - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 + with: + version: '1.12.1' env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt @@ -50,15 +52,15 @@ jobs: python-setup: name: "Python environment" - runs-on: ubuntu-latest + runs-on: reeds-runners permissions: contents: read actions: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: persist-credentials: false - - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 + - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 with: environment-file: environment.yml cache-environment: true @@ -69,12 +71,12 @@ jobs: name: "Get Zenodo files" needs: - python-setup - runs-on: ubuntu-latest + runs-on: reeds-runners permissions: contents: read actions: write steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: fetch-depth: 1 lfs: false @@ -103,7 +105,7 @@ jobs: zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}- zenodo-files- - - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 + - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 id: mamba with: environment-file: environment.yml @@ -116,7 +118,7 @@ jobs: run: python .github/scripts/download_test_zenodo_files.py run-ReEDS: - runs-on: ubuntu-latest + runs-on: reeds-runners needs: - julia-setup - python-setup @@ -138,7 +140,7 @@ jobs: env: batch: test steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: fetch-depth: 1 lfs: false @@ -178,14 +180,12 @@ jobs: inputs/remote/ inputs/profiles_cf/ inputs/profiles_demand/ - inputs/profiles_dr/ - inputs/profiles_temperature/ key: zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}-v1 restore-keys: | zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}- zenodo-files- - - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 + - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 id: mamba with: environment-file: environment.yml @@ -198,6 +198,8 @@ jobs: - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 id: setup-julia + with: + version: '1.12.1' env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt @@ -252,7 +254,7 @@ jobs: run: python -m pytest tests/test_outputs.py --casepath "$GITHUB_WORKSPACE/runs/${batch}_${SCENARIO}" - name: Save ReEDS run - uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 + uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3 with: name: ${{ matrix.scenario }} compression-level: 9 @@ -264,37 +266,10 @@ jobs: ${{ env.RUN_FOLDER }}/outputs/**/*.csv ${{ env.RUN_FOLDER }}/outputs/**/*.h5 - run-R2X: - runs-on: ubuntu-latest - needs: - - run-ReEDS - permissions: - contents: read - actions: write # required for setup-uv cache save in run-R2X - continue-on-error: true - strategy: - matrix: - include: - - scenario: github_Pacific - solve-year: 2029 - - scenario: github_Everything - solve-year: 2060 - - scenario: github_MA_county_CC - solve-year: 2026 - - steps: - - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 - with: - persist-credentials: false - - name: Retrieve ReEDS runs for ${{ matrix.scenario }} - uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 - with: - name: ${{ matrix.scenario }} - path: ${{ format('{0}-{1}', matrix.scenario, matrix.solve-year) }} - name: R2X compatibility uses: ./.github/actions/r2x-check id: r2x-check with: - reeds-run-path: ${{ format('{0}-{1}', matrix.scenario, matrix.solve-year) }} + reeds-run-path: ${{ env.RUN_FOLDER }} scenario: ${{ matrix.scenario }} solve-year: ${{ matrix.solve-year }} diff --git a/Project.toml b/Project.toml index 6264d271..a64aeb34 100644 --- a/Project.toml +++ b/Project.toml @@ -9,6 +9,8 @@ JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" LoggingExtras = "e6f89c97-d47a-5376-807f-9c37f3926c36" PRAS = "05348d26-1c52-11e9-35e3-9d51842d34b9" +PRASCore = "c5c32b99-e7c3-4530-a685-6f76e19f7fe2" +PRASFiles = "a2806276-6d43-4ef5-91c0-491704cd7cf1" Random123 = "74087812-796a-5b5d-8853-05524746bad3" Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" @@ -21,5 +23,8 @@ HDF5 = "0.16.15" InlineStrings = "1.4.0" JSON = "0.21.4" LoggingExtras = "1.0.3" -PRAS = "0.6.3" -TimeZones = "~1.13.0" +PRAS = "~0.8.0" +PRASCore = "~0.8.0" +PRASFiles = "~0.8.0" +TimeZones = "^1.13.0" +julia = "=1.12.1" diff --git a/README.md b/README.md index 919dd5eb..f18169ad 100644 --- a/README.md +++ b/README.md @@ -13,9 +13,11 @@ This GitHub repository contains the source code for NLR's ReEDS model. The ReEDS model source code is available at no cost from the National Laboratory of the Rockies. -The ReEDS model can be downloaded or cloned from [https://github.com/ReEDS-Model/ReEDS](https://github.com/ReEDS-Model/ReEDS). +The ReEDS model can be downloaded or cloned from [https://github.com/NatLabRockies/ReEDS-2.0](https://github.com/NatLabRockies/ReEDS-2.0). -**For more information about the model, see the [open source ReEDS-2.0 Documentation](https://reeds-model.github.io/ReEDS).** +**For more information about the model, see the [ReEDS-2.0 Documentation](https://pages.github.nrel.gov/ReEDS/ReEDS-2.0).** + + ReEDS training videos are available on the [NLR Learning YouTube channel](https://youtube.com/playlist?list=PLmIn8Hncs7bG558qNlmz2QbKhsv7QCKiC&si=NgGBaL_MxNcYiIEX). @@ -48,12 +50,11 @@ A step-by-step guide for getting started with ReEDS is available [here](https:// 2. Obtain a combined GAMS/CPLEX license: 1. Small ReEDS systems have been solved using the open-source [COIN-OR](https://www.coin-or.org/) solver as described [here](https://www.nrel.gov/docs/fy21osti/77907.pdf), but this capability is not actively maintained. 2. Other commercial solvers have also been successfully applied to ReEDS, but setup details and some solver tuning are specific to the CPLEX solver. -3. Install Julia: +3. Install Julia (recommended version is `1.12.1`) using Juliaup: 4. Open a command-line interface and set up your environments: 1. Clone the ReEDS repository: `git clone git@github.com:NatLabRockies/ReEDS-2.0.git` or `git clone https://github.com/NatLabRockies/ReEDS-2.0.git` 2. Navigate to the cloned repository 3. Create the `reeds2` [conda environment](https://docs.conda.io/projects/conda/en/stable/user-guide/tasks/manage-environments.html): `conda env create -f environment.yml` - 1. Linux and Mac users can use the environment.yml directly. Windows users need to comment out the `- julia=1.8` line from the environment.yml file before creating the environment and use the version of Julia installed above. 4. Activate the `reeds2` environment: `conda activate reeds2` 5. Instantiate the Julia environment: `julia --project=. instantiate.jl` 6. (Optional) Several large data files are hosted remotely. diff --git a/docs/source/setup.md b/docs/source/setup.md index 72996f18..b6b39cff 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -171,60 +171,116 @@ Screenshot of GitHub links to clone the ReEDS repository or download ZIP of the ``` ### ReEDS2PRAS, Julia, and Stress Periods Setup -Julia will need to be installed and set up to successfully run the model since ReEDS uses stress periods by default. To get Julia and stress periods set up: +Julia will need to be installed and set up to successfully run the model since ReEDS uses stress periods by default. The recommended way to install Julia is via **juliaup**, the official Julia version manager, which makes it easy to install and switch between specific Julia versions. Julia `1.12.1` is the currently tested version across all platforms. -1. Install Julia - 1. [max/linux]: Julia is included in the conda environment so no additional installation is needed - 2. [windows]: install Julia from [https://julialang.org/downloads/](https://julialang.org/downloads/) +#### Step 1: Install juliaup -2. Navigate to the ReEDS-2.0 directory from the command line, then run `julia --project=. instantiate.jl` +````{tab-set} +```{tab-item} Windows +Install juliaup using `winget` from a terminal (Command Prompt or PowerShell): -#### Troubleshooting Issues with Julia Setup -When setting up julia on Windows, you may run into some issues when running `julia --project=. instantiate.jl`. The following steps can be followed to help resolve issues and get julia set up successfully: -1. Manually install [Random123](https://github.com/JuliaRandom/Random123.jl) + winget install --id Julialang.juliaup + +Alternatively, install from the [Microsoft Store](https://www.microsoft.com/store/apps/9NJNWW8PVKMN). +``` + +```{tab-item} macOS / Linux +Run the following command from a terminal: + + curl -fsSL https://install.julialang.org | sh + +Follow the on-screen prompts. When installation is complete, open a new terminal session (or run `source ~/.bashrc` / `source ~/.zshrc`) so that `juliaup` is available on your PATH. + +macOS and Linux users can also install via Homebrew: + + brew install juliaup +``` +```` + +Verify the installation was successful: +``` +juliaup status +``` + +#### Step 2: Install and pin the tested Julia version + +Install Julia `1.12.1` and set it as the default: +``` +juliaup add 1.12.1 +juliaup default 1.12.1 +``` + +Confirm the active version: +``` +julia --version +``` + +You should see `julia version 1.12.1`. + +#### Step 3: Instantiate the Julia environment + +Navigate to the ReEDS-2.0 directory from the command line, then run: +``` +julia --project=. instantiate.jl +``` + +#### Troubleshooting Issues with Julia Setup + +**Windows** + +When setting up Julia on Windows, you may run into some issues when running `julia --project=. instantiate.jl`. The following steps can be followed to help resolve issues and get Julia set up successfully: + +1. Manually install [Random123](https://github.com/JuliaRandom/Random123.jl) 2. Re-run `julia --project=. instantiate.jl` -If that doesn't resolve the issue, the following may help: -1. If you previously installed julia, uninstall it: `winget uninstall julia` +If that doesn't resolve the issue, try a clean install using juliaup: -2. Manually install [Julia 1.8.5](https://julialang.org/downloads/oldreleases/#:~:text=ea85e0489c36324c4da62163aa1b82fcf2f52f72d173ee7dd213a3a92992cab7-,Windows,-x86_64) +1. Remove any previously installed Julia version managed by juliaup: `juliaup remove 1.12.1` -3. Add the julia bin path to your environment PATH variable +1. If Julia was installed outside of juliaup, uninstall it first: `winget uninstall julia` -4. Install [MinGW](https://www.mingw-w64.org/downloads/) +1. Re-install Julia `1.12.1` via juliaup: `juliaup add 1.12.1 && juliaup default 1.12.1` -5. Open the julia interactive command line: `julia` +1. Open the Julia interactive command line: `julia` -6. Enter the julia package manager by pressing `]`, then run the following commands: - * `add Random123` +1. Enter the Julia package manager by pressing `]`, then run the following commands: + * `add Random123` * `registry add https://github.com/JuliaRegistries/General.git` - * `registry add https://github.com/NatLabRockies/JuliaRegistries.git` * `instantiate` -7. Leave the package manager by pressing backspace or Ctrl+C +1. Leave the package manager by pressing Backspace or Ctrl+C -8. Run the following commands to finish setup: +1. Run the following commands to finish setup: * `import PRAS` * `import TimeZones` * `TimeZones.build()` -9. You can then leave the julia command line by typing `exit()` +1. You can then leave the Julia command line by typing `exit()` -**If you're experiencing issues on Mac, a possible solution is:** -1. Update the version of julia +**macOS / Linux** -2. Create the 'reeds2' conda environment with the environment.yml file +If you experience issues, try the following: -3. Run `julia` from the terminal to open the interactive command line - -4. Run `import Pkg; Pkg.add("PRAS")` +1. Update to a known-good Julia version via juliaup: + ``` + juliaup add 1.12.1 + juliaup default 1.12.1 + ``` -5. Run `Pkg.add("TimeZones")` +2. Run `julia` from the terminal to open the interactive command line -6. Exit julia with the command `exit()`, then run `julia instantiate.jl` +3. Run: + ```julia + import Pkg + Pkg.add("PRAS") + Pkg.add("TimeZones") + ``` -7. Manually move the Manifest.toml file from the julia environment (~/miniconda3/envs/reeds2/share/julia/environments/reeds2/Manifest.toml) to the ReEDS repo +4. Exit Julia with `exit()`, then re-run: + ``` + julia --project=. instantiate.jl + ``` ## Running ReEDS diff --git a/environment.yml b/environment.yml index 53f45d73..c0161fcb 100644 --- a/environment.yml +++ b/environment.yml @@ -20,12 +20,6 @@ dependencies: - scikit-learn=1.2 - scipy=1.11 - tqdm=4.65 - ## vvv Keep julia here if you're installing on the HPC. - ## vvv If you're installing on a local machine, you can comment out - ## vvv julia and install directly from https://julialang.org/downloads/. - ## vvv If you're on Windows, you MUST comment out julia and install directly. - - julia=1.8 - ## ^^^ ## vvv The next packages are optional for default settings and may ## vvv be excluded if you're having trouble building the environment. - ipykernel=6.25 # for interactive python in VS Code diff --git a/instantiate.jl b/instantiate.jl index 40bc5b2d..55e7eefb 100644 --- a/instantiate.jl +++ b/instantiate.jl @@ -1,9 +1,7 @@ ENV["JULIA_SSL_CA_ROOTS_PATH"] = "" -ENV["JULIA_PKG_SERVER_REGISTRY_PREFERENCE"] = "eager" import Pkg Pkg.Registry.update() Pkg.Registry.add("General") -Pkg.Registry.add(Pkg.RegistrySpec(url="https://github.com/NatLabRockies/JuliaRegistry.git")) Pkg.instantiate() Pkg.add("Random123") diff --git a/reeds2pras/Project.toml b/reeds2pras/Project.toml deleted file mode 100644 index ab41a55e..00000000 --- a/reeds2pras/Project.toml +++ /dev/null @@ -1,26 +0,0 @@ -name = "ReEDS2PRAS" -uuid = "c1db39dc-6a9d-11ed-0c9a-05c3ea2a1475" -version = "2025.2.0" - -[deps] -CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" -DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" -Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" -HDF5 = "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f" -InlineStrings = "842dd82b-1e85-43dc-bf29-5d0ee9dffc48" -JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" -PRAS = "05348d26-1c52-11e9-35e3-9d51842d34b9" -Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" -TimeZones = "f269a46b-ccf7-5d73-abea-4c690281aa53" - -[compat] -CSV = "~0.10" -DataFrames = "~1.7" -Dates = "1" -HDF5 = "~0.17" -InlineStrings = "~1.4" -JSON = "~0.21" -PRAS = "~0.7" -Statistics = "~1.11" -TimeZones = "~1.21" -julia = "^1.11" diff --git a/reeds2pras/README.md b/reeds2pras/README.md index c0ed00a9..daa5ddd5 100644 --- a/reeds2pras/README.md +++ b/reeds2pras/README.md @@ -7,11 +7,10 @@ The purpose of ReEDS2PRAS is to translate a ReEDS system into a PRAS system read ### Julia Installation [Juliaup](https://github.com/JuliaLang/juliaup) is a cross platform installer of the Julia programming language. -Detailed instructions to install Julia on different platforms are available from [Juliaup Installation Instructions](https://github.com/JuliaLang/juliaup?tab=readme-ov-file#installation). +Detailed instructions to install Julia on different platforms are available from [Juliaup Installation Instructions](https://github.com/JuliaLang/juliaup?tab=readme-ov-file#installation). Julia `1.12.1` is the currently tested and recommended version across all platforms. #### Mac/Linux -Julia is included in the conda environment, so Julia does not need to be installed separately. If you wish to install it for testing, you can run: ```shell diff --git a/runbatch.py b/runbatch.py index 287d4668..0e1e4557 100644 --- a/runbatch.py +++ b/runbatch.py @@ -1333,6 +1333,7 @@ def write_batch_script( OPATH.writelines("module load anaconda3 \n") OPATH.writelines("module use /nopt/nrel/apps/software/gams/modulefiles \n") OPATH.writelines("module load gams \n") + OPATH.writelines("module load julia/1.12.1 \n") else: OPATH.writelines("module load conda \n") OPATH.writelines("module load gams \n") From 2d4828365d3e3023f03a39b16f2b924eeb0d8713 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Mon, 20 Apr 2026 16:11:44 -0600 Subject: [PATCH 2/7] Modify workflows to use new workflows from repo but include Julia forcing changes --- .github/workflows/cache.yaml | 10 +++--- .github/workflows/python-app.yaml | 55 +++++++++++++++++++++++-------- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cache.yaml b/.github/workflows/cache.yaml index ca456923..06d19fbd 100644 --- a/.github/workflows/cache.yaml +++ b/.github/workflows/cache.yaml @@ -21,15 +21,15 @@ env: jobs: python-cache: name: Python Cache - runs-on: reeds-runners + runs-on: ubuntu-latest permissions: contents: read actions: write steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 + - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 with: environment-file: environment.yml cache-environment: true @@ -40,12 +40,12 @@ jobs: julia-cache: name: Julia Cache - runs-on: reeds-runners + runs-on: ubuntu-latest permissions: contents: read actions: write steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false diff --git a/.github/workflows/python-app.yaml b/.github/workflows/python-app.yaml index 8543d997..6b72011a 100644 --- a/.github/workflows/python-app.yaml +++ b/.github/workflows/python-app.yaml @@ -29,9 +29,9 @@ env: jobs: julia-setup: name: "Julia environment" - runs-on: reeds-runners + runs-on: ubuntu-latest steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false @@ -52,15 +52,15 @@ jobs: python-setup: name: "Python environment" - runs-on: reeds-runners + runs-on: ubuntu-latest permissions: contents: read actions: write steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: persist-credentials: false - - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 + - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 with: environment-file: environment.yml cache-environment: true @@ -71,12 +71,12 @@ jobs: name: "Get Zenodo files" needs: - python-setup - runs-on: reeds-runners + runs-on: ubuntu-latest permissions: contents: read actions: write steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 1 lfs: false @@ -105,7 +105,7 @@ jobs: zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}- zenodo-files- - - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 + - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 id: mamba with: environment-file: environment.yml @@ -118,7 +118,7 @@ jobs: run: python .github/scripts/download_test_zenodo_files.py run-ReEDS: - runs-on: reeds-runners + runs-on: ubuntu-latest needs: - julia-setup - python-setup @@ -140,7 +140,7 @@ jobs: env: batch: test steps: - - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 1 lfs: false @@ -180,12 +180,14 @@ jobs: inputs/remote/ inputs/profiles_cf/ inputs/profiles_demand/ + inputs/profiles_dr/ + inputs/profiles_temperature/ key: zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}-v1 restore-keys: | zenodo-files-${{ steps.zenodo-files.outputs.files-hash }}- zenodo-files- - - uses: mamba-org/setup-micromamba@4b9113af4fba0e9e1124b252dd6497a419e7396d # v1 + - uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2 id: mamba with: environment-file: environment.yml @@ -254,7 +256,7 @@ jobs: run: python -m pytest tests/test_outputs.py --casepath "$GITHUB_WORKSPACE/runs/${batch}_${SCENARIO}" - name: Save ReEDS run - uses: actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5 # v3 + uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 with: name: ${{ matrix.scenario }} compression-level: 9 @@ -266,10 +268,37 @@ jobs: ${{ env.RUN_FOLDER }}/outputs/**/*.csv ${{ env.RUN_FOLDER }}/outputs/**/*.h5 + run-R2X: + runs-on: ubuntu-latest + needs: + - run-ReEDS + permissions: + contents: read + actions: write # required for setup-uv cache save in run-R2X + continue-on-error: true + strategy: + matrix: + include: + - scenario: github_Pacific + solve-year: 2029 + - scenario: github_Everything + solve-year: 2060 + - scenario: github_MA_county_CC + solve-year: 2026 + + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + persist-credentials: false + - name: Retrieve ReEDS runs for ${{ matrix.scenario }} + uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7 + with: + name: ${{ matrix.scenario }} + path: ${{ format('{0}-{1}', matrix.scenario, matrix.solve-year) }} - name: R2X compatibility uses: ./.github/actions/r2x-check id: r2x-check with: - reeds-run-path: ${{ env.RUN_FOLDER }} + reeds-run-path: ${{ format('{0}-{1}', matrix.scenario, matrix.solve-year) }} scenario: ${{ matrix.scenario }} solve-year: ${{ matrix.solve-year }} From 941c3894d9f7d100e35f3e4caf2cbee4d79cd7a8 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Wed, 22 Apr 2026 14:54:38 -0600 Subject: [PATCH 3/7] Address PR comments --- .github/workflows/cache.yaml | 3 ++- .github/workflows/python-app.yaml | 5 +++-- docs/source/setup.md | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cache.yaml b/.github/workflows/cache.yaml index 06d19fbd..b44aa9f3 100644 --- a/.github/workflows/cache.yaml +++ b/.github/workflows/cache.yaml @@ -17,6 +17,7 @@ permissions: # on the other workflows that reutilize the Python environment env: CACHE_NUMBER: 1 + JULIA_VERSION: '1.12.1' jobs: python-cache: @@ -59,7 +60,7 @@ jobs: - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 with: - version: '1.12.1' + version: ${{ env.JULIA_VERSION }} env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt diff --git a/.github/workflows/python-app.yaml b/.github/workflows/python-app.yaml index 6b72011a..7e0b1c1a 100644 --- a/.github/workflows/python-app.yaml +++ b/.github/workflows/python-app.yaml @@ -24,6 +24,7 @@ defaults: env: CACHE_NUMBER: 1 + JULIA_VERSION: '1.12.1' REEDS_ENV_NAME: reeds2 jobs: @@ -44,7 +45,7 @@ jobs: - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 with: - version: '1.12.1' + version: ${{ env.JULIA_VERSION }} env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt @@ -201,7 +202,7 @@ jobs: - uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2 id: setup-julia with: - version: '1.12.1' + version: ${{ env.JULIA_VERSION }} env: NODE_EXTRA_CA_CERTS: /usr/local/share/ca-certificates/nrel_ca_chain.crt diff --git a/docs/source/setup.md b/docs/source/setup.md index b6b39cff..aa14cf15 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -230,6 +230,8 @@ julia --project=. instantiate.jl When setting up Julia on Windows, you may run into some issues when running `julia --project=. instantiate.jl`. The following steps can be followed to help resolve issues and get Julia set up successfully: +1. If you've used another version of Julia (from the reeds2 conda environment or a previous installation), you may get errors about conflicting manifest. To get past this, you can delete the `Manifest.toml` file with `rm Manifest.toml` (on Unix systems) or `del Manifest.toml` (on Windows systems). + 1. Manually install [Random123](https://github.com/JuliaRandom/Random123.jl) 2. Re-run `julia --project=. instantiate.jl` From 29e5e70e7679257fde7a4050611fa65bbdfba594 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Wed, 22 Apr 2026 17:11:58 -0600 Subject: [PATCH 4/7] Update README and setup.md with comment suggestions and links to new repo --- README.md | 30 ++++++++++++++---------------- docs/source/setup.md | 10 +++++----- 2 files changed, 19 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index f18169ad..b836371a 100644 --- a/README.md +++ b/README.md @@ -2,10 +2,10 @@ **Regional Energy Deployment System (ReEDS) Model** -[![CI](https://github.nrel.gov/ReEDS/ReEDS-2.0/actions/workflows/python-app.yaml/badge.svg)](https://github.nrel.gov/ReEDS/ReEDS-2.0/actions/workflows/python-app.yaml) -[![Documentation](https://img.shields.io/badge/Documentation-view%20online-0a7f5e?logo=readthedocs&logoColor=white&labelColor=555)](https://natlabrockies.github.io/ReEDS-2.0) +[![CI](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml/badge.svg)](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml) +[![Documentation](https://img.shields.io/badge/Documentation-view%20online-0a7f5e?logo=readthedocs&logoColor=white&labelColor=555)](https://reeds-model.github.io/ReEDS) ![Static Badge](https://img.shields.io/badge/python-3.11-blue) -![GitHub License](https://img.shields.io/github/license/NatLabRockies/ReEDS-2.0) +![GitHub License](https://img.shields.io/github/license/ReEDS-Model/ReEDS) [![DOI](https://zenodo.org/badge/189060033.svg)](https://doi.org/10.5281/zenodo.16943302)
@@ -13,11 +13,9 @@ This GitHub repository contains the source code for NLR's ReEDS model. The ReEDS model source code is available at no cost from the National Laboratory of the Rockies. -The ReEDS model can be downloaded or cloned from [https://github.com/NatLabRockies/ReEDS-2.0](https://github.com/NatLabRockies/ReEDS-2.0). +The ReEDS model can be downloaded or cloned from [https://github.com/ReEDS-Model/ReEDS](https://github.com/ReEDS-Model/ReEDS). -**For more information about the model, see the [ReEDS-2.0 Documentation](https://pages.github.nrel.gov/ReEDS/ReEDS-2.0).** - - +**For more information about the model, see the [ReEDS Documentation](https://reeds-model.github.io/ReEDS).** ReEDS training videos are available on the [NLR Learning YouTube channel](https://youtube.com/playlist?list=PLmIn8Hncs7bG558qNlmz2QbKhsv7QCKiC&si=NgGBaL_MxNcYiIEX). @@ -27,10 +25,10 @@ ReEDS training videos are available on the [NLR Learning YouTube channel](https: ## Introduction -[ReEDS](https://www.nrel.gov/analysis/reeds/) is a capacity planning and dispatch model for the U.S. electricity system. +[ReEDS](https://www.nlr.gov/analysis/reeds/) is a capacity planning and dispatch model for the U.S. electricity system. -As NLR's flagship long-term power sector model, ReEDS has served as the primary analytic tool for [many studies](https://natlabrockies.github.io/ReEDS-2.0/publications.html) of electricity sector research questions. -Example model results are available in the [Scenario Viewer](https://scenarioviewer.nrel.gov/). +As NLR's flagship long-term power sector model, ReEDS has served as the primary analytic tool for [many studies](https://reeds-model.github.io/ReEDS/publications.html) of electricity sector research questions. +Example model results are available in the [Scenario Viewer](https://scenarioviewer.nlr.gov/). @@ -42,24 +40,24 @@ Example model results are available in the [Scenario Viewer](https://scenariovie The ReEDS model is written in [Python](https://www.python.org/), [GAMS](https://www.gams.com/), and [Julia](https://julialang.org/). Python and Julia are free, open-source languages; GAMS requires a software license from the vendor. -A step-by-step guide for getting started with ReEDS is available [here](https://pages.github.nrel.gov/ReEDS/ReEDS-2.0/setup.html), and a quick-start guide for advanced users is outlined below. +A step-by-step guide for getting started with ReEDS is available [here](https://reeds-model.github.io/ReEDS/setup.html), and a quick-start guide for advanced users is outlined below. 1. Install Python using the Anaconda Distribution: 2. Set up GAMS: 1. Install GAMS: 2. Obtain a combined GAMS/CPLEX license: - 1. Small ReEDS systems have been solved using the open-source [COIN-OR](https://www.coin-or.org/) solver as described [here](https://www.nrel.gov/docs/fy21osti/77907.pdf), but this capability is not actively maintained. + 1. Small ReEDS systems have been solved using the open-source [COIN-OR](https://www.coin-or.org/) solver as described [here](https://www.nlr.gov/docs/fy21osti/77907.pdf), but this capability is not actively maintained. 2. Other commercial solvers have also been successfully applied to ReEDS, but setup details and some solver tuning are specific to the CPLEX solver. -3. Install Julia (recommended version is `1.12.1`) using Juliaup: +3. Install Julia (recommended version is `1.12.1`). Explicit instructions for Julia in ReEDS can be found in the [documentation](https://reeds-model.github.io/ReEDS/setup.html#https://reeds-model.github.io/ReEDS/setup.html#reeds2pras-julia-and-stress-periods-setup). 4. Open a command-line interface and set up your environments: - 1. Clone the ReEDS repository: `git clone git@github.com:NatLabRockies/ReEDS-2.0.git` or `git clone https://github.com/NatLabRockies/ReEDS-2.0.git` + 1. Clone the ReEDS repository: `git clone git@github.com:ReEDS-Model/ReEDS.git` or `git clone https://github.com/ReEDS-Model/ReEDS.git` 2. Navigate to the cloned repository 3. Create the `reeds2` [conda environment](https://docs.conda.io/projects/conda/en/stable/user-guide/tasks/manage-environments.html): `conda env create -f environment.yml` 4. Activate the `reeds2` environment: `conda activate reeds2` 5. Instantiate the Julia environment: `julia --project=. instantiate.jl` 6. (Optional) Several large data files are hosted remotely. These files are downloaded automatically as needed during a ReEDS run, but to finish all the internet-requiring steps up front, you can download them all by running `python reeds/remote.py`. - Additional details on remote files and other topics can be found in the [user guide](https://pages.github.nrel.gov/ReEDS/ReEDS-2.0/user_guide.html#large-input-files). + Additional details on remote files and other topics can be found in the [user guide](https://reeds-model.github.io/ReEDS/user_guide.html#large-input-files). 5. Run ReEDS on a test case from the root of the cloned repository: 1. For interactive setup: `python runbatch.py` 2. For one-line operation: `python runbatch.py -b v20250314_main -c test`. @@ -73,4 +71,4 @@ A step-by-step guide for getting started with ReEDS is available [here](https:// ## Contact Us -If you have comments and/or questions, you can contact the ReEDS team at [ReEDS.Inquiries@nlr.gov](mailto:ReEDS.Inquiries@nlr.gov) or post a question on the [discussion pages](https://github.com/NatLabRockies/ReEDS-2.0/discussions). +If you have comments and/or questions, you can contact the ReEDS team at [ReEDS.Inquiries@nlr.gov](mailto:ReEDS.Inquiries@nlr.gov) or post a question on the [discussion pages](https://github.com/ReEDS-Model/ReEDS/discussions). diff --git a/docs/source/setup.md b/docs/source/setup.md index aa14cf15..ad017a7d 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -1,5 +1,5 @@ # Getting Started -The ReEDS model source code is available at no cost from the National Laboratory of the Rockies (NLR). The ReEDS model can be downloaded or cloned from [https://github.com/NatLabRockies/ReEDS-2.0](https://github.com/NatLabRockies/ReEDS-2.0). +The ReEDS model source code is available at no cost from the National Laboratory of the Rockies (NLR). The ReEDS model can be downloaded or cloned from [https://github.com/ReEDS-Model/ReEDS](https://github.com/ReEDS-Model/ReEDS). New users may also wish to start with some ReEDS training videos which are available on the [NLR YouTube channel](https://youtu.be/aGj3Jnspk9M?si=iqCRNn5MbGZc8ZIO). @@ -153,7 +153,7 @@ Screenshot of a test of GAMS from the terminal window ``` ### Repository Setup -The ReEDS source code is hosted on GitHub: [https://github.com/NatLabRockies/ReEDS-2.0](https://github.com/NatLabRockies/ReEDS-2.0) +The ReEDS source code is hosted on GitHub: [https://github.com/ReEDS-Model/ReEDS-2.0](https://github.com/ReEDS-Model/ReEDS-2.0) 1. Install Git Large File Storage, instructions can be found here: [Installing Git Large File Storage](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) @@ -331,12 +331,12 @@ NLR has a YouTube channel that contains tutorial videos for ReEDS. The following If you'd like practice with running a specific ReEDS scenario, you can walk through the [ReEDS Training Homework](reeds_training_homework). Additional resources and learning: -* [General information on ReEDS](https://www.nrel.gov/analysis/reeds/) +* [General information on ReEDS](https://www.nlr.gov/analysis/reeds/) * [ReEDS POC list](https://nrel.sharepoint.com/:w:/s/ReEDS/ES6GQTyzXo1DnnCPlnAhg5QB8cPY--_01HkQkiOnrPskxw?e=flEAtY) -* [GitHub README](https://github.nrel.gov/ReEDS/ReEDS-2.0/blob/main/README.md) +* [GitHub README](https://github.com/ReEDS-Model/ReEDS/blob/main/README.md) * [YouTube tutorials](https://www.youtube.com/playlist?list=PLmIn8Hncs7bG558qNlmz2QbKhsv7QCKiC) * [GAMS language information](https://www.gams.com/latest/docs/UG_MAIN.html#UG_Language_Environment) -* [Tips and tricks for the bash shell](https://nrel-my.sharepoint.com/:p:/r/personal/ssundar_nrel_gov/Documents/Microsoft%20Teams%20Chat%20Files/02062024_what_the_shell.pptx?d=wa7aea3514f814d51924bf2dfa737d414&csf=1&web=1&e=qr1YuP) +* [Tips and tricks for the bash shell](https://nlr-my.sharepoint.com/:p:/r/personal/ssundar_nrel_gov/Documents/Microsoft%20Teams%20Chat%20Files/02062024_what_the_shell.pptx?d=wa7aea3514f814d51924bf2dfa737d414&csf=1&web=1&e=qr1YuP) ### NLR Specific Setup See the [Internal ReEDS Documentation](https://nrel.sharepoint.com/:w:/s/ReEDS/Efathg8KjjtCkxW44vZpWQQBA2KsU3RadSsVauBMskEfUA?e=YaSIqc). Information on Yampa and HPC setup can be found there. From bb8bd11309fbe4fca0252b9851498fbfd6196455 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Wed, 22 Apr 2026 17:27:15 -0600 Subject: [PATCH 5/7] Show CI status of main only --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b836371a..1a439b5e 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ **Regional Energy Deployment System (ReEDS) Model** -[![CI](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml/badge.svg)](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml) +[![CI](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml/badge.svg?branch=main)](https://github.com/ReEDS-Model/ReEDS/actions/workflows/python-app.yaml) [![Documentation](https://img.shields.io/badge/Documentation-view%20online-0a7f5e?logo=readthedocs&logoColor=white&labelColor=555)](https://reeds-model.github.io/ReEDS) ![Static Badge](https://img.shields.io/badge/python-3.11-blue) ![GitHub License](https://img.shields.io/github/license/ReEDS-Model/ReEDS) From 2f4347dd0e1f43486d82ed83167c9aca5228f24a Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Wed, 22 Apr 2026 18:06:01 -0600 Subject: [PATCH 6/7] Add Patrick's installation suggestions and cleanup Co-authored-by: Patrick Brown <25125211+patrickbrown4@users.noreply.github.com> --- README.md | 6 +++++- docs/source/setup.md | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a439b5e..326b2021 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,11 @@ A step-by-step guide for getting started with ReEDS is available [here](https:// 2. Obtain a combined GAMS/CPLEX license: 1. Small ReEDS systems have been solved using the open-source [COIN-OR](https://www.coin-or.org/) solver as described [here](https://www.nlr.gov/docs/fy21osti/77907.pdf), but this capability is not actively maintained. 2. Other commercial solvers have also been successfully applied to ReEDS, but setup details and some solver tuning are specific to the CPLEX solver. -3. Install Julia (recommended version is `1.12.1`). Explicit instructions for Julia in ReEDS can be found in the [documentation](https://reeds-model.github.io/ReEDS/setup.html#https://reeds-model.github.io/ReEDS/setup.html#reeds2pras-julia-and-stress-periods-setup). +3. Install Julia version 1.12.1 as described in the [documentation](https://reeds-model.github.io/ReEDS/setup.html#reeds2pras-julia-and-stress-periods-setup): + 1. Follow the platform-dependent installation instructions at to install both `julia` and `juliaup` + 2. Specify version 1.12.1 by running: + 1. `juliaup add 1.12.1` + 2. `juliaup default 1.12.1` 4. Open a command-line interface and set up your environments: 1. Clone the ReEDS repository: `git clone git@github.com:ReEDS-Model/ReEDS.git` or `git clone https://github.com/ReEDS-Model/ReEDS.git` 2. Navigate to the cloned repository diff --git a/docs/source/setup.md b/docs/source/setup.md index ad017a7d..2b19ffe6 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -153,7 +153,7 @@ Screenshot of a test of GAMS from the terminal window ``` ### Repository Setup -The ReEDS source code is hosted on GitHub: [https://github.com/ReEDS-Model/ReEDS-2.0](https://github.com/ReEDS-Model/ReEDS-2.0) +The ReEDS source code is hosted on GitHub at . 1. Install Git Large File Storage, instructions can be found here: [Installing Git Large File Storage](https://docs.github.com/en/repositories/working-with-files/managing-large-files/installing-git-large-file-storage) @@ -219,7 +219,7 @@ You should see `julia version 1.12.1`. #### Step 3: Instantiate the Julia environment -Navigate to the ReEDS-2.0 directory from the command line, then run: +Navigate to the ReEDS directory from the command line, then run: ``` julia --project=. instantiate.jl ``` From 2976dde8f763c28e42151b925c83c196bd606e42 Mon Sep 17 00:00:00 2001 From: Srihari Sundar Date: Wed, 22 Apr 2026 18:10:55 -0600 Subject: [PATCH 7/7] Add PSA on the Julia default versions --- docs/source/setup.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/source/setup.md b/docs/source/setup.md index 2b19ffe6..2c178e4b 100644 --- a/docs/source/setup.md +++ b/docs/source/setup.md @@ -217,6 +217,8 @@ julia --version You should see `julia version 1.12.1`. +**NOTE**: If you need other versions of Julia for other purposes, you can run those other Julia versions using `julia +channel` (More info on the [juliaup README](https://github.com/JuliaLang/juliaup#using-juliaup)). Or you can easily switch between versions with juliaup. For example, to switch to version `1.11.2`, run `juliaup default 1.11.2`. To switch back to `1.12.1`, run `juliaup default 1.12.1`. + #### Step 3: Instantiate the Julia environment Navigate to the ReEDS directory from the command line, then run: