scinumtools.dip package
Subpackages
- scinumtools.dip.config package
- Submodules
- scinumtools.dip.config.export module
- scinumtools.dip.config.export_bash module
- scinumtools.dip.config.export_c module
- scinumtools.dip.config.export_cpp module
- scinumtools.dip.config.export_fortran module
- scinumtools.dip.config.export_json module
- scinumtools.dip.config.export_rust module
- scinumtools.dip.config.export_toml module
- scinumtools.dip.config.export_yaml module
- Module contents
- scinumtools.dip.datatypes package
- scinumtools.dip.docs package
- Subpackages
- scinumtools.dip.docs.pdf package
- Submodules
- scinumtools.dip.docs.pdf.export module
- scinumtools.dip.docs.pdf.imports module
- scinumtools.dip.docs.pdf.injections module
- scinumtools.dip.docs.pdf.node module
- scinumtools.dip.docs.pdf.parameters module
- scinumtools.dip.docs.pdf.settings module
- scinumtools.dip.docs.pdf.sources module
- scinumtools.dip.docs.pdf.types module
- scinumtools.dip.docs.pdf.units module
- Module contents
- scinumtools.dip.docs.pdf package
- Submodules
- scinumtools.dip.docs.documentation module
- scinumtools.dip.docs.item_import module
- scinumtools.dip.docs.item_injection module
- scinumtools.dip.docs.item_node module
NodeItem
NodeItem.condition
NodeItem.constant
NodeItem.description
NodeItem.dformat
NodeItem.dtype
NodeItem.imported
NodeItem.injection
NodeItem.link_import
NodeItem.link_injection
NodeItem.link_source
NodeItem.name
NodeItem.options
NodeItem.precision
NodeItem.source
NodeItem.tags
NodeItem.target
NodeItem.unit
NodeItem.unsigned
NodeItem.value
- scinumtools.dip.docs.item_parameter module
- scinumtools.dip.docs.item_source module
- scinumtools.dip.docs.item_unit module
- scinumtools.dip.docs.settings module
- Module contents
- Subpackages
- scinumtools.dip.lists package
- Submodules
- scinumtools.dip.lists.list_branching module
- scinumtools.dip.lists.list_functions module
- scinumtools.dip.lists.list_hierarchy module
- scinumtools.dip.lists.list_nodes module
- scinumtools.dip.lists.list_sources module
- scinumtools.dip.lists.list_units module
- Module contents
- scinumtools.dip.nodes package
- Submodules
- scinumtools.dip.nodes.node module
- scinumtools.dip.nodes.node_base module
- scinumtools.dip.nodes.node_boolean module
- scinumtools.dip.nodes.node_case module
- scinumtools.dip.nodes.node_condition module
- scinumtools.dip.nodes.node_constant module
- scinumtools.dip.nodes.node_description module
- scinumtools.dip.nodes.node_empty module
- scinumtools.dip.nodes.node_float module
- scinumtools.dip.nodes.node_format module
- scinumtools.dip.nodes.node_group module
- scinumtools.dip.nodes.node_import module
- scinumtools.dip.nodes.node_integer module
- scinumtools.dip.nodes.node_mod module
- scinumtools.dip.nodes.node_option module
- scinumtools.dip.nodes.node_select module
- scinumtools.dip.nodes.node_source module
- scinumtools.dip.nodes.node_string module
- scinumtools.dip.nodes.node_table module
- scinumtools.dip.nodes.node_tags module
- scinumtools.dip.nodes.node_unit module
- scinumtools.dip.nodes.parser module
Parser
Parser.ccode
Parser.comment
Parser.formating
Parser.is_empty()
Parser.is_parsed()
Parser.kwd_case()
Parser.kwd_condition()
Parser.kwd_constant()
Parser.kwd_description()
Parser.kwd_format()
Parser.kwd_options()
Parser.kwd_source()
Parser.kwd_tags()
Parser.kwd_unit()
Parser.parsed
Parser.part_comment()
Parser.part_dimension()
Parser.part_equal()
Parser.part_expression()
Parser.part_format()
Parser.part_function()
Parser.part_indent()
Parser.part_name()
Parser.part_reference()
Parser.part_slice()
Parser.part_type()
Parser.part_units()
Parser.part_value()
- Module contents
- scinumtools.dip.pygments package
- scinumtools.dip.qt package
- scinumtools.dip.solvers package
- Submodules
- scinumtools.dip.solvers.function_solver module
- scinumtools.dip.solvers.logical_solver module
- scinumtools.dip.solvers.numerical_solver module
- scinumtools.dip.solvers.template_solver module
- Module contents
Submodules
scinumtools.dip.dip module
- class scinumtools.dip.dip.DIP(env: Environment | None = None, **kwargs)
Bases:
object
DIP parser class
- Parameters:
code (str) – DIP code
env (DIP_Environment) – DIP environment object
- add_file(filepath: str, source_name: str | None = None, absolute=True)
Load DIP code from a file
- Parameters:
filepath (str) – Path to a DIP file
absolute (bool) – Path is absolute
- add_function(name: str, fn: Callable)
- add_source(name: str, path: str)
- add_string(code: str)
Use DIP code from a string
- Parameters:
code (str) – DIP code
- add_unit(name: str, value: float, unit: str | None = None)
- env: Environment
- lines: List[dict]
- name: str
- nodes_hierarchy: list = ['group']
- nodes_nohierarchy: list = None
- nodes_notypes: list = None
- nodes_properties: list = ['option', 'constant', 'format', 'condition', 'tags', 'description']
- nodes_special: list = ['empty', 'unit', 'source']
- num_files: int = 0
- num_strings: int = 0
- parse()
Parse DIP nodes from code lines
- parse_docs()
Parse DIP node definitions for a documentation
- setup()
- source: tuple
scinumtools.dip.environment module
- class scinumtools.dip.environment.Environment(nodes: scinumtools.dip.lists.list_nodes.NodeList = <factory>, units: scinumtools.dip.lists.list_units.UnitList = <factory>, sources: scinumtools.dip.lists.list_sources.SourceList = <factory>, functions: scinumtools.dip.lists.list_functions.FunctionList = <factory>, hierarchy: scinumtools.dip.lists.list_hierarchy.HierarchyList = <factory>, branching: scinumtools.dip.lists.list_branching.BranchingList = <factory>, autoref: str = None, envtype: scinumtools.dip.settings.EnvType = 1)
Bases:
object
- autoref: str = None
- branching: BranchingList
- copy()
Copy a new object from self
- data(format: Format = 1, verbose: bool = False, query: str | None = None, tags: list | None = None)
Return parsed values as a dictionary
- Parameters:
verbose (bool) – Display node values
format (str) – Return data as values only, DIP datatypes, or tuples
query (str) – Node selection query
tags (list) – List of tags
- functions: FunctionList
- hierarchy: HierarchyList
- request(path: str, count: int | None = None, namespace: Namespace = 1, tags: list | None = None, errsrc: bool = True)
Request nodes from a path
- Parameters:
path (str) – Request path
count (int) – Number of nodes that should be selected
namespace (str) – Query namespace (nodes, sources, or units)
tags (list) – List of tags
errsrc (bool) – If ‘False’, missing sources will not throw errors
- sources: SourceList
scinumtools.dip.settings module
- class scinumtools.dip.settings.Format
Bases:
object
- NODE = 4
- QUANTITY = 5
- TUPLE = 2
- TYPE = 3
- VALUE = 1
- class scinumtools.dip.settings.Keyword
Bases:
object
- CASE = 'case'
- CONDITION = 'condition'
- CONSTANT = 'constant'
- DESCRIPTION = 'description'
- ELSE = 'else'
- END = 'end'
- FALSE = 'false'
- FORMAT = 'format'
- NONE = 'none'
- OPTIONS = 'options'
- SOURCE = 'source'
- TAGS = 'tags'
- TRUE = 'true'
- UNIT = 'unit'