Skip to content

A Python wrapper to convert XML documentation into Python source code with its Sphinx documentation.

License

Notifications You must be signed in to change notification settings

ansys/pyconverter-xml2py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

88fc639 · Jan 17, 2025
Dec 9, 2024
Jan 8, 2025
Dec 4, 2024
Jan 16, 2025
Jan 17, 2025
Jul 24, 2023
Dec 4, 2024
Apr 18, 2023
Dec 11, 2024
Jan 19, 2024
Apr 19, 2023
Apr 18, 2023
Apr 19, 2023
Apr 18, 2023
Apr 18, 2023
Jul 24, 2023
Jan 10, 2025
Jan 14, 2025
Dec 23, 2024
Dec 9, 2024

Repository files navigation

PyConverter-XML2Py

A Python wrapper to convert XML documentation into Python source code with its related Sphinx documentation.

PyAnsys pypi GH-CI codecov MIT black

Overview

The PyConverter-XML2Py project aims to automatically generate a Python library and a related Sphinx documentation from an XML documentation.

Documentation and issues

On the PyConverter-XML2Py Issues for this repository, you can create issues to submit questions, report bugs, and request new features. To reach the PyAnsys support team, email pyansys.core@ansys.com.

Getting started

Install the pyconverter-xml2py package with:

python -m pip install pyconverter-xml2py

It is recommended to organize the XML documentation as follow:

./doc/source/user_guide/images/diags/graphviz-diag_directory.png

Converting an XML-directory

Once the XML_directory is correctly organized, the converter can be run.

pyconverter-xml2py package -x XML_directory_path

If some functions need to be customized, the path containing the python files can be specified.

pyconverter-xml2py package -x XML_directory_path -f customized_function_directory_path

A new package is then automatically generated. Its default name is package. It is organized as follow:

./doc/source/user_guide/images/diags/graphviz-diag_package.png

Then, the Sphinx documentation can be generated from this package. The following code is to render the documentation as an HTML one from Windows:

cd package
pip install -e .[doc,tests] # Using a virtual environment is recommended.
.\doc\make.bat html