Skip to content

fix: API-level task/run input and output handling#50

Merged
monoxgas merged 2 commits into
mainfrom
fix/api-run-task-objects
May 13, 2025
Merged

fix: API-level task/run input and output handling#50
monoxgas merged 2 commits into
mainfrom
fix/api-run-task-objects

Conversation

@monoxgas
Copy link
Copy Markdown
Contributor

@monoxgas monoxgas commented May 13, 2025

  • Replaced Run with RunSummary in the list_runs method of ApiClient to return more aggregated run information.
  • Introduced _get_run as a private method in ApiClient to improve encapsulation while maintaining an existing get_run method that now processes run information through the process_run utility function, enhancing data integrity.
  • Updated get_run_tasks to now convert tasks into Task objects processed with the context of RawRun, allowing for deeper integration of run context with tasks.
  • Modified the get_run_trace logic to enhance how task and trace spans are constructed, introducing better error handling and readability.
  • Created a new utility module with functions process_run and process_task, separating concerns and improving the maintainability of the code.
  • Added detailed fields with repr=False in various models to improve logging and debugging without exposing sensitive data.

Generated Summary:

  • Refactored ApiClient methods to use new model structures for runs and tasks.
  • Updated list_runs to return RunSummary instead of Run, which simplifies run result handling.
  • Introduced helper functions process_run and process_task to transform raw data into structured models while handling references and schemas.
  • Updated models to include new RawRun and RawTask classes, separating raw input from processed data.
  • Added field representations for tracing attributes to improve debugging without exposing sensitive data in logs.
  • Introduced util.py for processing logic, contributing to better code organization and separation of concerns.
  • Removed the fast-depends library from pyproject.toml as it is no longer necessary.
  • Potential impact includes improved data handling and processing efficiency, reducing the risk of inconsistencies in raw data interpretation.

This summary was generated with ❤️ by rigging

@dreadnode-renovate-bot dreadnode-renovate-bot Bot added the area/python Changes to Python package configuration and dependencies label May 13, 2025
@monoxgas monoxgas merged commit 0b141bf into main May 13, 2025
8 checks passed
@monoxgas monoxgas deleted the fix/api-run-task-objects branch May 13, 2025 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/python Changes to Python package configuration and dependencies

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant