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

Enrich protocol API #1028

Open
alecandido opened this issue Oct 25, 2024 · 0 comments
Open

Enrich protocol API #1028

alecandido opened this issue Oct 25, 2024 · 0 comments

Comments

@alecandido
Copy link
Member

alecandido commented Oct 25, 2024

It may be useful to have more flexible operations at hand with the protocols.

In particular, you may want to invoke only part of a routine.
E.g. it may be useful to acquire data with one protocol, and fit with another one (or "manually"), but then use again the original protocol's plot.

The original idea of protocols is to bundle together elements that are closely related, since they will be most often executed together. Nevertheless, allowing more atomic access may enhance composition.

Technical proposal

Instead of returning a dynamically defined function from Executor.__getattribute__

def wrapper(

the access operation may return an instance of an object, whose __call__ method will reproduce the current behavior of wrapper(), but that will allow accessing the other stages (functions) and attributes (types) through dedicated methods (e.g. .acquisition and .fit), while still registering the execution results in the History as much as possible.

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

No branches or pull requests

1 participant