The pytree module
The maia.pytree module is dedicated to the exploration, manipulation and comparison
of python CGNS trees. This module is independant of maia representation of
parallel trees ; its content executes in a sequential context.
Motivations
This module tries to achieve the following goals:
Light, portable and easy to install
By avoiding compiled code and minimizing external dependencies,
maia.pytree should work on every machine.
Committed to CGNS standard
maia.pytree works with nothing more than the standard
CGNS/Python mapping
which makes it easily interoperable.
In addition, it exploits the
CGNS/SIDS description
to propose relevant actions on specific nodes.
Modern python
We hope that type hints, detailled docstrings and adhesion to PEP8 guidelines
will make your user experience of maia.pytree as pleasant as possible.
Code quality
Thoroughly tested functionalities, continuous integration setup and automatically
tested documentation make maia.pytree as reliable as possible.
Note
This module is still under construction. We are trying our best to fulfill the above goals. Contributions and feedbacks are welcomed on Gitlab !
Using the documentation
This documentation serves as an API reference but also as a tutorial to explain
the different features of maia.pytree.
Unless otherwise specified, all the described
functions are accessible from the module namespace, shortened as PT:
import maia.pytree as PT
Code snippets appearing in this documentation follow the doctest formatting:
>>> PT.__name__ # Command prompted
'maia.pytree' # Expected output
The features are regrouped in the following sections:
Basic node editing : how to edit the information of a given CGNSNode
Node inspection : how to get label-specific information from a CGNSNode
Node creation presets : how to create label-specific CGNSNodes with suitable options
Node searching : how to search specific nodes in a CGNSTree from various criteria
Tree operations : how to perfom various operations implying one or more CGNSTrees
Yaml parsing : how to use a Yaml format to read or write CGNSTrees