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

branches: Dict[str, Branch]
cases: Dict[str, Case]
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]
class scinumtools.dip.lists.list_branching.Case(path: str, value: bool, code: str, expr: str, branch_id: str, branch_part: str, case_id: str, case_type: str)

Bases: object

branch_id: str
branch_part: str
case_id: str
case_type: str
code: str
expr: str
path: str
value: bool

scinumtools.dip.lists.list_functions module

class scinumtools.dip.lists.list_functions.FunctionList(functions: Dict = <factory>)

Bases: object

append(name, function)
functions: Dict

scinumtools.dip.lists.list_hierarchy module

class scinumtools.dip.lists.list_hierarchy.HierarchyList(parents: List[scinumtools.dip.lists.list_hierarchy.Parent] = <factory>)

Bases: object

parents: List[Parent]
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

class scinumtools.dip.lists.list_hierarchy.Parent(indent: int, name: str)

Bases: object

indent: int
name: str

scinumtools.dip.lists.list_nodes module

class scinumtools.dip.lists.list_nodes.NodeList(nodes: List = <factory>)

Bases: object

append(node)
keys()
nodes: List
pop()
prepend(nodes)
query(query: str, tags: list | None = None, order: Order | None = None)

Select local nodes according to a query

Parameters:
  • query (str) – Node selection query

  • tags (list) – List of tags

  • order (Order) – List ordering

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
nodes: NodeList = None
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

Module contents