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

make config optional when creating a component #194

Merged
merged 4 commits into from
Nov 10, 2023
Merged

Conversation

pmeier
Copy link
Member

@pmeier pmeier commented Nov 10, 2023

I feel it is kinda annoying to always pass a config when trying to instantiate a component, e.g. #189 (comment). There should be no harm to provide a default. When the components are instantiated for the queue we always pass a config

ragna/ragna/core/_queue.py

Lines 126 to 130 in dc497ef

if load:
if not cls.is_available():
raise RagnaException("Component not available", name=cls.display_name())
instance = cls(self._config)

Meaning, we can be sure that all components that are used "in process" receive the right config.

@pmeier pmeier merged commit c132661 into main Nov 10, 2023
10 checks passed
@pmeier pmeier deleted the optional-config branch November 10, 2023 23:22
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.

None yet

1 participant