-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: python server #6
Conversation
WinPlay02
commented
Nov 6, 2023
•
edited
Loading
edited
- every execution needs a unique id to identify calculated values
- executes compiled safe-ds code in memory (using a finder / loader)
- pipelines are executed in child processes
- communication from child processes to the main process uses a shared memory queue
- allows connections via websocket (and http)
- listens on a provided port (default 5000)
- uses flask and flask-sock for HTTP and WS
- uses gevent as WSGI implementation
feat: accept websocket & http connections test: added a partial test case for in memory execution Co-authored-by: Jonas B <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 2 6 +4
Lines 13 317 +304
==========================================
+ Hits 13 317 +304 ☔ View full report in Codecov by Sentry. |
🦙 MegaLinter status: ✅ SUCCESS
See detailed report in MegaLinter reports |
…ain process using a queue
docs: added comments for functions
test: changed test to new execution
misc: disable linter for global variables + blind exception catching, where needed
test: mock-test all websocket interactions fix: use creation functions, where applicable
@lars-reimann Collecting coverage information across child processes (
This also does not work, it only causes the testing process to freeze when calling |
I have no experience with this. Maybe the pytest-cov documentation helps. |
…eems to be broken)
…o python-server # Conflicts: # tests/safeds_runner/server/test_websocket_mock.py
…ulation misc: remove main function and flask specific entry points from coverage calculation
It seems to be a problem only on Windows, as the CI passes. I annotated the tests skip execution on Windows for now. |
tests/safeds_runner/server/test_pipeline_manager_type_conversion.py
Outdated
Show resolved
Hide resolved
refactor: use dataclasses as message storage instead of dicts test: make placeholder conversion test parametrized test: only skip multiprocessing tests on windows, when coverage is enabled
…o python-server # Conflicts: # src/safeds_runner/server/main.py # src/safeds_runner/server/pipeline_manager.py # tests/safeds_runner/server/test_websocket_mock.py
…server # Conflicts: # poetry.lock # pyproject.toml
Co-authored-by: Lars Reimann <[email protected]>
I think I addressed all the suggestions. Now, the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great overall. I just have some minor requests.
refactor: hide attributes that don't need to be public
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great contribution, thanks! 👍
## [0.2.0](v0.1.0...v0.2.0) (2023-11-30) ### Features * python server ([#6](#6)) ([a2c4f0f](a2c4f0f))
🎉 This PR is included in version 0.2.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |