NatLabRockies / NatLabRockies/H2Integrate

Bug report: cannot include properly formatted yaml file inputs for demand profiles

Open
#644 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

framework
Dominant language
Python
Stars
26
Forks
44
Avg merge
3d 22h
Merged PRs (30d)
16

Description

Cannot include properly formatted yaml file inputs for demand profiles

The current formatting of the tech_config.yaml file requires that demand profiles included from other yamls have no headers, which is not proper yaml file formatting. To work around this, demand profiles used in this way have been excluded individually from the yamlfix pre-commit hook. While this works, it would be better to have a cleaner and more scalable solution.

Current include in the tech config:
Image
Included file format:
Image
Current pre-commit hook exclude for yamlfix:
Image
Solution

I would like to propose that we allow for a second layer in the demand_profile to accommodate properly formatted yaml inputs. The tech_config would stay essentially the same. The demand profile files included in tech config could then include other helpful meta data and may look like the following:

For a time series profile:

tech_config
Image
included file
Image

For a constant profile:

tech_config
Image

How to reproduce

Relevant output

System Information

  • OS: <macOS 12.4>
  • Python version: <3.11.4>
  • H2Integrate version: <0.1.1>
    • <Installed from source using an editable installation with developer tools: pip install -e .[develop]>
    • Commit hash:
Relevant library versions
Package Version
hopp <3.1.1>
numpy <1.26.4>
Pyomo <6.8.0>
scipy <1.14.1>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how tech_config.yaml loads demand_profile inputs, including the time-series and constant profile forms shown in the issue. Review the yamlfix pre-commit exclusions and determine how properly formatted included YAML can be accepted. Done means both profile forms support YAML headers and the individual yamlfix exclusions are no longer needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.