Skip to content
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

Add group_by to composite tool function (#1053) #1088

Merged

Conversation

ormaq
Copy link
Contributor

@ormaq ormaq commented Dec 20, 2024

Related Issue(s):

Closes #1053

Proposed Changes:

For inclusion in changelog (if applicable):

  1. Added group_by parameter to the composite_tool function to define grouping behavior.

Not intended for changelog:

  1. Improved validation for group_by parameter values.

Diff of User Interface

Old behavior:

  • No group_by option available for composite_tool.

New behavior:

  • composite_tool now supports group_by with the following options:
    • "order": Creates a single composite output.
    • "strip_id": Creates multiple composites grouped by strip_id.

PR Checklist:

  • This PR is as small and focused as possible.
  • If this PR includes proposed changes for inclusion in the changelog, the title of this PR summarizes those changes and is ready for inclusion in the Changelog.
  • I have updated docstrings for function changes and docs in the 'docs' folder for user interface / behavior changes.
  • This PR does not break any examples or I have updated them.

(Optional) @mentions for Notifications:

@stephenhillier
Copy link
Contributor

@ormaq thanks for opening a PR! The lint is failing due to formatting - it looks like it expects the new error string to be on its own line. I use yapf --in-place <file> for this (with yapf installed, of course). Let me know if you need help getting through the lint check.

In the meantime, I will ping somebody from the Orders API to have a quick look. Thanks again!

@ischneider
Copy link
Member

While ValueError is semantically appropriate here (type is correct, value inappropriate), the pattern in this library is to use a ClientError.

@stephenhillier stephenhillier merged commit b58146a into planetlabs:main Jan 3, 2025
9 checks passed
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.

Add group_by to the composite tool function
4 participants