ats_utilities.base.ibase module

Module

ibase.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 abstract class IBase with method(s). Interface for ATS base setup.

class ats_utilities.base.ibase.IBase[source]

Bases: ABC

Defines abstract class IBase with method(s). Interface for ATS base setup.

It defines:

attributes:

None

methods:
is_initialized - Checks if the base component is initialized.
add_new_option - Adds a new option for the CL interface.
parse_args - Parses the CLI arguments.
process - Processes and runs tool operations.
__str__ - Returns the ATS base as string representation.
_abc_impl = <_abc._abc_data object>
abstractmethod add_new_option(*args: str, **kwargs: Any) None[source]

Adds a new option for the CL interface.

Parameters:
  • args (<str>) – Arguments in string form

  • kwargs (<Any>) – Arguments in Any form

Exceptions:

NotImplementedError.

abstractmethod is_initialized() bool[source]

Checks if the base component is initialized.

Returns:

True (success) | False (fail)

Return type:

<bool>

Exceptions:

NotImplementedError.

abstractmethod parse_args(argv: Sequence[str] | None) OptionNamespace | None[source]

Parses the CLI arguments.

Parameters:

argv (<ArgSeq>) – Sequence of arguments | None

Returns:

Options and arguments | None

Return type:

<OptionNamespace | None>

Exceptions:

NotImplementedError.

abstractmethod process(verbose: bool = False) bool[source]

Processes and runs tool operations.

Parameters:

verbose (<bool>) – Enable/Disable verbose option (default False)

Returns:

True (success) | False (fail)

Return type:

<bool>

Exceptions:

NotImplementedError.