Skip to content

BUG: method signature in modular input generated helper file #1724

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

Open
pmeyerson opened this issue May 6, 2025 · 0 comments
Open

BUG: method signature in modular input generated helper file #1724

pmeyerson opened this issue May 6, 2025 · 0 comments
Labels
bug Something isn't working triage Pending triage from maintainers

Comments

@pmeyerson
Copy link

Description

When ucc-gen init generates a modular input helper file, the method signatures for validate_input() and stream_events() should also include the self attribute. This would match the output of the modular input script file when ucc-gen build is called, which does include the attribute.

change the built myInput.py stream_events and validate_input methods from:

    def validate_input(self, definition: smi.ValidationDefinition):
        return validate_input(definition)

    def stream_events(self, inputs: smi.InputDefinition, ew: smi.EventWriter):
        return stream_events(inputs, ew)

to

  def validate_input(self, definition: smi.ValidationDefinition):
        return validate_input(**self**, definition)

    def stream_events(self, inputs: smi.InputDefinition, ew: smi.EventWriter):
        return stream_events(**self**, inputs, ew)](url)

change the generated input helper file from

def validate_input(definition: smi.ValidationDefinition):
    return


def stream_events(inputs: smi.InputDefinition, event_writer: smi.EventWriter):
    # inputs.inputs is a Python dictionary object like:
    # {
    #   "myInput://<input_name>": {
    #     "account": "<account_name>",
    #     "disabled": "0",`
  ...

to


def validate_input(**self**, definition: smi.ValidationDefinition):
    return


def stream_events(**self**, inputs: smi.InputDefinition, event_writer: smi.EventWriter):
    # inputs.inputs is a Python dictionary object like:
    # {
    #   "myInput://<input_name>": {
    #     "account": "<account_name>",
    #     "disabled": "0",

What UCC version are you using?

5.63.0

Additional System Info

python 3.9

@pmeyerson pmeyerson added bug Something isn't working triage Pending triage from maintainers labels May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage Pending triage from maintainers
Projects
None yet
Development

No branches or pull requests

1 participant