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

Raise error on empty arguments to group #1008

Merged
merged 2 commits into from
Jul 5, 2024
Merged

Conversation

adzcai
Copy link
Contributor

@adzcai adzcai commented Jul 3, 2024

Fixes #1007

How I tested this

Hand testing.

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)
  • Dataflow documentation has been updated if adding/changing functionality.

@elijahbenizzy
Copy link
Collaborator

Great, thanks! If you rebase off of main the polars issue will be fixed.

Otherwise mind writing a test? Should be as simple as adding a line here with an empty args/kwargs, probably don't have to run locally.

.

@@ -176,6 +176,9 @@ def _validate_group_params(
f"Dependency: {dependency} is not a valid dependency type for group(), must be "
f"a LiteralDependency or UpstreamDependency."
)
raise InvalidDecoratorException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will always raise, no? Will want to add return statements above or something to get it to work.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Or an if statement for both of them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Oops! Thanks 👍

@elijahbenizzy
Copy link
Collaborator

Looking good! Mind rebasing off of main to fix the polars issue + ensure the tests pass? Then we can merge!

Copy link
Collaborator

@elijahbenizzy elijahbenizzy 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, thank you!

@@ -176,6 +176,9 @@ def _validate_group_params(
f"Dependency: {dependency} is not a valid dependency type for group(), must be "
f"a LiteralDependency or UpstreamDependency."
)
raise InvalidDecoratorException(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Or an if statement for both of them

@elijahbenizzy elijahbenizzy merged commit e8838e4 into DAGWorks-Inc:main Jul 5, 2024
22 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.

Misleading error reporting for parameterize.validate on group dependency with empty list
2 participants