enekoreto opened a new pull request, #978: URL: https://github.com/apache/burr/pull/978
Most of the parallelism examples (the docs page and the docstrings in `burr/core/parallelism.py`) fail when you copy them. I ran into this while trying `MapStates` locally. ## Changes - Calls that don't exist or are used wrong: `.with_name()` on functions (functions are named automatically), `.with_action(` instead of `.with_actions(`, a missing `.with_entrypoint()`, and `is_async` written as a property. The `MapStates` docstring also had `inputs` and `context` swapped, same as #553 fixed for `MapActions`. - Wrong method signatures: the async example (`action`/`states`), `MapActions.reduce`, and `TaskBasedParallelAction.tasks` / `SubGraphTask(graph=...)`. - Small bugs inside the examples: missing `:`, `state` imported instead of `State`, `query` instead of `query_llm`, and keys that are read but never written. ## How I tested this I ran every code block on the page and every docstring example with a stub `_query_my_llm`. On main 9 of them fail, with this change all of them run. The snippets that are partial on purpose (`... # same as above`, bare `await`) I checked by hand. pre-commit and the test suite pass, and the docs build with the same warnings as main. ## Notes `docs/concepts/actions.rst` has the same `@property is_async` mistake, I left it out to keep this to one page. Happy to split this PR if smaller ones are easier to review. This was done with AI assistance (Claude Code), and checked by running every example as described above. ## Checklist - [x] PR has an informative and human-readable title (this will be pulled into the release notes) - [x] Changes are limited to a single goal (no scope creep) - [x] Code passed the pre-commit check & code is left cleaner/nicer than when first encountered. - [x] 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 - [x] Project documentation has been updated if adding/changing functionality. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
