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.

../_images/pip.png

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.

../_images/sids_warning.png

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.

../_images/vscode_hints.png

Code quality

Thoroughly tested functionalities, continuous integration setup and automatically tested documentation make maia.pytree as reliable as possible.

../_images/badges.svg

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: