ats_utilities.splasher.component_bundle module

Module

component_bundle.py

Copyright

Copyright (C) 2017 - 2026 Vladimir Roncevic <elektron.ronca@gmail.com> ats_utilities is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ats_utilities is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Info

Defines component bundle dataclass for dependency grouping and management. Encapsulates splash screen components to minimize constructor overhead.

class ats_utilities.splasher.component_bundle.SplashComponentBundle(prop: dict[Any, Any] | None = None, splash_property: ISplashProperty | None = None, terminal_property: ITerminalProperties | None = None, github: IExtInfrastructure | None = None, ext: IExtInfrastructure | None = None, pb: IProgressBar | None = None, context_bundle: ContextBundle | None = None)[source]

Bases: object

Defines component bundle dataclass for dependency grouping and management. Encapsulates splash screen components to minimize constructor overhead.

It defines:

attributes:
prop - Splash screen property in dict format (default None).
splash_property - Splash screen property API (default None).
terminal_property - Terminal properties API (default None).
github - GitHub infrastructure for hyperlinks (default None).
ext - Generic external infrastructure for hyperlinks (default None).
pb - Progress bar component (default None).
context_bundle - Context bundle for dependency injection (default None).
methods:
validate - Validates that essential components are set.
merge - Merges non-None values from another bundle into this one.
to_dict - Converts the bundle attributes to a dictionary.
context_bundle: ContextBundle | None = None
ext: IExtInfrastructure | None = None
github: IExtInfrastructure | None = None
merge(other: SplashComponentBundle) None[source]

Merges non-None values from another bundle into this one.

Parameters:

other (<SplashComponentBundle>) – Another bundle to merge into this one.

Exceptions:

None.

pb: IProgressBar | None = None
prop: dict[Any, Any] | None = None
splash_property: ISplashProperty | None = None
terminal_property: ITerminalProperties | None = None
to_dict() dict[source]

Converts the bundle attributes to a dictionary.

Returns:

Dictionary representation of the bundle attributes.

Return type:

<dict>

Exceptions:

None.

validate() None[source]

Validates that essential components are set.

Exceptions:

ValueError.