Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History

README.md

Outline

ResStock Postprocessing

This package automates the common postprocessing tasks that are part of running ResStock. It is used by BuildStockBatch to transform the results to its final format.

Installation

To install the package, we recommend using uv for Python package management.

Set up uv

  1. Install uv if you don't have it already:

    # Mac
    wget -qO- https://astral.sh/uv/install.sh | sh
    
    # Windows Powershell
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

    (More info: https://docs.astral.sh/uv/getting-started/installation/)

  2. Create a new virtual environment and install dependencies using the following command: (If it fails the first time, try running uv sync again)

    cd path/to/postprocessing
    uv sync
  3. (Recommended) Install the shared pre-commit hooks so formatting, spelling, and lint checks run automatically before each commit. This is a must if you are going to contribute code:

    cd path/to/postprocessing
    uv run --group dev pre-commit install
  4. Run the scripts as desired

    # Output the failure log
    cd path/to/postprocessing
    uv run resstockpostproc/get_failures.py <csv_path> --verbose
    
    # Export metadata and annual results from files on S3
    uv run resstockpostproc/process_bsb_results.py "s3://res-sdr/testing-sdr-fy25/a_run" "C:/path/to/bsb/output/a_run_output"
    
    # Export metdata and annual results from local files
    # (It is faster to download the /baseline and /upgrades directories from S3 once instead of reading from S3 each time)
    uv run resstockpostproc/process_bsb_results.py "C:/path/to/bsb/output/a_run" "C:/path/to/bsb/output/a_run_output"
    
    # Export metdata and annual results to OEDI
    uv run resstockpostproc/process_bsb_results.py "C:/path/to/bsb/output/a_run" "s3://oedi-data-lake/nrel-pds-building-stock/end-use-load-profiles-for-us-building-stock/2025/resstock_amy2018_release_1"
Morty Proxy This is a proxified and sanitized view of the page, visit original site.