The create_files.py
module#
Summary#
Remove src/ansys/mechanical/stubs directory. |
|
Get the install directory and version of Ansys Mechanical installed on the system. |
|
Get published type if it exists. |
|
Generate the Mechanical stubs based on assembly files. |
|
Generate the __init__.py files from assembly files. |
|
Add assembly resolver for the Ansys Mechanical install. |
|
Output to the tinypages directory. |
Description#
Create __init__.py files from the content of the assembly XML files.
Module detail#
- create_files.clean(outdir)#
Remove src/ansys/mechanical/stubs directory.
- Parameters:
- outdir: pathlib.Path
Path to where the init files are generated.
- create_files.get_version()#
Get the install directory and version of Ansys Mechanical installed on the system.
- create_files.is_type_published(mod_type: System.RuntimeType)#
Get published type if it exists.
- Parameters:
- mod_type: System.RuntimeType
A module type.
- Returns:
- bool
True if “Ansys.Utilities.Sdk.PublishedAttribute” is in map(str, attrs) False if “Ansys.Utilities.Sdk.PublishedAttribute” is not in map(str, attrs)
- create_files.main()#
Generate the Mechanical stubs based on assembly files.
- create_files.make(base_dir, outdir, assemblies, str_version)#
Generate the __init__.py files from assembly files.
Make __init__.py files in src/ansys/mechanical/stubs, generate classes, properties, and methods with their docstrings from assembly files from the Ansys Mechanical install, and add import statements to the __init__.py files.
- Parameters:
- outdir: pathlib.Path
Path to where the init files are generated.
- assemblies: list
List of Mechanical assembly files to create classes, properties, and methods from.
- create_files.resolve()#
Add assembly resolver for the Ansys Mechanical install.