GLOBALGRID2050 / EXPLORE CODE

Part of: Explore Code / Automation and CI / globalgrid2050 / .github/workflows

GlobalGrid2050 Backfill Generation Sources Staggered Years V6 Workflow and 7 more files

A GitHub Actions workflow. Runs on a schedule and by hand.

651 lines of YAML from globalgrid2050, in 8 files. Topic: Automation and CI. Section 1710 of 2044.

Cut 2026-12-06T03:07:51+00:00. A copy for reading; the repository at the stated commit is the source.

In the State lines below, domain stage, users and canonical status are rule-based first approximations from code and path evidence (rules explore-agent-rules-v1), not observed facts: the rules.

In this section

  1. GlobalGrid2050 Backfill Generation Clean Halfhourly Month V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_clean_halfhourly_month_v6.yml lines 1–75
  2. GlobalGrid2050 Backfill Generation Fuelhh Halfhourly V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_fuelhh_halfhourly_v6.yml lines 1–87
  3. GlobalGrid2050 Backfill Generation Sources Decade V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_sources_decade_v6.yml lines 1–69
  4. GlobalGrid2050 Backfill Generation Sources Overnight Sequence V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_sources_overnight_sequence_v6.yml lines 1–108
  5. GlobalGrid2050 Backfill Generation Sources Staggered Years V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_sources_staggered_years_v6.yml lines 1–133
  6. GlobalGrid2050 Backfill Generation Sources Year V6 Workflow automation · globalgrid2050 / .github/workflows/backfill_generation_sources_year_v6.yml lines 1–61
  7. GlobalGrid2050 Backfill UK Frequency Weekly V5 Workflow automation · globalgrid2050 / .github/workflows/backfill_uk_frequency_weekly_v5.yml lines 1–60
  8. GlobalGrid2050 Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial… automation · globalgrid2050 / .github/workflows/build-v8-bess-gis-sld-financial-sandbox.yml lines 1–58

GlobalGrid2050 Backfill Generation Clean Halfhourly Month V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_clean_halfhourly_month_v6.yml · lines 1–75 of 75 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill Generation Clean Halfhourly Month V6 (`scripts/backfill_generation_clean_halfhourly_month_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Clean Halfhourly Month V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Backfill Generation Clean Halfhourly Month V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_clean_halfhourly_month_v6.yml:1-75 · blob 66b9ee95bd9769f9ba9b3e36b72f16b25c0f3831 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Backfill Generation Clean Halfhourly Month V6

on:
  workflow_dispatch:
    inputs:
      year:
        description: Calendar year
        required: true
        default: '2026'
      month:
        description: Calendar month 1 to 12
        required: true
        default: '6'
      include_solar:
        description: Include Sheffield Solar PVLive solar rows
        required: true
        default: 'true'
permissions:
  contents: write

concurrency:
  group: generation-clean-halfhourly-v6
  cancel-in-progress: false

jobs:
  backfill_month:
    runs-on: ubuntu-latest
    timeout-minutes: 180
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Pull latest main
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git pull --ff-only https://${PAT}@github.com/${{ github.repository }}.git main

      - name: Build clean monthly halfhourly data
        env:
          YEAR: ${{ github.event.inputs.year }}
          MONTH: ${{ github.event.inputs.month }}
          INCLUDE_SOLAR: ${{ github.event.inputs.include_solar }}
        run: |
          set -e
          YEAR=$YEAR MONTH=$MONTH INCLUDE_SOLAR=$INCLUDE_SOLAR python scripts/backfill_generation_clean_halfhourly_month_v6.py

      - name: Commit clean monthly halfhourly data
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
          YEAR: ${{ github.event.inputs.year }}
          MONTH: ${{ github.event.inputs.month }}
        run: |
          set -e
          MONTH_PADDED=$(printf "%02d" "$MONTH")
          git add data/generation/halfhourly_clean/${YEAR}/generation_mw_${YEAR}_${MONTH_PADDED}.csv
          git add uk_energy_tracking_v6/generation_history/backfill_reports/GENERATION_CLEAN_HALFHOUR_MONTH_${YEAR}_${MONTH_PADDED}.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Backfill clean V6 generation MW ${YEAR}-${MONTH_PADDED}"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No clean monthly halfhourly changes"
          fi

GlobalGrid2050 Backfill Generation Fuelhh Halfhourly V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_fuelhh_halfhourly_v6.yml · lines 1–87 of 87 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Named “Generation FUELHH Half Hourly Backfill”; runs GlobalGrid2050 Backfill Generation Fuelhh Halfhourly All Months V6 (`scripts/backfill_generation_fuelhh_halfhourly_all_months_v6.py`) and GlobalGrid2050 Build Generation Daily MW Spine from Fuelhh (`scripts/build_generation_daily_mw_spine_from_fuelhh.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Fuelhh Halfhourly All Months V6 (workflow run), GlobalGrid2050 Build Generation Daily MW Spine from Fuelhh (workflow run)
Used by
none found
Produces
none declared
Defines here
Generation FUELHH Half Hourly Backfill
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_fuelhh_halfhourly_v6.yml:1-87 · blob d44855dbf13daa7ce0fa32a3bdba866e07460913 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Generation FUELHH Half Hourly Backfill

on:
  workflow_dispatch:
    inputs:
      start_year_month:
        description: First month to backfill YYYY-MM
        required: false
        default: '2016-01'
      window_days:
        description: Days per request
        required: false
        default: '7'
      request_delay_seconds:
        description: Delay between requests
        required: false
        default: '1.5'
      time_budget_minutes:
        description: Time budget minutes
        required: false
        default: '300'
      force:
        description: Re fetch existing months
        required: false
        default: 'false'
      commit:
        description: Commit outputs
        required: false
        default: 'true'
permissions:
  contents: write

concurrency:
  group: fuelhh-backfill
  cancel-in-progress: false

jobs:
  backfill:
    runs-on: ubuntu-latest
    timeout-minutes: 350
    env:
      START_YEAR_MONTH: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.start_year_month || '2016-01' }}
      WINDOW_DAYS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.window_days || '7' }}
      REQUEST_DELAY_SECONDS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.request_delay_seconds || '1.5' }}
      TIME_BUDGET_MINUTES: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.time_budget_minutes || '300' }}
      FORCE: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.force || 'false' }}
      COMMIT_OUTPUTS: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit || 'true' }}
      MAX_SHARD_MB: '25'
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'
      - name: Run FUELHH backfill
        run: python scripts/backfill_generation_fuelhh_halfhourly_all_months_v6.py
      - name: Build FUELHH daily MW spine
        run: python scripts/build_generation_daily_mw_spine_from_fuelhh.py --start-year-month "$START_YEAR_MONTH" --apply
      - name: Upload reports
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: fuelhh-backfill-reports
          path: |
            data/generation/fuelhh_halfhourly/BACKFILL_PROGRESS.json
            data_science_protocol/audit_reports/FUELHH_BACKFILL_LATEST.md
            data_science_protocol/audit_reports/json/FUELHH_BACKFILL_LATEST.json
            data_science_protocol/audit_reports/FUELHH_DAILY_MW_SPINE_LATEST.md
            data_science_protocol/audit_reports/json/FUELHH_DAILY_MW_SPINE_LATEST.json
      - name: Commit outputs
        if: env.COMMIT_OUTPUTS != 'false'
        shell: bash
        run: |
          set -euo pipefail
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"
          git add data/generation/fuelhh_halfhourly || true
          git add data/confirmed/generation_daily_mw_spine_fuelhh_candidate.json || true
          git add data_science_protocol/audit_reports || true
          if git diff --cached --quiet; then
            echo "No changes to commit this run."
            exit 0
          fi
          git commit -m "gridbot: FUELHH half hourly backfill"
          git pull --rebase origin "${GITHUB_REF_NAME}"
          git push origin HEAD:"${GITHUB_REF_NAME}"

GlobalGrid2050 Backfill Generation Sources Decade V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_sources_decade_v6.yml · lines 1–69 of 69 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill Generation Sources Year V6 (`scripts/backfill_generation_sources_year_v6.py`), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (`scripts/merge_generation_sources_annual_to_master_v6.py`) and GlobalGrid2050 Generate Generation History Daily V6 (`scripts/generate_generation_history_daily_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Sources Year V6 (workflow run), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (workflow run), GlobalGrid2050 Generate Generation History Daily V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Backfill Generation Sources Decade V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_sources_decade_v6.yml:1-69 · blob e76accae252659f61ba9aa41c8b5e96c8c31d8c6 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Backfill Generation Sources Decade V6

on:
  workflow_dispatch:
    inputs:
      start_year:
        description: First year to backfill
        required: true
        default: '2016'
      end_year:
        description: Last year to backfill
        required: true
        default: '2026'
      include_solar:
        description: Include Sheffield Solar PVLive solar rows
        required: true
        default: 'true'
permissions:
  contents: write

concurrency:
  group: backfill-generation-sources-decade-v6
  cancel-in-progress: false

jobs:
  backfill:
    runs-on: ubuntu-latest
    timeout-minutes: 360
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Backfill generation sources by year
        env:
          START_YEAR: ${{ github.event.inputs.start_year }}
          END_YEAR: ${{ github.event.inputs.end_year }}
          INCLUDE_SOLAR: ${{ github.event.inputs.include_solar }}
        run: |
          set -e
          for YEAR in $(seq $START_YEAR $END_YEAR); do
            echo "Backfilling generation source year $YEAR"
            YEAR=$YEAR INCLUDE_SOLAR=$INCLUDE_SOLAR python scripts/backfill_generation_sources_year_v6.py
          done
          python scripts/merge_generation_sources_annual_to_master_v6.py
          python scripts/generate_generation_history_daily_v6.py

      - name: Commit generation source decade files
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add data/generation/elexon_generation_sources_half_hourly.csv data/generation/elexon_generation_sources_*.csv uk_energy_tracking_v6/generation_history/generation_history_daily_decade.json uk_energy_tracking_v6/generation_history/backfill_reports/*.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Backfill V6 generation source decade data"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No V6 generation decade changes"
          fi

GlobalGrid2050 Backfill Generation Sources Overnight Sequence V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_sources_overnight_sequence_v6.yml · lines 1–108 of 108 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill Generation Sources Year V6 (`scripts/backfill_generation_sources_year_v6.py`), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (`scripts/merge_generation_sources_annual_to_master_v6.py`) and GlobalGrid2050 Generate Generation History Daily V6 (`scripts/generate_generation_history_daily_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Sources Year V6 (workflow run), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (workflow run), GlobalGrid2050 Generate Generation History Daily V6 (workflow run), GlobalGrid2050 Generate Generation Recent Halfhourly V6 (workflow run), GlobalGrid2050 Audit Generation Data Coverage V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Backfill Generation Sources Monthly Sequence V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_sources_overnight_sequence_v6.yml:1-108 · blob c345e03401c45b347fa759b6d912f6596ecfb5a6 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Backfill Generation Sources Monthly Sequence V6

on:
  workflow_dispatch:
    inputs:
      start_year:
        description: First calendar year to backfill manually
        required: true
        default: '2016'
      end_year:
        description: Last calendar year to backfill manually
        required: true
        default: '2026'
      include_solar:
        description: Include Sheffield Solar PVLive solar rows
        required: true
        default: 'true'
permissions:
  contents: write

concurrency:
  group: generation-data-writes-v6
  cancel-in-progress: false

jobs:
  sequence:
    runs-on: ubuntu-latest
    timeout-minutes: 720
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Pull latest main before data work
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git pull --ff-only https://${PAT}@github.com/${{ github.repository }}.git main

      - name: Resolve year sequence
        id: years
        run: |
          START_YEAR="${{ github.event.inputs.start_year }}"
          END_YEAR="${{ github.event.inputs.end_year }}"
          if ! echo "$START_YEAR" | grep -Eq '^(2016|2017|2018|2019|2020|2021|2022|2023|2024|2025|2026)$'; then
            echo "Invalid start_year: $START_YEAR"
            exit 1
          fi
          if ! echo "$END_YEAR" | grep -Eq '^(2016|2017|2018|2019|2020|2021|2022|2023|2024|2025|2026)$'; then
            echo "Invalid end_year: $END_YEAR"
            exit 1
          fi
          echo "start_year=$START_YEAR" >> "$GITHUB_OUTPUT"
          echo "end_year=$END_YEAR" >> "$GITHUB_OUTPUT"
          echo "include_solar=${{ github.event.inputs.include_solar }}" >> "$GITHUB_OUTPUT"

      - name: Backfill each calendar year sequentially
        env:
          START_YEAR: ${{ steps.years.outputs.start_year }}
          END_YEAR: ${{ steps.years.outputs.end_year }}
          INCLUDE_SOLAR: ${{ steps.years.outputs.include_solar }}
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          for YEAR in $(seq $START_YEAR $END_YEAR); do
            echo "Backfilling V6 generation source calendar year $YEAR"
            YEAR=$YEAR INCLUDE_SOLAR=$INCLUDE_SOLAR python scripts/backfill_generation_sources_year_v6.py
            git add data/generation/elexon_generation_sources_${YEAR}.csv uk_energy_tracking_v6/generation_history/backfill_reports/GENERATION_HISTORY_BACKFILL_${YEAR}.md
            if [ -n "$(git status --porcelain)" ]; then
              git commit -m "Backfill V6 generation source data for ${YEAR}"
              git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
              git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
            else
              echo "No generation source changes for $YEAR"
            fi
          done

      - name: Rebuild master daily aggregate recent slice and audit
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          python scripts/merge_generation_sources_annual_to_master_v6.py
          python scripts/generate_generation_history_daily_v6.py
          python scripts/generate_generation_recent_halfhourly_v6.py
          python scripts/audit_generation_data_coverage_v6.py
          git add data/generation/elexon_generation_sources_half_hourly.csv \
                  uk_energy_tracking_v6/generation_history/generation_history_daily_decade.json \
                  uk_energy_tracking_v6/generation_history/generation_recent_halfhourly_30d.json \
                  uk_energy_tracking_v6/generation_history/GENERATION_DATA_COVERAGE_AUDIT.md \
                  uk_energy_tracking_v6/generation_history/generation_data_coverage_audit.json
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Rebuild V6 generation source aggregates and audit"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No master generation source aggregate changes"
          fi

GlobalGrid2050 Backfill Generation Sources Staggered Years V6 Workflow

A GitHub Actions workflow. Runs on a schedule and by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_sources_staggered_years_v6.yml · lines 1–133 of 133 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill Generation Sources Year V6 (`scripts/backfill_generation_sources_year_v6.py`), GlobalGrid2050 Split Generation Sources Year to Months V6 (`scripts/split_generation_sources_year_to_months_v6.py`) and GlobalGrid2050 Merge Generation Sources Annual to Master V6 (`scripts/merge_generation_sources_annual_to_master_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Sources Year V6 (workflow run), GlobalGrid2050 Split Generation Sources Year to Months V6 (workflow run), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (workflow run), GlobalGrid2050 Generate Generation History Daily V6 (workflow run), GlobalGrid2050 Generate Generation Recent Halfhourly V6 (workflow run), GlobalGrid2050 Audit Generation Data Coverage V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Backfill Generation Sources Staggered Years V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_sources_staggered_years_v6.yml:1-133 · blob a21f6aa421854acc55cca078dc901a90e0e936af · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Backfill Generation Sources Staggered Years V6

on:
  workflow_dispatch:
    inputs:
      year:
        description: Calendar year to backfill, or auto for schedule mapping
        required: true
        default: 'auto'
      include_solar:
        description: Include Sheffield Solar PVLive solar rows
        required: true
        default: 'true'
permissions:
  contents: write

concurrency:
  group: generation-data-writes-v6
  cancel-in-progress: false

jobs:
  backfill_year:
    runs-on: ubuntu-latest
    timeout-minutes: 240
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Pull latest main before data work
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git pull --ff-only https://${PAT}@github.com/${{ github.repository }}.git main

      - name: Resolve calendar year
        id: resolve
        run: |
          if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ github.event.inputs.year }}" != "auto" ]; then
            YEAR="${{ github.event.inputs.year }}"
          else
            DAY=$(date -u +%d)
            case "$DAY" in
              02) YEAR=2016 ;;
              03) YEAR=2017 ;;
              04) YEAR=2018 ;;
              05) YEAR=2019 ;;
              06) YEAR=2020 ;;
              07) YEAR=2021 ;;
              08) YEAR=2022 ;;
              09) YEAR=2023 ;;
              10) YEAR=2024 ;;
              11) YEAR=2025 ;;
              12) YEAR=2026 ;;
              *) YEAR=2026 ;;
            esac
          fi
          if ! echo "$YEAR" | grep -Eq '^(2016|2017|2018|2019|2020|2021|2022|2023|2024|2025|2026)$'; then
            echo "Invalid year: $YEAR"
            exit 1
          fi
          echo "year=$YEAR" >> "$GITHUB_OUTPUT"
          if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
            echo "include_solar=${{ github.event.inputs.include_solar }}" >> "$GITHUB_OUTPUT"
          else
            echo "include_solar=true" >> "$GITHUB_OUTPUT"
          fi
          echo "Resolved generation backfill year: $YEAR"

      - name: Backfill one generation source calendar year
        env:
          YEAR: ${{ steps.resolve.outputs.year }}
          INCLUDE_SOLAR: ${{ steps.resolve.outputs.include_solar }}
        run: |
          set -e
          YEAR=$YEAR INCLUDE_SOLAR=$INCLUDE_SOLAR python scripts/backfill_generation_sources_year_v6.py

      - name: Split annual source into monthly archive
        env:
          YEAR: ${{ steps.resolve.outputs.year }}
        run: |
          set -e
          python scripts/split_generation_sources_year_to_months_v6.py "$YEAR"
          rm -f data/generation/elexon_generation_sources_${YEAR}.csv

      - name: Rebuild derived generation files
        run: |
          set -e
          python scripts/merge_generation_sources_annual_to_master_v6.py
          python scripts/generate_generation_history_daily_v6.py
          python scripts/generate_generation_recent_halfhourly_v6.py
          python scripts/audit_generation_data_coverage_v6.py
          rm -f data/generation/elexon_generation_sources_half_hourly.csv

      - name: Commit year and derived generation files
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
          YEAR: ${{ steps.resolve.outputs.year }}
        run: |
          set -e
          git add data/generation/archive/${YEAR}/ \
                  uk_energy_tracking_v6/generation_history/generation_history_daily_decade.json \
                  uk_energy_tracking_v6/generation_history/generation_recent_halfhourly_30d.json \
                  uk_energy_tracking_v6/generation_history/backfill_reports/GENERATION_HISTORY_BACKFILL_${YEAR}.md \
                  uk_energy_tracking_v6/generation_history/GENERATION_DATA_COVERAGE_AUDIT.md \
                  uk_energy_tracking_v6/generation_history/generation_data_coverage_audit.json
          git rm --ignore-unmatch data/generation/elexon_generation_sources_${YEAR}.csv data/generation/elexon_generation_sources_half_hourly.csv
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Backfill V6 generation source monthly archive for ${YEAR}"
            for attempt in 1 2 3; do
              if git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main && git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main; then
                exit 0
              fi
              echo "Push attempt $attempt failed. Retrying after rebase."
              git rebase --abort || true
              git pull --ff-only https://${PAT}@github.com/${{ github.repository }}.git main || true
              sleep 20
            done
            echo "Failed to push generation data after retries"
            exit 1
          else
            echo "No V6 generation source changes for ${YEAR}"
          fi

GlobalGrid2050 Backfill Generation Sources Year V6 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_generation_sources_year_v6.yml · lines 1–61 of 61 · Entry point

What it does
It runs solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage upstream_foresight (path word 'generation'): upstream engineering foresight over GB transmission and distribution topology (TSO/DNO, 132kV and above, the REPD pipeline, data centres), which Ventus Ltd states it models for foresight. Domain terms in the code: solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill Generation Sources Year V6 (`scripts/backfill_generation_sources_year_v6.py`), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (`scripts/merge_generation_sources_annual_to_master_v6.py`) and GlobalGrid2050 Generate Generation History Daily V6 (`scripts/generate_generation_history_daily_v6.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill Generation Sources Year V6 (workflow run), GlobalGrid2050 Merge Generation Sources Annual to Master V6 (workflow run), GlobalGrid2050 Generate Generation History Daily V6 (workflow run)
Used by
none found
Produces
none declared
Defines here
Backfill Generation Sources Single Year V6
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_generation_sources_year_v6.yml:1-61 · blob 7e44533f7c4d405aa021011ee07cfdf8f2d926cc · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: upstream_foresight · users: IPP_developer, ICP_grid_engineer · canonical: production_core
name: Backfill Generation Sources Single Year V6

on:
  workflow_dispatch:
    inputs:
      year:
        description: Calendar year to backfill
        required: true
        default: '2026'
      include_solar:
        description: Include Sheffield Solar PVLive solar rows
        required: true
        default: 'true'
permissions:
  contents: write

concurrency:
  group: backfill-generation-sources-year-v6
  cancel-in-progress: false

jobs:
  backfill:
    runs-on: ubuntu-latest
    timeout-minutes: 90
    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Backfill one generation source calendar year
        env:
          YEAR: ${{ github.event.inputs.year }}
          INCLUDE_SOLAR: ${{ github.event.inputs.include_solar }}
        run: |
          set -e
          YEAR=$YEAR INCLUDE_SOLAR=$INCLUDE_SOLAR python scripts/backfill_generation_sources_year_v6.py
          python scripts/merge_generation_sources_annual_to_master_v6.py
          python scripts/generate_generation_history_daily_v6.py

      - name: Commit generation source year files
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add data/generation/elexon_generation_sources_half_hourly.csv data/generation/elexon_generation_sources_${{ github.event.inputs.year }}.csv uk_energy_tracking_v6/generation_history/generation_history_daily_decade.json uk_energy_tracking_v6/generation_history/backfill_reports/GENERATION_HISTORY_BACKFILL_${{ github.event.inputs.year }}.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Backfill V6 generation source data for ${{ github.event.inputs.year }}"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No V6 generation source year changes"
          fi

GlobalGrid2050 Backfill UK Frequency Weekly V5 Workflow

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/backfill_uk_frequency_weekly_v5.yml · lines 1–60 of 60 · Entry point

What it does
It runs automated jobs on GitHub Actions. Side effects: starts processes.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Backfill UK Frequency Weekly V5 (`scripts/backfill_uk_frequency_weekly_v5.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Backfill UK Frequency Weekly V5 (workflow run)
Used by
none found
Produces
none declared
Defines here
backfill_uk_frequency_weekly_v5
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/backfill_uk_frequency_weekly_v5.yml:1-60 · blob bcbaccaca2dcb5d19157650c622d4fafcc943294 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: unknown · users: none · canonical: production_core
name: backfill_uk_frequency_weekly_v5

on:
  workflow_dispatch:
    inputs:
      weeks:
        description: Weekly windows to request from Elexon, maximum 52
        required: true
        default: '52'
        type: choice
        options: ['4', '13', '26', '52']
permissions:
  contents: write

concurrency:
  group: uk-frequency-weekly-backfill-v5
  cancel-in-progress: false

jobs:
  backfill-weekly-frequency:
    runs-on: ubuntu-latest
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
          token: ${{ secrets.GRIDBOT_PAT }}

      - uses: actions/setup-python@v5
        with:
          python-version: '3.11'

      - name: Install Python dependencies
        run: pip install requests

      - name: Run V5 weekly frequency backfill
        env:
          GG_FREQUENCY_BACKFILL_WEEKS: ${{ github.event.inputs.weeks }}
          GG_FREQUENCY_BACKFILL_SLEEP_SECONDS: '2'
        run: python scripts/backfill_uk_frequency_weekly_v5.py

      - name: Commit V5 weekly frequency backfill
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        shell: bash
        run: |
          set -e
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"
          git add \
            uk_energy_tracking_v5/grid_frequency_weekly_health.csv \
            uk_energy_tracking_v5/live_grid_frequency_weekly_health.json \
            gridbot_reports/uk_frequency_weekly_backfill_v5_report.md
          if [ -n "$(git status --porcelain)" ]; then
            git commit -m "Backfill UK frequency weekly health V5: $(date -u +'%Y-%m-%d %H:%M UTC')"
            git pull --rebase https://${PAT}@github.com/${{ github.repository }}.git main
            git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main
          else
            echo "No V5 weekly frequency backfill changes to commit"
          fi

GlobalGrid2050 Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial…

A GitHub Actions workflow. Runs by hand.

automationglobalgrid2050 / .github/workflows/build-v8-bess-gis-sld-financial-sandbox.yml · lines 1–58 of 58 · Entry point

What it does
It runs battery storage (BESS) and solar. Side effects: starts processes.
Why it exists in the grid workflow
Domain stage experimental (path word 'sandbox'): work its own path marks as experimental (sandbox, prototype, archive or similar words); by this evidence it is not part of a production workflow. Domain terms in the code: battery storage (BESS), solar.
Inputs & outputs
Out: commits pushed to the repository.
Downstream impact
It is itself an entry point (workflow); no other file was found loading it.
What it achieves
Runs GlobalGrid2050 Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial Sandbox (`scripts/build_v8_bess_gis_sld_financial_sandbox.py`) and GlobalGrid2050 Test Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial… (`scripts/test_build_v8_bess_gis_sld_financial_sandbox.py`).
Why it matters
No other file in the estate was found to import it; it is an entry point.
Application
globalgrid2050 · .github/workflows · workflow
Uses
GlobalGrid2050 Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial Sandbox (workflow run), GlobalGrid2050 Test Build V8 Battery Energy Storage System (BESS) GIS Single-Line Diagram (SLD) Financial… (workflow run)
Used by
none found
Produces
none declared
Defines here
Build V8 BESS GIS SLD Financial Sandbox
Cannot conclude
Whether this code runs, is used by a live app today, or is correct. This is a static reading.
Evidence
globalgrid2050@0aca5121f0795e469b6cf4fc3d3b628edba8d883 .github/workflows/build-v8-bess-gis-sld-financial-sandbox.yml:1-58 · blob 20eb752987b7cc3a4ef743faf76e2dcf1aae68f3 · GitHub at these lines
State
achieves: comment · context: readme_derived · stage: unknown · effects: process · domain stage: experimental · users: none · canonical: production_core
name: Build V8 BESS GIS SLD Financial Sandbox

on:
  workflow_dispatch:
permissions:
  contents: write

jobs:
  build-v8-bess-gis-sld-financial-sandbox:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4
        with:
          token: ${{ secrets.GRIDBOT_PAT }}
          fetch-depth: 0

      - name: Set up Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"

      - name: Build V8 BESS GIS SLD Financial Sandbox
        run: python scripts/build_v8_bess_gis_sld_financial_sandbox.py

      - name: Run V8 BESS GIS SLD checks
        run: python scripts/test_build_v8_bess_gis_sld_financial_sandbox.py

      - name: Commit and push V8 BESS GIS SLD Financial Sandbox
        env:
          PAT: ${{ secrets.GRIDBOT_PAT }}
        run: |
          git config --global user.name "gridbot"
          git config --global user.email "bot@globalgrid2050.com"

          git pull --rebase --autostash origin main

          git add \
            solar-bess-topology-v8/index.html \
            solar-bess-topology-v8/README.md \
            solar-bess-topology-v8/bess-gis-sld-financial-sandbox/index.html \
            solar-bess-topology-v8/bess-gis-sld-financial-sandbox/bess-gis-sld-financial-sandbox.css \
            solar-bess-topology-v8/bess-gis-sld-financial-sandbox/bess-gis-sld-financial-sandbox.js \
            solar-bess-topology-v8/bess-gis-sld-financial-sandbox/README.md \
            solar-bess-topology-v8/bess-pcs-standalone/index.html \
            scripts/build_v8_bess_gis_sld_financial_sandbox.py \
            scripts/test_build_v8_bess_gis_sld_financial_sandbox.py \
            gridbot_reports/build_v8_bess_gis_sld_financial_sandbox.md

          if git diff --cached --quiet; then
            echo "No V8 BESS GIS SLD changes to commit."
            exit 0
          fi

          git commit -m "Build V8 BESS GIS SLD financial sandbox"
          git pull --rebase --autostash origin main
          git push https://${PAT}@github.com/${{ github.repository }}.git HEAD:main