Skip to content

Add Durable Decorators directly to Python library #207

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

Merged
merged 5 commits into from
Apr 30, 2024

Conversation

davidmrdavid
Copy link
Contributor

@davidmrdavid davidmrdavid commented Mar 8, 2024

This PR attempts to provide an implementation of the Durable Functions decorators (for the V2 prog model) within the Python library itself. The trick is to simply expose the right interface but defer the implementation to the Durable Functions SDK.

This PR does just that. In particular, it:

  • Adds the DF decorator interfaces to the Python library. This will enable us to implement the DF templates for the V2 programming model with ease, as all DF triggers and bindings will now be exposed from the FunctionApp object.
  • It does not make the durable functions SDK a "prod" dependency of the library. The customer needs to bring the durable functions SDK within their app for this to work. If they do not depend on it, we throw a friendly error asking them to bring the DF SDK.
  • It makes the DF SDK part of this package's dev-dependencies. This allows us to write unit tests for this behavior.

Copy link

codecov bot commented Mar 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.16%. Comparing base (31f3d42) to head (330cd1d).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #207      +/-   ##
==========================================
+ Coverage   93.10%   93.16%   +0.06%     
==========================================
  Files          56       56              
  Lines        3247     3277      +30     
  Branches      666      667       +1     
==========================================
+ Hits         3023     3053      +30     
  Misses        137      137              
  Partials       87       87              
Flag Coverage Δ
unittests 93.13% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidmrdavid davidmrdavid force-pushed the dajusto/add-df-templates branch from 18d0d93 to 540e389 Compare March 11, 2024 17:28
@davidmrdavid davidmrdavid force-pushed the dajusto/add-df-templates branch from 540e389 to 1677c5c Compare March 11, 2024 17:31
@davidmrdavid davidmrdavid changed the title [WIP][Do not merge] Add Durable Decorators directly to Python library Add Durable Decorators directly to Python library Mar 11, 2024
@davidmrdavid davidmrdavid marked this pull request as ready for review March 11, 2024 17:57
@codecov-commenter
Copy link

codecov-commenter commented Apr 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.16%. Comparing base (b85eb7a) to head (330cd1d).

❗ Current head 330cd1d differs from pull request most recent head 8894236. Consider uploading reports for the commit 8894236 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #207      +/-   ##
==========================================
+ Coverage   93.10%   93.16%   +0.06%     
==========================================
  Files          56       56              
  Lines        3247     3277      +30     
  Branches      666      667       +1     
==========================================
+ Hits         3023     3053      +30     
  Misses        137      137              
  Partials       87       87              
Flag Coverage Δ
unittests 93.13% <100.00%> (+0.06%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@davidmrdavid
Copy link
Contributor Author

@gavin-aguiar : are we good to merge this?

@hallvictoria hallvictoria merged commit f79ff41 into dev Apr 30, 2024
12 checks passed
@hallvictoria hallvictoria deleted the dajusto/add-df-templates branch April 30, 2024 21:19
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.

5 participants