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

Multi components #119

Merged
merged 8 commits into from
Oct 18, 2024
Merged

Multi components #119

merged 8 commits into from
Oct 18, 2024

Conversation

rafa-guedes
Copy link
Collaborator

New framework to define MultiComponent types from existing components.

A MultiComponents base class has been implemented to convert existing components into a list of their own types which can be used to render more than one instance of that command.

A new BLOCKS components has been implemented using that approach.

Other components have been implemented before to provide a similar ability of replicating SWAN commands, for example the QUANTITIES component. These existing classes should now be rewritten to use this new Base Class approach (this still needs to be done). There will be a small change from the user's perspective in that the main field for them will always be components now, which is different from the existing ones which use custom fields for each class (for example, in the case of QUANTITIES, the field is called quantities, for the CURVES component the field is currently defined as curves, and so on).

This pull request should address #118 from @alsonathif

@rafa-guedes
Copy link
Collaborator Author

@alsonathif, @benjaminleighton, @pbranson if you could have a look at this please that would be great, and some of you could perhaps review / merge it if happy. I have started a new notebook where there is an example of using the new BLOCKS component (as usual, the docstring of the component class itself also has some example).

@pbranson
Copy link
Member

Thanks @rafa-guedes lgtm

@pbranson pbranson merged commit 8bb14ad into main Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants