Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
100 changes: 0 additions & 100 deletions .github/actions/r2x-check/action.yaml

This file was deleted.

61 changes: 61 additions & 0 deletions .github/actions/setup-reeds-env/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Setup ReEDS Environment
description: Setup cached micromamba Python and/or Julia environment for ReEDS CI.

inputs:
setup-python:
description: Setup micromamba environment from environment.yml.
required: false
default: "true"
setup-julia:
description: Setup Julia toolchain.
required: false
default: "true"
julia-version:
description: Julia version to install.
required: false
default: "1.12.1"
instantiate-julia:
description: Run julia --project=. instantiate.jl.
required: false
default: "true"

outputs:
mamba-env-path:
description: Micromamba environment path.
value: ${{ steps.mamba.outputs.environment-path }}
julia-bindir:
description: Julia binary directory.
value: ${{ steps.setup-julia.outputs.julia-bindir }}

runs:
using: composite
steps:
- name: Setup micromamba env
if: ${{ fromJSON(inputs.setup-python) }}
id: mamba
uses: mamba-org/setup-micromamba@add3a49764cedee8ee24e82dfde87f5bc2914462 # v2
with:
environment-file: environment.yml
cache-environment: true
post-cleanup: "all"
cache-environment-key: ${{ runner.os }}-conda-${{ hashFiles('environment.yml') }}

- name: Restore Julia cache
if: ${{ fromJSON(inputs.setup-julia) }}
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4
with:
path: ~/.julia
key: julia-${{ runner.os }}-${{ hashFiles('Project.toml') }}
restore-keys: julia-${{ runner.os }}-

- name: Setup Julia
if: ${{ fromJSON(inputs.setup-julia) }}
id: setup-julia
uses: julia-actions/setup-julia@5c9647d97b78a5debe5164e9eec09d653d29bd71 # v2
with:
version: ${{ inputs.julia-version }}

- name: Instantiate Julia project
if: ${{ fromJSON(inputs.setup-julia) && fromJSON(inputs.instantiate-julia) }}
shell: bash -le {0}
run: julia --project=. instantiate.jl
65 changes: 65 additions & 0 deletions .github/dependabot.yml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this workflow do?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dependabot helps keep our dependencies up to date by automatically suggesting bumps for any hot-fixes by dependencies.

Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
version: 2

updates:
- package-ecosystem: "conda"
directory: /
schedule:
interval: "weekly"
cooldown:
default-days: 7
open-pull-requests-limit: 2
labels:
- "dependencies"
reviewers:
- "kennedy-mindermann"
commit-message:
prefix: "build"
include: "scope"
rebase-strategy: "auto"

- package-ecosystem: "pip"
directory: /
schedule:
interval: "weekly"
cooldown:
default-days: 7
open-pull-requests-limit: 2
labels:
- "dependencies"
reviewers:
- "kennedy-mindermann"
commit-message:
prefix: "build"
include: "scope"
rebase-strategy: "auto"

- package-ecosystem: "julia"
directory: /
schedule:
interval: "weekly"
cooldown:
default-days: 7
open-pull-requests-limit: 2
labels:
- "dependencies"
reviewers:
- "kennedy-mindermann"
commit-message:
prefix: "build"
include: "scope"
rebase-strategy: "auto"

- package-ecosystem: "github-actions"
directory: /
schedule:
interval: "weekly"
cooldown:
default-days: 7
labels:
- "dependencies"
reviewers:
- "kennedy-mindermann"
commit-message:
prefix: "build"
include: "scope"
rebase-strategy: "auto"
87 changes: 87 additions & 0 deletions .github/labeler.yaml
Comment thread
pesap marked this conversation as resolved.
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
dependencies:
- head-branch:
- '^dependabot/.+'
- changed-files:
- any-glob-to-any-file:
- "environment.yml"
- "pyproject.toml"
- "requirements*.txt"
- "Project.toml"
- "Manifest.toml"
- ".github/dependabot.yml"

github_actions:
- changed-files:
- any-glob-to-any-file:
- ".github/workflows/**"
- ".github/actions/**"
- ".github/scripts/**"

docs:
- changed-files:
- any-glob-to-any-file:
- "docs/**"
- "**/*.md"
- "CITATION.cff"

release:
- changed-files:
- any-glob-to-any-file:
- "CHANGELOG.md"
- "README.md"

tests:
- changed-files:
- any-glob-to-any-file:
- "tests/**"
- "hourlize/tests/**"
- "reeds2pras/test/**"
- "**/test_*.py"
- "**/*_test.py"

model_changes:
- changed-files:
- any-glob-to-any-file:
- "*.gms"
- "**/*.gms"
Comment thread
patrickbrown4 marked this conversation as resolved.
- "runbatch.py"
- "d_solve*.py"
- "reeds/**"
- "ReEDS_Augur/**"
- "Augur.py"
- "instantiate.jl"
- "reeds2pras/**"

data_changes:
- changed-files:
- any-glob-to-any-file:
- "inputs/**"
- "hourlize/inputs/**"
- "postprocessing/**/inputs/**"
- "**/*.csv"
- "**/*.h5"
- "sources.csv"
- "sources_documentation.md"

hourlize:
- changed-files:
- any-glob-to-any-file: "hourlize/**"

input_processing:
- changed-files:
- any-glob-to-any-file:
- "input_processing/**"
- "preprocessing/**"

postprocessing:
- changed-files:
- any-glob-to-any-file: "postprocessing/**"

reeds2pras:
- changed-files:
- any-glob-to-any-file: "reeds2pras/**"

switches:
- changed-files:
- any-glob-to-any-file:
- "cases.csv"
14 changes: 9 additions & 5 deletions .github/workflows/build-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@ on:
- main

permissions:
contents: write
contents: read

jobs:
build:
name: build
runs-on: ubuntu-latest
permissions:
contents: write # Required for peaceiris/actions-gh-pages publish to gh-pages.
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 1
lfs: true
persist-credentials: false

- name: Set up Python 3.12
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
Expand All @@ -48,11 +52,11 @@ jobs:

- name: Set variables for internal github repo
run: |
echo "BASE_URL=https://github.com/ReEDS-Model/ReEDS" >> $GITHUB_ENV
cd ${GITHUB_WORKSPACE}/docs/source/documentation_tools/
echo "BASE_URL=https://github.com/ReEDS-Model/ReEDS" >> "$GITHUB_ENV"
cd "$GITHUB_WORKSPACE/docs/source/documentation_tools/"
sh generate_sources_md_file.sh
cd ${GITHUB_WORKSPACE}
python docs/source/documentation_tools/generate_markdown.py --githubURL "https://github.com/ReEDS-Model/ReEDS/blob/main" --reedsPath "${GITHUB_WORKSPACE}"
cd "$GITHUB_WORKSPACE"
python docs/source/documentation_tools/generate_markdown.py --githubURL "https://github.com/ReEDS-Model/ReEDS/blob/main" --reedsPath "$GITHUB_WORKSPACE"

- name: Build Sphinx documentation
env:
Expand Down
Loading
Loading