Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds note on ApplicationContext and how to use it #446

Merged
merged 2 commits into from
Dec 2, 2024

Conversation

skrawcz
Copy link
Contributor

@skrawcz skrawcz commented Dec 2, 2024

So that people know how to access the current app_id, partition_key, or sequence_id...

Changes

  • docs

How I tested this

  • via build

Notes

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

Important

Adds documentation on accessing ApplicationContext in Burr applications via __context in action signatures.

  • Documentation:
    • Adds a note in ApplicationContext docstring in application.py on accessing app_id, partition_key, and sequence_id using __context in action signatures.
    • Updates state-persistence.rst to include instructions on injecting ApplicationContext into Burr Actions for accessing app_id and partition_key.

This description was created by Ellipsis for e2b8c7b. It will automatically update as commits are pushed.

So that people know how to access the current app_id,
partition_key, or sequence_id...
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Reviewed everything up to 9e2cf88 in 24 seconds

More details
  • Looked at 62 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. burr/core/application.py:492
  • Draft comment:
    The added documentation provides a clear example of how to access the ApplicationContext in a running application. This is a helpful addition for users to understand how to access context-specific information like app_id and partition_key.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR adds documentation on how to access the ApplicationContext in a running application. This is a useful addition for users to understand how to access context-specific information like app_id and partition_key.
2. docs/concepts/state-persistence.rst:46
  • Draft comment:
    The added note provides a clear explanation of how to access app_id and partition_key in a running application by injecting ApplicationContext into Burr Actions. This is a helpful addition for users to understand how to access context-specific information.
  • Reason this comment was not posted:
    Confidence changes required: 0%
    The PR adds a note on how to access app_id and partition_key in a running application by injecting ApplicationContext into Burr Actions. This is a useful addition for users to understand how to access context-specific information.

Workflow ID: wflow_LVTbBJvwiUNz4G8O


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Copy link

github-actions bot commented Dec 2, 2024

A preview of e2b8c7b is uploaded and can be seen here:

https://burr.dagworks.io/pull/446

Changes may take a few minutes to propagate. Since this is a preview of production, content with draft: true will not be rendered. The source is here: https://github.com/DAGWorks-Inc/burr/tree/gh-pages/pull/446/

@skrawcz skrawcz merged commit 3e8e53a into main Dec 2, 2024
11 checks passed
@skrawcz skrawcz deleted the add_app_context_docs branch December 2, 2024 05:56
Copy link

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

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

👍 Looks good to me! Incremental review on e2b8c7b in 10 seconds

More details
  • Looked at 13 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_sa6VSldNfa6lEcd6


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant