RESource supports Python 3.11 and 3.12. End users can install it with pip;
contributors should use uv with the committed lockfile.
python -m pip install deltae-resourceConfirm the package and command are available:
python -c "import RESource; print(RESource.__version__)"
resource --helpThe distribution is called deltae-resource, while Python code imports
RESource. Until the first PyPI release is available, use the source-checkout
workflow below.
git clone https://github.com/DeltaE/RESource.git
cd RESource
uv sync --locked
uv run pytestFor notebooks and documentation:
uv sync --locked --extra notebooks --extra docs
uv run jupyter lab notebooks/uv sync --locked creates .venv, installs RESource in editable mode, and
reproduces the versions recorded in uv.lock. Do not install project
dependencies manually into .venv; use uv add, uv remove, or dependency
groups in pyproject.toml.
uv run resource config/CAN/scenarios/baseline.yaml --year 2024 -r BCOther examples:
uv run resource config/CAN/scenarios/baseline.yaml --year 2024
uv run resource config/config_WB6_2023.yaml --year 2023 -r AL BAPaths inside configuration files are resolved by the running workflow. Large downloaded and processed datasets are not bundled in the Python wheel.
from RESource.RESources import RESources_builder
builder = RESources_builder(
config_file_path="config/CAN/scenarios/baseline.yaml",
region_short_code="BC",
resource_type="wind",
weather_year=2024,
)The former RES import namespace remains available temporarily for existing
notebooks, but new code must use RESource.
uv lock --check
uv run ruff check src tests
uv run ruff format --check src tests
uv run pytest
uv build