Skip to content

Feature/research 306#1918

Open
spyrostz wants to merge 21 commits into
masterfrom
feature/RESEARCH-306
Open

Feature/research 306#1918
spyrostz wants to merge 21 commits into
masterfrom
feature/RESEARCH-306

Conversation

@spyrostz
Copy link
Copy Markdown
Member

Reason for the proposed changes

Please describe what we want to achieve and why.

Proposed changes

INTEGRATION_TESTS_BRANCH=master
GSY_FRAMEWORK_BRANCH=master
SCM_ENGINE_BRANCH=master

@spyrostz spyrostz requested a review from hannesdiedrich April 20, 2026 11:52
Copy link
Copy Markdown
Member

@hannesdiedrich hannesdiedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have left some comments and questions. I have a general one before I can continue
I started with the EWCG strategy only to realise that this is not the external strategy (my bad).
I understand the gsy "hosts" the rest API for any external commands that are performed via the rest interface. And the Energy Web Client Gateway acts as a proxy (as your folder structure says correctly). However, why don't we re-use the OrderUpdater also in the proxy strategy and re-implement a new one?

Comment thread .pylintrc
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread src/gsy_e/external/proxy/ewcg_strategy.py Outdated
Comment thread src/gsy_e/external/proxy/ewcg_strategy.py
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread src/gsy_e/external/proxy/price_updater.py Outdated
Comment thread src/gsy_e/external/rest_strategy.py
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

❌ Patch coverage is 91.38211% with 53 lines in your changes missing coverage. Please review.
✅ Project coverage is 72.69%. Comparing base (9111fd3) to head (4ddfb49).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1918      +/-   ##
==========================================
+ Coverage   71.12%   72.69%   +1.56%     
==========================================
  Files         149      155       +6     
  Lines       14309    14790     +481     
  Branches     1892     1919      +27     
==========================================
+ Hits        10177    10751     +574     
+ Misses       3593     3529      -64     
+ Partials      539      510      -29     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@hannesdiedrich hannesdiedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for the explanations on- and offline.
Left a few follow up questions. Will LGTM once answered.

"anonymousRecipient": [],
}
try:
with ws_connect(
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we use websocket and not a simple HTTP request for sending?
For _listener I get it, but not here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly to reuse the same protocol when sending and receiving data. However I think that you are correct and it is much more reliable to use HTTP for sending data. Fixing this

@property
def now(self) -> DateTime:
"""Return the current time."""
return now("UTC")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand. If this is the only time we set the time-zone that this is fine. If not, we could have a constant on package level.

Comment thread src/gsy_e/external/proxy/ewcg_strategy.py
Comment thread src/gsy_e/external/proxy/ewcg_strategy.py Outdated
Comment thread src/gsy_e/external/proxy/connection.py Outdated
Comment thread .pylintrc
hannesdiedrich
hannesdiedrich previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Member

@hannesdiedrich hannesdiedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment on lines +52 to +54
base_url = _CG_GATEWAY_URL.rstrip("/")
self._ws_url = base_url + _CG_WS_PATH
self._http_url = base_url + _CG_HTTP_MESSAGES_PATH
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: We could use urllib.parse.urljoin here

Comment thread src/gsy_e/external/proxy/ewcg_strategy.py Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants