Safe-DS / Runner

Execute Safe-DS programs that were compiled to Python.
MIT License
2 stars 0 forks source link

feat: python server #6

Closed WinPlay02 closed 10 months ago

WinPlay02 commented 11 months ago
codecov[bot] commented 11 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (1cb1ba1) 100.00% compared to head (e949194) 100.00%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #6 +/- ## ========================================== Coverage 100.00% 100.00% ========================================== Files 2 6 +4 Lines 13 317 +304 ========================================== + Hits 13 317 +304 ```

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

github-actions[bot] commented 11 months ago

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 8 0 0 0.62s
✅ PYTHON mypy 8 0 1.7s
✅ PYTHON ruff 8 0 0 0.03s
✅ REPOSITORY git_diff yes no 0.02s

See detailed report in MegaLinter reports _Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff_

_MegaLinter is graciously provided by OX Security_

WinPlay02 commented 10 months ago

@lars-reimann Collecting coverage information across child processes (multiprocessing) does not seem to work. I tried adding this section to .coveragerc:

[run]
parallel = True
concurrency = multiprocessing, thread

This also does not work, it only causes the testing process to freeze when calling multiprocessing.Manager() during setup. Is there any (other) way to make coverage work with multiprocessing?

lars-reimann commented 10 months ago

I have no experience with this. Maybe the pytest-cov documentation helps.

WinPlay02 commented 10 months ago

It seems to be a problem only on Windows, as the CI passes. I annotated the tests skip execution on Windows for now. Although they work when coverage calculation does not include multiprocessing (in .coveragerc, see above).

lars-reimann commented 10 months ago

It seems to be a problem only on Windows, as the CI passes. I annotated the tests skip execution on Windows for now. Although they work when coverage calculation does not include multiprocessing (in .coveragerc, see above).

I can't reproduce this on a Windows machine. pytest --cov=safeds_runner --cov-report=xml works fine even when the skipped tests are included.

WinPlay02 commented 10 months ago

I think I addressed all the suggestions. Now, the PipelineManager class takes the place of most of the global variables. It is created at startup and used in the websocket session. But I couldn't get rid of the current_pipeline global in pipeline_manager.py as it is used for saving placeholders.

lars-reimann commented 10 months ago

:tada: This PR is included in version 0.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: