-
Notifications
You must be signed in to change notification settings - Fork 42
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
[localprocessing] processing.py updates #411
[localprocessing] processing.py updates #411
Conversation
is this related to the version bumps of #409? |
Yes indeed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏾
process_registry[func.__name__] = Process( | ||
spec=specs[func.__name__], implementation=func | ||
) | ||
return process_registry |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unless I'm missing something, I think this can be done more compactly with:
for name, func in inspect.getmembers(
openeo_processes_dask.process_implementations,
inspect.isfunction,
):
process_registry[name] = Process(
spec=getattr(openeo_processes.specs, name),
implementation=func
)
Also, wouldn't it be better that openeo_processes_dask provide helpers to list implementations/spec, instead of having to use ugly inspect.getmembers
and getattr
constructs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LukeWeidenwalker sorry if I tag you again, but I wasn't involved in this development of openeo-processes-dask so I couldn't tell the reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah apologies, I missed this tag - yes, agree with Stefaan, this is something openeo-processes-dask could do better - have created an issue to do this at some point!
Open-EO/openeo-processes-dask#92
@soxofaan please merge this when you have time, so that we can include it in a release before SRR5 |
merged in master |
Adapted the syntax to comply with the new versions of the dependencies.