Skip to content

refactor: Task/span, and model behavior cleanup#232

Merged
monoxgas merged 1 commit intomainfrom
improve/task-span-and-model-cleanup
Jul 31, 2025
Merged

refactor: Task/span, and model behavior cleanup#232
monoxgas merged 1 commit intomainfrom
improve/task-span-and-model-cleanup

Conversation

@monoxgas
Copy link
Copy Markdown
Contributor

@monoxgas monoxgas commented Jul 31, 2025

Notes

  • Cleaning up span/task creation with tags and better names.
  • Refactor xml_example to take field info like examples and descriptions into account.
  • Rework to_pretty_xml to render multi-line text formatting better.
  • Add some better str logic for usage, tool calls, and chats
  • Fix multi-line text processing so they aren't over indented when parsed.
  • Update docs update workflow

Generated Summary

  • Replaced all occurrences of get_qualified_name with get_callable_name to provide more comprehensive and optionally short representations of callables.
  • Updated workflow configuration in docs-update.yaml to trigger docs updates on the correct repository (“docs” instead of “prod-docs”) and standardized event types.
  • Improved naming and logging spans across pipelines, prompts, and tools by removing redundant string formatting and adding tags (e.g. rigging/pipeline, rigging/prompt, rigging/tool).
  • Enhanced XML serialization and example generation in Model by adding multi-line text dedenting and better formatting, including comment insertion with field descriptions.
  • Updated string representations (str) in Chat, Message, and related classes to provide more concise and useful output with shortened content.
  • Adjusted test fixtures and added new tests (tests/test_model.py, updates in tests/test_xml_parsing.py and tests/test_prompt.py) to verify XML output consistency and correct parsing behavior.

This summary was generated with ❤️ by rigging

Refactor xml_example to take field info like examples and descriptions into account.
Rework to_pretty_xml to render multi-line text better.
Add some better __str__ logic for usage, tool calls, and chats
Fix multi-line text processing so they aren't over indented when parsed.
- Update docs update workflow
@monoxgas monoxgas requested a review from Copilot July 31, 2025 00:08
@monoxgas monoxgas requested a review from a team as a code owner July 31, 2025 00:08
@dreadnode-renovate-bot dreadnode-renovate-bot bot added area/docs Changes to documentation and guides area/tests Changes to test files and testing infrastructure type/docs Documentation updates and improvements area/github Changes made to GitHub Actions labels Jul 31, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR refactors span/task creation with better names and tags, improves XML generation and parsing behavior, and enhances string representations across various components.

  • Refactored XML example generation to include field descriptions and examples with proper escaping
  • Improved multi-line text processing to handle indentation consistently in XML parsing and generation
  • Enhanced string representations for better debugging with shortened parameter displays and consistent formatting

Reviewed Changes

Copilot reviewed 20 out of 20 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tests/test_xml_parsing.py Added multi-line text test cases and converted inline XML to dedented format for better readability
tests/test_prompt.py Simplified function definitions by removing unnecessary ellipsis syntax
tests/test_model.py Added comprehensive tests for XML example generation with various field configurations
rigging/util.py Refactored get_qualified_name to get_callable_name with improved naming logic and short name option
rigging/transform/xml_tools.py Enhanced __str__ method to show shortened parameters for better debugging
rigging/transform/json_tools.py Updated __str__ methods to use consistent formatting and parameter shortening
rigging/tools/base.py Modified tool execution to use shorten instead of truncate and improved span naming
rigging/prompt.py Updated function references and improved span naming with tags
rigging/model.py Major refactor of XML generation with custom pretty-printing and improved example generation
rigging/message.py Added shorten method and improved __str__ formatting
rigging/generator/base.py Added __str__ method to Usage class for better debugging
rigging/completion.py Updated callback naming and span creation
rigging/chat.py Enhanced Chat __str__ method and improved span/task naming throughout
docs/ Updated documentation to reflect API changes

@monoxgas monoxgas changed the title improve: Task/span, and model behavior cleanup refactor: Task/span, and model behavior cleanup Jul 31, 2025
@monoxgas monoxgas merged commit 08e4c46 into main Jul 31, 2025
7 of 8 checks passed
@monoxgas monoxgas deleted the improve/task-span-and-model-cleanup branch July 31, 2025 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/docs Changes to documentation and guides area/github Changes made to GitHub Actions area/tests Changes to test files and testing infrastructure type/docs Documentation updates and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants