Skip to content

Conversation

@nkanazawa1989
Copy link
Collaborator

@nkanazawa1989 nkanazawa1989 commented Nov 12, 2021

Summary

This PR simplifies the interface of data processor.

Currently the processor has two interfaces:

nominals, error, history = my_processor.call_with_history(data)
nominals, error = my_processor(data)

to eliminate boilerplate code it internally implements _call_internals method, but its return type will dynamically change depending on input flag.

Details and comments

This PR simplifies the implementation by redefining the history mode as a callback. Namely,

history = DataLogger()

nominals, error = my_processor(data, callback=history)
history.data()

if you don't need history you just

nominals, error = my_processor(data)

so you can use the same interface.

@nkanazawa1989 nkanazawa1989 added the blocked Can't be worked on until another issue is resolved label Nov 12, 2021
@CLAassistant
Copy link

CLAassistant commented Jul 18, 2023

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


knzwnao seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked Can't be worked on until another issue is resolved

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants