scinumtools.dip.lists package
Submodules
scinumtools.dip.lists.list_branching module
- class scinumtools.dip.lists.list_branching.Branch(cases: list = <factory>, types: list = <factory>, nodes: dict = <factory>)
Bases:
object
- cases: list
- nodes: dict
- types: list
- class scinumtools.dip.lists.list_branching.BranchingList(state: List[str] = <factory>, branches: Dict[str, scinumtools.dip.lists.list_branching.Branch] = <factory>, cases: Dict[str, scinumtools.dip.lists.list_branching.Case] = <factory>, num_cases: int = 0, num_branches: int = 0)
Bases:
object
- false_case()
Checks if case value is false
- num_branches: int = 0
- num_cases: int = 0
- prepare_node(node)
Manage parameter nodes in a condition
- Parameters:
node – Parameter node
- register_case()
Add a new case
- solve_case(node)
Manage condition nodes
- Parameters:
node – Condition node
- state: List[str]
scinumtools.dip.lists.list_functions module
scinumtools.dip.lists.list_hierarchy module
- class scinumtools.dip.lists.list_hierarchy.HierarchyList(parents: List[scinumtools.dip.lists.list_hierarchy.Parent] = <factory>)
Bases:
object
- register(node, excluded)
Register new node to the hierarchy
- Parameters:
node – Node that should be added
excluded (list) – List of node keywords that should be excluded from the parents
scinumtools.dip.lists.list_nodes module
scinumtools.dip.lists.list_sources module
- class scinumtools.dip.lists.list_sources.EnvSource(name: str, path: str, code: str, parent: tuple = None, nodes: scinumtools.dip.lists.list_nodes.NodeList = None, sources: 'SourceList' = None)
Bases:
object
- code: str
- name: str
- parent: tuple = None
- path: str
- sources: SourceList = None
- class scinumtools.dip.lists.list_sources.SourceList(sources: Dict = <factory>)
Bases:
object
- append(name: str, path: str, code: str, parent: tuple | None = None)
Append a new source
- Parameters:
name (str) – Name of a new source
source – Source can be either a DIP object or a text
path (str) – Source path
- copy()
Copy a new object from self
- items()
- keys()
- query(query: str)
Select sources according to a query
- Parameters:
query (str) – Source selection query
- sources: Dict
scinumtools.dip.lists.list_units module
- class scinumtools.dip.lists.list_units.UnitList(units: Dict = <factory>)
Bases:
object
- append(name: str, value: str, units: str, unit: Quantity, source: tuple)
Add a new source
- Parameters:
name (str) – Name of a new unit
unit (Quantity) – Quantity object
- items()
- keys()
- query(query: str)
Select units according to a query
- Parameters:
query (str) – unit selection query
- units: Dict