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

[BUG]: Fix incorrect typing for the @stage and @source decorators #1812

Closed
2 tasks done
mdemoret-nv opened this issue Jul 12, 2024 · 0 comments · Fixed by #1831
Closed
2 tasks done

[BUG]: Fix incorrect typing for the @stage and @source decorators #1812

mdemoret-nv opened this issue Jul 12, 2024 · 0 comments · Fixed by #1831
Assignees
Labels
bug Something isn't working

Comments

@mdemoret-nv
Copy link
Contributor

Version

24.06

Which installation method(s) does this occur on?

Source

Describe the bug.

When creating a stage using the @stage decorator, python linters and language services report errors when using these stages because the config type is unexpected or keyword arguments are missing.

A quick prototype had good results using ParamSpec object. For example:

_InputT = typing.TypeVar('_InputT')
_OutputT = typing.TypeVar('_OutputT')
_P = typing.ParamSpec('_P')

def stage(on_data_fn: typing.Callable[typing.Concatenate[_InputT, _P], _OutputT] = None,
          *,
          name: str = None,
          accept_type: type = None,
          compute_schema_fn: ComputeSchemaType = None,
          needed_columns: dict[str, TypeId] = None):

Minimum reproducible example

No response

Relevant log output

Click here to see error details

[Paste the error here, it will be hidden by default]

Full env printout

Click here to see environment details

[Paste the results of print_env.sh here, it will be hidden by default]

Other/Misc.

No response

Code of Conduct

  • I agree to follow Morpheus' Code of Conduct
  • I have searched the open bugs and have found no duplicates for this bug report
@mdemoret-nv mdemoret-nv added the bug Something isn't working label Jul 12, 2024
@morpheus-bot-test morpheus-bot-test bot moved this from Todo to Review - Ready for Review in Morpheus Boards Aug 2, 2024
@rapids-bot rapids-bot bot closed this as completed in #1831 Aug 7, 2024
@rapids-bot rapids-bot bot closed this as completed in 929531f Aug 7, 2024
@github-project-automation github-project-automation bot moved this from Review - Ready for Review to Done in Morpheus Boards Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants