dapr / python-sdk

Dapr SDK for Python
Apache License 2.0
232 stars 127 forks source link

Mock Actor merge attempt 2 (see desc) #750

Open lor1113 opened 3 weeks ago

lor1113 commented 3 weeks ago

New merge request made due to manually copying changes into a new branch being seemingly the only way to avoid weird git diff issues.

Description

Added Mock Actor capability.

NOTE: Due to not being able to get dapr-docs running in its own dev container despite repeated attempts (I am simply not a frontend coder so i don't know how to debug all the weird errors it was spitting out), I have not been able to actually view the new documentation within a running instance of the website. I have written it nonetheless using the same templating as the others, as well as basic markdown syntax, but it would be appreciated if someone who has a develop version of the docs website working on their machine could just give it a quick look to make sure it's not somehow broken.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #737

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

lor1113 commented 2 weeks ago

@elena-kolevska

The file was renamed such that it would be able to have sub-files, like how the main "Extensions" page under the Python SDK documentation is called "index.md" (https://docs.dapr.io/developing-applications/sdks/python/python-sdk-extensions/) with the idea that the mock actor documentation could be confined to a sub-file for brevity.

Requested changes have been made regardless. It's now simply appended to the end of the current actor documentation.

lor1113 commented 6 days ago

This should fix the formatting and type issues (with some type:ignores, but I don't think there's a better way without significant work), I also re-ran the tests to make sure they didn't break since I last checked them (worth noting that I do actually get some tests breaking, some random grpc client ones, possibly because I'm just running directly on windows and not using a dev container since it kept breaking for me). All the actor tests + the new ones I added run OK at least.

codecov[bot] commented 6 days ago

Codecov Report

Attention: Patch coverage is 57.73196% with 82 lines in your changes missing coverage. Please review.

Project coverage is 84.92%. Comparing base (bffb749) to head (e17a85b). Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
dapr/actor/runtime/mock_state_manager.py 49.04% 80 Missing :warning:
dapr/actor/runtime/state_manager.py 71.42% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #750 +/- ## ========================================== - Coverage 86.63% 84.92% -1.71% ========================================== Files 84 89 +5 Lines 4473 4975 +502 ========================================== + Hits 3875 4225 +350 - Misses 598 750 +152 ```

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


🚨 Try these New Features: