assume-framework / assume

ASSUME - Agent-based Simulation for Studying and Understanding Market Evolution
https://assume.readthedocs.io
22 stars 5 forks source link

Data Request mechanism #247

Closed maurerle closed 9 months ago

maurerle commented 10 months ago

This adds a new data_request mechanism which can be used to request the power generation of a unit or the market price of a market. This is needed for contracts, which are developed in a follow-up PR

This allows workflows like:

  1. request market_price of last week from market
  2. wait for result from market
  3. calculate contract result (e. g. hours in which the price is above or below some value) in the contract_market_agent
codecov[bot] commented 10 months ago

Codecov Report

Attention: 4 lines in your changes are missing coverage. Please review.

Comparison is base (61d58a8) 78.33% compared to head (05acc78) 78.44%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #247 +/- ## ========================================== + Coverage 78.33% 78.44% +0.11% ========================================== Files 39 39 Lines 4218 4259 +41 ========================================== + Hits 3304 3341 +37 - Misses 914 918 +4 ``` | [Flag](https://app.codecov.io/gh/assume-framework/assume/pull/247/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | Coverage Δ | | |---|---|---| | [pytest](https://app.codecov.io/gh/assume-framework/assume/pull/247/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | `78.44% <92.59%> (+0.11%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/assume-framework/assume/pull/247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework) | Coverage Δ | | |---|---|---| | [assume/common/market\_objects.py](https://app.codecov.io/gh/assume-framework/assume/pull/247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#diff-YXNzdW1lL2NvbW1vbi9tYXJrZXRfb2JqZWN0cy5weQ==) | `100.00% <100.00%> (ø)` | | | [assume/markets/base\_market.py](https://app.codecov.io/gh/assume-framework/assume/pull/247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#diff-YXNzdW1lL21hcmtldHMvYmFzZV9tYXJrZXQucHk=) | `88.73% <100.00%> (+1.16%)` | :arrow_up: | | [assume/common/outputs.py](https://app.codecov.io/gh/assume-framework/assume/pull/247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#diff-YXNzdW1lL2NvbW1vbi9vdXRwdXRzLnB5) | `49.75% <0.00%> (-0.51%)` | :arrow_down: | | [assume/common/units\_operator.py](https://app.codecov.io/gh/assume-framework/assume/pull/247?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=assume-framework#diff-YXNzdW1lL2NvbW1vbi91bml0c19vcGVyYXRvci5weQ==) | `90.52% <90.90%> (-0.44%)` | :arrow_down: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

nick-harder commented 10 months ago

@maurerle hi Florian, so are no additional tests required for this functionality? I saw a commit with fix tests, but no extra tests. Or are they a part of another commit?