diff --git a/.ci/build_wheel.py b/.ci/build_wheel.py index 358e3a05ea..2408c92ee7 100644 --- a/.ci/build_wheel.py +++ b/.ci/build_wheel.py @@ -2,14 +2,13 @@ # Input can be one of ["any", "win", "manylinux1", "manylinux_2_17"] import argparse -import subprocess -from pathlib import Path import os -import sys +from pathlib import Path import shutil +import subprocess +import sys import tempfile - supported_platforms = { "any": "any", "win": "win_amd64", diff --git a/.ci/code_generation.py b/.ci/code_generation.py index e073929848..ca24cf73e6 100644 --- a/.ci/code_generation.py +++ b/.ci/code_generation.py @@ -1,12 +1,12 @@ # import subprocess -from ansys.dpf import core -from ansys.dpf.core.operators import build -import os import glob +import os from pathlib import Path import shutil +from ansys.dpf import core +from ansys.dpf.core.operators import build local_dir = Path(__file__).parent TARGET_PATH = local_dir.parent / "src" / "ansys" / "dpf" / "core" / "operators" diff --git a/.ci/run_examples.py b/.ci/run_examples.py index 91d9d56628..298d883b3c 100644 --- a/.ci/run_examples.py +++ b/.ci/run_examples.py @@ -1,5 +1,5 @@ -import os import glob +import os from pathlib import Path import subprocess import sys @@ -7,7 +7,6 @@ import ansys.dpf.core as dpf from ansys.dpf.core.examples import get_example_required_minimum_dpf_version - os.environ["PYVISTA_OFF_SCREEN"] = "true" os.environ["MPLBACKEND"] = "Agg" diff --git a/.ci/run_non_regression_examples.py b/.ci/run_non_regression_examples.py index fc3dc8fedc..783858c2d5 100644 --- a/.ci/run_non_regression_examples.py +++ b/.ci/run_non_regression_examples.py @@ -1,10 +1,11 @@ -import os import glob -from ansys.dpf import core +import os import pathlib import subprocess import sys +from ansys.dpf import core + os.environ["PYVISTA_OFF_SCREEN"] = "true" os.environ["MPLBACKEND"] = "Agg" diff --git a/.ci/update_dpf_dependencies.py b/.ci/update_dpf_dependencies.py index c3426d8a9d..3cab04593d 100644 --- a/.ci/update_dpf_dependencies.py +++ b/.ci/update_dpf_dependencies.py @@ -13,14 +13,13 @@ or the repo defined by the environment variable "ANSYSDPFCORE_ROOT" if it exists. """ -import os import glob +import os from pathlib import Path import platform import shutil import zipfile - grpc_path_key = "DPFDV_ROOT" gate_path_key = "ANSYSDPFPYGATE_ROOT" core_path = Path(__file__).parent.parent diff --git a/examples/00-basic/05-use_local_data.py b/examples/00-basic/05-use_local_data.py index 7b1991bd57..87117ef671 100644 --- a/examples/00-basic/05-use_local_data.py +++ b/examples/00-basic/05-use_local_data.py @@ -36,9 +36,7 @@ # Import necessary modules from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create a model object to establish a connection with an diff --git a/examples/00-basic/11-server_types.py b/examples/00-basic/11-server_types.py index c61b3e33f3..5a883c4ffd 100644 --- a/examples/00-basic/11-server_types.py +++ b/examples/00-basic/11-server_types.py @@ -53,6 +53,7 @@ """ import os + from ansys.dpf import core as dpf ############################################################################### diff --git a/examples/01-transient_analyses/00-basic_transient.py b/examples/01-transient_analyses/00-basic_transient.py index 31b2caba98..7332446c75 100644 --- a/examples/01-transient_analyses/00-basic_transient.py +++ b/examples/01-transient_analyses/00-basic_transient.py @@ -37,8 +37,7 @@ import numpy as np from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Download the transient result example. This example is diff --git a/examples/01-transient_analyses/01-transient_easy_time_scoping.py b/examples/01-transient_analyses/01-transient_easy_time_scoping.py index cf9e68ebd9..754928eb17 100644 --- a/examples/01-transient_analyses/01-transient_easy_time_scoping.py +++ b/examples/01-transient_analyses/01-transient_easy_time_scoping.py @@ -34,8 +34,7 @@ import matplotlib.pyplot as plt from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create the model and display the state of the result. This transient result diff --git a/examples/02-modal_analyses/01-plot_and_animate_modes.py b/examples/02-modal_analyses/01-plot_and_animate_modes.py index a43e2fd733..d167150245 100644 --- a/examples/02-modal_analyses/01-plot_and_animate_modes.py +++ b/examples/02-modal_analyses/01-plot_and_animate_modes.py @@ -32,8 +32,7 @@ """ from ansys.dpf import core as dpf -from ansys.dpf.core import animation -from ansys.dpf.core import examples +from ansys.dpf.core import animation, examples ############################################################################### # Retrieve mode shapes diff --git a/examples/03-harmonic_analyses/00-multi_harmonic.py b/examples/03-harmonic_analyses/00-multi_harmonic.py index 5f86da384c..8e4427a134 100644 --- a/examples/03-harmonic_analyses/00-multi_harmonic.py +++ b/examples/03-harmonic_analyses/00-multi_harmonic.py @@ -34,9 +34,7 @@ import matplotlib.pyplot as pyplot from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Begin by downloading the example harmonic result. This result is diff --git a/examples/03-harmonic_analyses/01-modal_superposition.py b/examples/03-harmonic_analyses/01-modal_superposition.py index 2c3fa216b0..9d53eae701 100644 --- a/examples/03-harmonic_analyses/01-modal_superposition.py +++ b/examples/03-harmonic_analyses/01-modal_superposition.py @@ -38,7 +38,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - ############################################################################### # Create data sources # ~~~~~~~~~~~~~~~~~~~ diff --git a/examples/04-advanced/00-multistage_advanced_options.py b/examples/04-advanced/00-multistage_advanced_options.py index 4558366cef..6eb4006bd4 100644 --- a/examples/04-advanced/00-multistage_advanced_options.py +++ b/examples/04-advanced/00-multistage_advanced_options.py @@ -32,8 +32,7 @@ """ from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create the model and display the state of the result. diff --git a/examples/04-advanced/01-solve_harmonic_problem.py b/examples/04-advanced/01-solve_harmonic_problem.py index 0f8a77a84f..7f3f2626f9 100644 --- a/examples/04-advanced/01-solve_harmonic_problem.py +++ b/examples/04-advanced/01-solve_harmonic_problem.py @@ -37,7 +37,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import operators as ops - ############################################################################### # Create 2D (x,y) matrix fields for inertia, damping, and stiffness. diff --git a/examples/04-advanced/02-volume_averaged_stress.py b/examples/04-advanced/02-volume_averaged_stress.py index b5bd832197..7c2ccbf056 100644 --- a/examples/04-advanced/02-volume_averaged_stress.py +++ b/examples/04-advanced/02-volume_averaged_stress.py @@ -35,9 +35,7 @@ """ from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create a model targeting a given result file diff --git a/examples/04-advanced/03-exchange_data_between_servers.py b/examples/04-advanced/03-exchange_data_between_servers.py index fff01684e7..d989edca5a 100644 --- a/examples/04-advanced/03-exchange_data_between_servers.py +++ b/examples/04-advanced/03-exchange_data_between_servers.py @@ -35,9 +35,7 @@ """ from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create two servers diff --git a/examples/04-advanced/04-extrapolation_stress_3d.py b/examples/04-advanced/04-extrapolation_stress_3d.py index 86807919ad..a61ca2f36b 100644 --- a/examples/04-advanced/04-extrapolation_stress_3d.py +++ b/examples/04-advanced/04-extrapolation_stress_3d.py @@ -57,7 +57,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - ############################################################################### # Get the data source's analysis of integration points and analysis reference datafile = examples.download_extrapolation_3d_result() diff --git a/examples/04-advanced/05-extrapolation_strain_2d.py b/examples/04-advanced/05-extrapolation_strain_2d.py index 091242212a..cb83609539 100644 --- a/examples/04-advanced/05-extrapolation_strain_2d.py +++ b/examples/04-advanced/05-extrapolation_strain_2d.py @@ -57,7 +57,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - ############################################################################### # Get the data source's analyse of integration points and data source's analyse reference datafile = examples.download_extrapolation_2d_result() diff --git a/examples/04-advanced/06-stress_gradient_path.py b/examples/04-advanced/06-stress_gradient_path.py index 16ae40c025..f39ebd718f 100644 --- a/examples/04-advanced/06-stress_gradient_path.py +++ b/examples/04-advanced/06-stress_gradient_path.py @@ -41,11 +41,9 @@ import matplotlib.pyplot as plt from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops from ansys.dpf.core.plotter import DpfPlotter - ############################################################################### # Open an example and print out the ``Model`` object. The # :class:`Model ` class helps to organize access diff --git a/examples/04-advanced/07-load_plugin.py b/examples/04-advanced/07-load_plugin.py index 7fb2b2109c..fb9ae6fffa 100644 --- a/examples/04-advanced/07-load_plugin.py +++ b/examples/04-advanced/07-load_plugin.py @@ -34,7 +34,6 @@ # Import DPF-Core: from ansys.dpf import core as dpf - server = dpf.global_server() ############################################################################### diff --git a/examples/04-advanced/11-cycles_to_failure.py b/examples/04-advanced/11-cycles_to_failure.py index 9e2dab55e7..7858c3d2b8 100644 --- a/examples/04-advanced/11-cycles_to_failure.py +++ b/examples/04-advanced/11-cycles_to_failure.py @@ -53,9 +53,10 @@ The higher the stress result, the lower the number of cycles to failure. """ +import numpy as np + from ansys.dpf import core as dpf from ansys.dpf.core import examples -import numpy as np ############################################################################### # The first step is to generate a simple model with high stress diff --git a/examples/04-advanced/14-incremental_evaluation.py b/examples/04-advanced/14-incremental_evaluation.py index 6ec0878571..586b69a271 100644 --- a/examples/04-advanced/14-incremental_evaluation.py +++ b/examples/04-advanced/14-incremental_evaluation.py @@ -33,7 +33,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - ####################################################################################### # Retrieve an example to instantiate a DataSources object path = examples.download_transient_result() diff --git a/examples/05-file-IO/00-hdf5_double_float_comparison.py b/examples/05-file-IO/00-hdf5_double_float_comparison.py index 07de3aceeb..2b65aaf97e 100644 --- a/examples/05-file-IO/00-hdf5_double_float_comparison.py +++ b/examples/05-file-IO/00-hdf5_double_float_comparison.py @@ -39,8 +39,7 @@ from pathlib import Path from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create the model and get the stresses, displacements, and mesh. diff --git a/examples/05-file-IO/01-reduced_matrices_export.py b/examples/05-file-IO/01-reduced_matrices_export.py index 76a0dae22b..0da2f844cc 100644 --- a/examples/05-file-IO/01-reduced_matrices_export.py +++ b/examples/05-file-IO/01-reduced_matrices_export.py @@ -36,8 +36,7 @@ # temporary directory. from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create the operator and connect data sources. diff --git a/examples/05-file-IO/04-basic-load-file.py b/examples/05-file-IO/04-basic-load-file.py index 21c0efec16..77aa2aece2 100644 --- a/examples/05-file-IO/04-basic-load-file.py +++ b/examples/05-file-IO/04-basic-load-file.py @@ -40,7 +40,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - model = dpf.Model(examples.find_simple_bar()) mesh = model.metadata.meshed_region diff --git a/examples/06-plotting/00-basic_plotting.py b/examples/06-plotting/00-basic_plotting.py index 497b24a827..83fae5c9a0 100644 --- a/examples/06-plotting/00-basic_plotting.py +++ b/examples/06-plotting/00-basic_plotting.py @@ -34,7 +34,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - # Plot the bare mesh of a model model = dpf.Model(examples.find_multishells_rst()) model.plot(color="w", show_edges=True, title="Model", text="Model plot") diff --git a/examples/06-plotting/04-plot_on_path.py b/examples/06-plotting/04-plot_on_path.py index e63b57d4cf..f360ee5af6 100644 --- a/examples/06-plotting/04-plot_on_path.py +++ b/examples/06-plotting/04-plot_on_path.py @@ -35,11 +35,9 @@ import matplotlib.pyplot as plt from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops from ansys.dpf.core.plotter import DpfPlotter - ############################################################################### # Plot path # ~~~~~~~~~ diff --git a/examples/06-plotting/05-plot_on_warped_mesh.py b/examples/06-plotting/05-plot_on_warped_mesh.py index 9cd8593e3d..8d8d5e01d6 100644 --- a/examples/06-plotting/05-plot_on_warped_mesh.py +++ b/examples/06-plotting/05-plot_on_warped_mesh.py @@ -34,7 +34,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - # Get and show the initial model model = dpf.Model(examples.find_multishells_rst()) print(model) diff --git a/examples/06-plotting/06-animate_results.py b/examples/06-plotting/06-animate_results.py index 93e1dcddd6..5e3554cd2d 100644 --- a/examples/06-plotting/06-animate_results.py +++ b/examples/06-plotting/06-animate_results.py @@ -34,7 +34,6 @@ from ansys.dpf import core as dpf from ansys.dpf.core import examples - # Load the model model = dpf.Model(examples.find_msup_transient()) print(model) diff --git a/examples/06-plotting/07-plot_on_geometries.py b/examples/06-plotting/07-plot_on_geometries.py index 9fddfe689e..300d4022af 100644 --- a/examples/06-plotting/07-plot_on_geometries.py +++ b/examples/06-plotting/07-plot_on_geometries.py @@ -36,16 +36,14 @@ # ~~~~~~~~~~~~~~~~~~~~~~ # Import modules and set context as Premium. -import numpy as np import matplotlib.pyplot as plt +import numpy as np from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops +from ansys.dpf.core.fields_factory import field_from_array from ansys.dpf.core.geometry import Line, Plane, Points from ansys.dpf.core.plotter import DpfPlotter -from ansys.dpf.core.fields_factory import field_from_array - ############################################################################### # Load model from examples and print information: diff --git a/examples/07-distributed-post/00-distributed_total_disp.py b/examples/07-distributed-post/00-distributed_total_disp.py index 9edbe6cbb8..56d23ec221 100644 --- a/examples/07-distributed-post/00-distributed_total_disp.py +++ b/examples/07-distributed-post/00-distributed_total_disp.py @@ -73,9 +73,9 @@ # Import the ``dpf-core`` module and its examples files. import os + from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Configure the servers. diff --git a/examples/07-distributed-post/01-distributed_workflows_on_remote.py b/examples/07-distributed-post/01-distributed_workflows_on_remote.py index 2405247611..e67fe4c4ab 100644 --- a/examples/07-distributed-post/01-distributed_workflows_on_remote.py +++ b/examples/07-distributed-post/01-distributed_workflows_on_remote.py @@ -71,9 +71,9 @@ # Import the ``dpf-core`` module and its examples files. import os + from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf.core import examples, operators as ops ############################################################################### # Configure the servers. diff --git a/examples/07-distributed-post/02-distributed-msup_expansion.py b/examples/07-distributed-post/02-distributed-msup_expansion.py index 6a8ea8dfb0..3ff354bb5c 100644 --- a/examples/07-distributed-post/02-distributed-msup_expansion.py +++ b/examples/07-distributed-post/02-distributed-msup_expansion.py @@ -94,10 +94,9 @@ # Import the ``dpf-core`` module and its examples files. import os -from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf import core as dpf +from ansys.dpf.core import examples, operators as ops ############################################################################### # Configure the servers diff --git a/examples/07-distributed-post/03-distributed-msup_expansion_steps.py b/examples/07-distributed-post/03-distributed-msup_expansion_steps.py index 8d56591ae7..f516f816db 100644 --- a/examples/07-distributed-post/03-distributed-msup_expansion_steps.py +++ b/examples/07-distributed-post/03-distributed-msup_expansion_steps.py @@ -97,10 +97,9 @@ # Import the ``dpf-core`` module and its examples files. import os -from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops +from ansys.dpf import core as dpf +from ansys.dpf.core import examples, operators as ops ############################################################################### # Configure the servers diff --git a/examples/07-distributed-post/06-distributed_stress_averaging.py b/examples/07-distributed-post/06-distributed_stress_averaging.py index c4f04720fd..9e3c71cfa2 100644 --- a/examples/07-distributed-post/06-distributed_stress_averaging.py +++ b/examples/07-distributed-post/06-distributed_stress_averaging.py @@ -36,9 +36,7 @@ # Import dpf module and its examples files from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Configure the servers diff --git a/examples/08-python-operators/00-wrapping_numpy_capabilities.py b/examples/08-python-operators/00-wrapping_numpy_capabilities.py index 1188a2ca5b..6c14b7fe52 100644 --- a/examples/08-python-operators/00-wrapping_numpy_capabilities.py +++ b/examples/08-python-operators/00-wrapping_numpy_capabilities.py @@ -56,9 +56,10 @@ # # Download and display the Python script. -from ansys.dpf.core.examples import download_easy_statistics from pathlib import Path +from ansys.dpf.core.examples import download_easy_statistics + operator_file_path = Path(download_easy_statistics()) with operator_file_path.open() as file: diff --git a/examples/09-averaging/01-average_across_bodies.py b/examples/09-averaging/01-average_across_bodies.py index 68857240e4..dad611b7e9 100644 --- a/examples/09-averaging/01-average_across_bodies.py +++ b/examples/09-averaging/01-average_across_bodies.py @@ -46,9 +46,7 @@ # Import the necessary modules from ansys.dpf import core as dpf -from ansys.dpf.core import operators as ops -from ansys.dpf.core import examples - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Load the simulation results from an RST file and create a model of it. diff --git a/examples/10-mesh_operations/05-skin_extraction.py b/examples/10-mesh_operations/05-skin_extraction.py index ec1f0d7fde..8af79750a0 100644 --- a/examples/10-mesh_operations/05-skin_extraction.py +++ b/examples/10-mesh_operations/05-skin_extraction.py @@ -33,9 +33,7 @@ # Import necessary modules from ansys.dpf import core as dpf -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops - +from ansys.dpf.core import examples, operators as ops ############################################################################### # Create a model object to establish a connection with an diff --git a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py index e6007c3eae..db13a8ac9d 100644 --- a/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py +++ b/examples/10-mesh_operations/13-nodes_in_local_coordinate_system.py @@ -44,7 +44,6 @@ from ansys.dpf.core import examples from ansys.dpf.gate.errors import DPFServerException - ############################################################################### # Create a model object to establish a connection with an example result file: model = dpf.Model(examples.download_hemisphere()) diff --git a/examples/14-lsdyna/00-lsdyna_operators.py b/examples/14-lsdyna/00-lsdyna_operators.py index fc56cd7679..643a4d53e1 100644 --- a/examples/14-lsdyna/00-lsdyna_operators.py +++ b/examples/14-lsdyna/00-lsdyna_operators.py @@ -36,6 +36,7 @@ """ import matplotlib.pyplot as plt + from ansys.dpf import core as dpf from ansys.dpf.core import examples diff --git a/pyproject.toml b/pyproject.toml index e0673b008f..946e1bf17c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ select = [ # "E", # pycodestyle, see https://beta.ruff.rs/docs/rules/#pycodestyle-e-w "D", # pydocstyle, see https://beta.ruff.rs/docs/rules/#pydocstyle-d # "F", # pyflakes, see https://beta.ruff.rs/docs/rules/#pyflakes-f -# "I", # isort, see https://beta.ruff.rs/docs/rules/#isort-i + "I", # isort, see https://beta.ruff.rs/docs/rules/#isort-i # "N", # pep8-naming, see https://beta.ruff.rs/docs/rules/#pep8-naming-n "PTH", # flake9-use-pathlib, https://beta.ruff.rs/docs/rules/#flake8-use-pathlib-pth "TD", # flake8-todos, https://docs.astral.sh/ruff/rules/#flake8-todos-td diff --git a/src/ansys/dpf/core/_custom_operators_helpers.py b/src/ansys/dpf/core/_custom_operators_helpers.py index 449ea11f5b..cc1b48cb7f 100644 --- a/src/ansys/dpf/core/_custom_operators_helpers.py +++ b/src/ansys/dpf/core/_custom_operators_helpers.py @@ -20,28 +20,28 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf.gate import capi, external_operator_capi from enum import Enum from ansys.dpf.core import ( - field, - property_field, - scoping, collection, + custom_type_field, data_sources, - meshed_region, - time_freq_support, - workflow, data_tree, dpf_operator, + field, fields_container, - scopings_container, + generic_data_container, + meshed_region, meshes_container, + property_field, result_info, + scoping, + scopings_container, string_field, - custom_type_field, - generic_data_container, + time_freq_support, + workflow, ) +from ansys.dpf.gate import capi, external_operator_capi external_operator_api = external_operator_capi.ExternalOperatorCAPI diff --git a/src/ansys/dpf/core/animation.py b/src/ansys/dpf/core/animation.py index 470c6438aa..3739245fa0 100644 --- a/src/ansys/dpf/core/animation.py +++ b/src/ansys/dpf/core/animation.py @@ -22,9 +22,10 @@ """Module contains the function for modal animation creation.""" -import ansys.dpf.core as dpf import numpy as np +import ansys.dpf.core as dpf + def animate_mode( fields_container, diff --git a/src/ansys/dpf/core/animator.py b/src/ansys/dpf/core/animator.py index 122facd6bf..3198319618 100644 --- a/src/ansys/dpf/core/animator.py +++ b/src/ansys/dpf/core/animator.py @@ -28,8 +28,9 @@ Contains classes used to animate results based on workflows using PyVista. """ +from typing import Sequence, Union + import numpy as np -from typing import Union, Sequence import ansys.dpf.core as core from ansys.dpf.core.helpers.utils import _sort_supported_kwargs diff --git a/src/ansys/dpf/core/any.py b/src/ansys/dpf/core/any.py index aa69f8976c..1e9c4d7f8d 100644 --- a/src/ansys/dpf/core/any.py +++ b/src/ansys/dpf/core/any.py @@ -31,13 +31,11 @@ import numpy as np -import ansys.dpf.core.server_types -from ansys.dpf.core import server as server_module -from ansys.dpf.core import errors +from ansys.dpf.core import errors, server as server_module from ansys.dpf.core.check_version import server_meet_version, server_meet_version_and_raise from ansys.dpf.core.common import create_dpf_instance -from ansys.dpf.gate import any_abstract_api, integral_types -from ansys.dpf.gate import dpf_vector +import ansys.dpf.core.server_types +from ansys.dpf.gate import any_abstract_api, dpf_vector, integral_types class Any: @@ -113,17 +111,17 @@ def _new_from_string_as_bytes_on_client(self, client, str): def _type_to_new_from_get_as_method(self, obj): from ansys.dpf.core import ( + collection, + custom_type_field, + data_tree, + dpf_operator, field, fields_container, - property_field, generic_data_container, - string_field, + property_field, scoping, - data_tree, - custom_type_field, - collection, + string_field, workflow, - dpf_operator, ) if issubclass(obj, int): diff --git a/src/ansys/dpf/core/available_result.py b/src/ansys/dpf/core/available_result.py index f75a36e512..8e978a81ac 100644 --- a/src/ansys/dpf/core/available_result.py +++ b/src/ansys/dpf/core/available_result.py @@ -26,10 +26,11 @@ Module contains the class representing the results that an operator can request. """ +from enum import Enum, unique from typing import List from warnings import warn -from ansys.dpf.core.common import _remove_spaces, _make_as_function_name, natures -from enum import Enum, unique + +from ansys.dpf.core.common import _make_as_function_name, _remove_spaces, natures @unique diff --git a/src/ansys/dpf/core/check_version.py b/src/ansys/dpf/core/check_version.py index e14c1b57fe..bf16c86e4a 100644 --- a/src/ansys/dpf/core/check_version.py +++ b/src/ansys/dpf/core/check_version.py @@ -26,10 +26,11 @@ Used to verify if the server version is a minimum value. """ -from ansys.dpf.core import errors as dpf_errors +from functools import wraps import sys import weakref -from functools import wraps + +from ansys.dpf.core import errors as dpf_errors def server_meet_version(required_version, server): diff --git a/src/ansys/dpf/core/collection.py b/src/ansys/dpf/core/collection.py index 57385d9955..90405198e1 100644 --- a/src/ansys/dpf/core/collection.py +++ b/src/ansys/dpf/core/collection.py @@ -24,10 +24,11 @@ """Module containing the class representing dpf objects organized by label spaces.""" from __future__ import annotations + +from ansys.dpf.core import errors, server as server_module from ansys.dpf.core.any import Any -from ansys.dpf.core.collection_base import CollectionBase, TYPE +from ansys.dpf.core.collection_base import TYPE, CollectionBase from ansys.dpf.core.common import create_dpf_instance -from ansys.dpf.core import server as server_module, errors class Collection(CollectionBase[TYPE]): @@ -35,7 +36,7 @@ class Collection(CollectionBase[TYPE]): Parameters ---------- - collection : ansys.grpc.dpf.collection_pb2.Collection or + collection : ansys.grpc.dpf.collection_message_pb2.Collection or ansys.dpf.core.Collection, optional Create a collection from a collection message or create a copy from an existing collection. The default is ``None``. diff --git a/src/ansys/dpf/core/collection_base.py b/src/ansys/dpf/core/collection_base.py index 007f898675..bf05ff6336 100644 --- a/src/ansys/dpf/core/collection_base.py +++ b/src/ansys/dpf/core/collection_base.py @@ -23,26 +23,27 @@ """Contains classes associated with the DPF collection.""" from __future__ import annotations + import abc -import warnings import traceback +from typing import TYPE_CHECKING, Generic, List, Optional, TypeVar +import warnings import numpy as np +from ansys.dpf.core import server as server_module from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core.server_types import BaseServer -from ansys.dpf.core.scoping import Scoping from ansys.dpf.core.label_space import LabelSpace -from ansys.dpf.core import server as server_module +from ansys.dpf.core.scoping import Scoping +from ansys.dpf.core.server_types import BaseServer from ansys.dpf.gate import ( collection_capi, collection_grpcapi, data_processing_capi, data_processing_grpcapi, - dpf_vector, dpf_array, + dpf_vector, ) -from typing import List, Optional, Generic, TypeVar, TYPE_CHECKING if TYPE_CHECKING: from ansys.dpf.core.support import Support @@ -57,7 +58,7 @@ class CollectionBase(Generic[TYPE]): Parameters ---------- - collection : ansys.grpc.dpf.collection_pb2.Collection, optional + collection : ansys.grpc.dpf.collection_message_pb2.Collection, optional Collection to create from the collection message. The default is ``None``. server : server.DPFServer, optional Server with the channel connected to the remote or local instance. The @@ -470,9 +471,9 @@ def _get_time_freq_support(self): """ from ansys.dpf.core.time_freq_support import TimeFreqSupport from ansys.dpf.gate import ( + object_handler, support_capi, support_grpcapi, - object_handler, ) data_api = self._server.get_api_for_type( diff --git a/src/ansys/dpf/core/common.py b/src/ansys/dpf/core/common.py index ea35aeea27..6eaa554b19 100644 --- a/src/ansys/dpf/core/common.py +++ b/src/ansys/dpf/core/common.py @@ -22,13 +22,13 @@ """Common.""" +from enum import Enum import re import sys -from enum import Enum from typing import Dict from ansys.dpf.core.misc import module_exists -from ansys.dpf.gate.common import locations, ProgressBarBase # noqa: F401 +from ansys.dpf.gate.common import ProgressBarBase, locations # noqa: F401 from ansys.dpf.gate.dpf_vector import ( # noqa: F401 get_size_of_list as _get_size_of_list, ) @@ -122,27 +122,27 @@ def types_enum_to_types(): Mapping of enum to the corresponding type. """ from ansys.dpf.core import ( + Any, + collection, + custom_type_field, cyclic_support, data_sources, + data_tree, + dpf_operator, field, fields_container, - collection, + generic_data_container, + mesh_info, meshed_region, meshes_container, property_field, - string_field, - custom_type_field, result_info, scoping, scopings_container, + streams_container, + string_field, time_freq_support, - dpf_operator, - data_tree, workflow, - streams_container, - generic_data_container, - mesh_info, - Any, ) from ansys.dpf.gate import dpf_vector @@ -380,26 +380,26 @@ def type_to_internal_object_keyword(): global _type_to_internal_object_keyword if _type_to_internal_object_keyword is None: from ansys.dpf.core import ( + any, + collection, + custom_type_field, cyclic_support, data_sources, + data_tree, + dpf_operator, field, fields_container, + generic_data_container, meshed_region, meshes_container, property_field, - string_field, - custom_type_field, result_info, scoping, scopings_container, + streams_container, + string_field, time_freq_support, - dpf_operator, - data_tree, workflow, - streams_container, - generic_data_container, - any, - collection, ) _type_to_internal_object_keyword = SubClassSmartDict( @@ -436,8 +436,8 @@ def type_to_special_dpf_constructors(): """Return dpf type mapped to special dpf constructors.""" global _type_to_special_dpf_constructors if _type_to_special_dpf_constructors is None: - from ansys.dpf.gate.dpf_vector import DPFVectorInt from ansys.dpf.core import collection_base + from ansys.dpf.gate.dpf_vector import DPFVectorInt _type_to_special_dpf_constructors = { DPFVectorInt: lambda obj, server: collection_base.IntCollection( diff --git a/src/ansys/dpf/core/config.py b/src/ansys/dpf/core/config.py index e7de0aaffa..16cbdb007d 100644 --- a/src/ansys/dpf/core/config.py +++ b/src/ansys/dpf/core/config.py @@ -23,16 +23,16 @@ """Operator Configuration.""" import functools -import warnings import traceback +import warnings from ansys.dpf.core import server as server_module +from ansys.dpf.core.operator_specification import Specification from ansys.dpf.gate import ( + operator_config_abstract_api, operator_config_capi, operator_config_grpcapi, - operator_config_abstract_api, ) -from ansys.dpf.core.operator_specification import Specification class Config: diff --git a/src/ansys/dpf/core/core.py b/src/ansys/dpf/core/core.py index 56564bfe92..b479cdb0e3 100644 --- a/src/ansys/dpf/core/core.py +++ b/src/ansys/dpf/core/core.py @@ -22,28 +22,27 @@ """Core.""" -import os import logging +import os +from pathlib import Path import warnings import weakref -from pathlib import Path -from ansys.dpf.core import errors, misc -from ansys.dpf.core import server as server_module -from ansys.dpf.core.check_version import version_requires, server_meet_version +from ansys.dpf.core import errors, misc, server as server_module +from ansys.dpf.core.check_version import server_meet_version, version_requires from ansys.dpf.core.runtime_config import ( RuntimeClientConfig, RuntimeCoreConfig, ) from ansys.dpf.gate import ( - data_processing_capi, - data_processing_grpcapi, - tmp_dir_capi, - tmp_dir_grpcapi, collection_capi, collection_grpcapi, + data_processing_capi, + data_processing_grpcapi, integral_types, object_handler, + tmp_dir_capi, + tmp_dir_grpcapi, ) try: @@ -300,8 +299,8 @@ def _deep_copy(dpf_entity, server=None): deep_copy of dpf_entity: core.Operator, core.Workflow, core.Scoping, core.Field, core.FieldsContainer, core.MeshedRegion... """ + from ansys.dpf.core.common import types, types_enum_to_types from ansys.dpf.core.operators.serialization import serializer_to_string, string_deserializer - from ansys.dpf.core.common import types_enum_to_types, types entity_server = dpf_entity._server if hasattr(dpf_entity, "_server") else None serializer = serializer_to_string(server=entity_server) diff --git a/src/ansys/dpf/core/custom_fields_container.py b/src/ansys/dpf/core/custom_fields_container.py index a99475ffdd..e87a1ff92e 100644 --- a/src/ansys/dpf/core/custom_fields_container.py +++ b/src/ansys/dpf/core/custom_fields_container.py @@ -29,8 +29,8 @@ results split by body or split by material. """ -from ansys.dpf.core.fields_container import FieldsContainer from ansys.dpf.core import elements +from ansys.dpf.core.fields_container import FieldsContainer class ElShapeFieldsContainer(FieldsContainer): @@ -42,7 +42,7 @@ class ElShapeFieldsContainer(FieldsContainer): Parameters ---------- - fields_container : ansys.grpc.dpf.collection_pb2.Collection or FieldsContainer, optional + fields_container : ansys.grpc.dpf.collection_message_pb2.Collection or FieldsContainer, optional Fields container created from either a collection message or by copying an existing fields container. The default is ``None``. server : server.DPFServer, optional @@ -278,7 +278,7 @@ class BodyFieldsContainer(FieldsContainer): Parameters ---------- - fields_container : ansys.grpc.dpf.collection_pb2.Collection or FieldsContainer, optional + fields_container : ansys.grpc.dpf.collection_message_pb2.Collection or FieldsContainer, optional Fields container created from either a collection message or by copying an existing fields container. The default is ``None``. server : server.DPFServer, optional diff --git a/src/ansys/dpf/core/custom_operator.py b/src/ansys/dpf/core/custom_operator.py index bf52e7bc2d..3b6f9e3dc0 100644 --- a/src/ansys/dpf/core/custom_operator.py +++ b/src/ansys/dpf/core/custom_operator.py @@ -32,30 +32,30 @@ import re import shutil import tempfile +import traceback import warnings import zipfile import numpy -import traceback from ansys.dpf import core as dpf from ansys.dpf.core import ( - settings, + AvailableServerContexts, + collection, + dpf_operator, + operator_specification, server, server_factory, - operator_specification, - dpf_operator, - collection, - AvailableServerContexts, + settings, ) from ansys.dpf.core._custom_operators_helpers import ( __operator_main__, - functions_registry, - external_operator_api, - _type_to_output_method, _type_to_input_method, + _type_to_output_method, + external_operator_api, + functions_registry, ) -from ansys.dpf.gate import object_handler, capi, dpf_vector, integral_types +from ansys.dpf.gate import capi, dpf_vector, integral_types, object_handler def update_virtual_environment_for_custom_operators( diff --git a/src/ansys/dpf/core/custom_type_field.py b/src/ansys/dpf/core/custom_type_field.py index cd60f039ff..4df666b32e 100644 --- a/src/ansys/dpf/core/custom_type_field.py +++ b/src/ansys/dpf/core/custom_type_field.py @@ -26,10 +26,8 @@ import numpy as np -from ansys.dpf.core import server as server_module -from ansys.dpf.core import errors -from ansys.dpf.core import scoping -from ansys.dpf.core.common import locations, _get_size_of_list +from ansys.dpf.core import errors, scoping, server as server_module +from ansys.dpf.core.common import _get_size_of_list, locations from ansys.dpf.core.field_base import _FieldBase from ansys.dpf.core.field_definition import FieldDefinition from ansys.dpf.core.support import Support diff --git a/src/ansys/dpf/core/cyclic_support.py b/src/ansys/dpf/core/cyclic_support.py index 87274fc909..e53bb136e0 100644 --- a/src/ansys/dpf/core/cyclic_support.py +++ b/src/ansys/dpf/core/cyclic_support.py @@ -25,11 +25,9 @@ import traceback import warnings -from ansys.dpf.gate import cyclic_support_capi, cyclic_support_grpcapi - -from ansys.dpf.core import server as server_module +from ansys.dpf.core import field, property_field, server as server_module from ansys.dpf.core.scoping import Scoping -from ansys.dpf.core import field, property_field +from ansys.dpf.gate import cyclic_support_capi, cyclic_support_grpcapi class CyclicSupport: diff --git a/src/ansys/dpf/core/data_sources.py b/src/ansys/dpf/core/data_sources.py index d176b024f3..f7f2e952a7 100644 --- a/src/ansys/dpf/core/data_sources.py +++ b/src/ansys/dpf/core/data_sources.py @@ -24,22 +24,20 @@ import os from pathlib import Path -import warnings import traceback from typing import Union +import warnings -from ansys.dpf.core import server as server_module +from ansys.dpf.core import errors, server as server_module +from ansys.dpf.core.check_version import version_requires from ansys.dpf.gate import ( + data_processing_capi, + data_processing_grpcapi, data_sources_capi, data_sources_grpcapi, integral_types, - data_processing_capi, - data_processing_grpcapi, ) -from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core import errors - class DataSources: """Contains files with analysis results. diff --git a/src/ansys/dpf/core/data_tree.py b/src/ansys/dpf/core/data_tree.py index e8237ce15d..4d24174f7e 100644 --- a/src/ansys/dpf/core/data_tree.py +++ b/src/ansys/dpf/core/data_tree.py @@ -27,16 +27,14 @@ import warnings import weakref +from ansys.dpf.core import collection_base, common, errors, server as server_module from ansys.dpf.core.mapping_types import types -from ansys.dpf.core import server as server_module -from ansys.dpf.core import collection_base -from ansys.dpf.core import errors, common from ansys.dpf.gate import ( + data_processing_capi, + data_processing_grpcapi, dpf_data_tree_abstract_api, dpf_data_tree_capi, dpf_data_tree_grpcapi, - data_processing_capi, - data_processing_grpcapi, integral_types, ) diff --git a/src/ansys/dpf/core/dpf_operator.py b/src/ansys/dpf/core/dpf_operator.py index 12af7f2cdd..981525d00f 100644 --- a/src/ansys/dpf/core/dpf_operator.py +++ b/src/ansys/dpf/core/dpf_operator.py @@ -22,38 +22,39 @@ """Operator.""" +from enum import Enum import logging import os import traceback import warnings + import numpy -from enum import Enum +from ansys.dpf.core import server as server_module from ansys.dpf.core.check_version import ( - version_requires, server_meet_version, server_meet_version_and_raise, + version_requires, ) +from ansys.dpf.core.common import types_enum_to_types from ansys.dpf.core.config import Config from ansys.dpf.core.errors import DpfVersionNotSupported from ansys.dpf.core.inputs import Inputs from ansys.dpf.core.mapping_types import types -from ansys.dpf.core.common import types_enum_to_types -from ansys.dpf.core.outputs import Output, Outputs, _Outputs -from ansys.dpf.core import server as server_module from ansys.dpf.core.operator_specification import Specification +from ansys.dpf.core.outputs import Output, Outputs, _Outputs from ansys.dpf.core.unit_system import UnitSystem from ansys.dpf.gate import ( - operator_capi, - operator_abstract_api, - operator_grpcapi, - data_processing_capi, - data_processing_grpcapi, collection_capi, collection_grpcapi, + data_processing_capi, + data_processing_grpcapi, dpf_vector, - object_handler, integral_types, + object_handler, + operator_abstract_api, + operator_capi, + operator_grpcapi, ) LOG = logging.getLogger(__name__) @@ -357,28 +358,28 @@ def _connect_string_as_bytes(self, pin, str): @property def _type_to_output_method(self): from ansys.dpf.core import ( + any, + collection, + collection_base, + custom_container_base, + custom_type_field, cyclic_support, data_sources, + data_tree, field, fields_container, + generic_data_container, + mesh_info, meshed_region, meshes_container, property_field, - string_field, - custom_type_field, result_info, scoping, scopings_container, + streams_container, + string_field, time_freq_support, - data_tree, workflow, - collection, - streams_container, - generic_data_container, - mesh_info, - collection_base, - any, - custom_container_base, ) out = [ @@ -499,22 +500,22 @@ def _type_to_output_method(self): @property def _type_to_input_method(self): from ansys.dpf.core import ( + any, + collection_base, + custom_type_field, cyclic_support, data_sources, + data_tree, field, - collection_base, + generic_data_container, meshed_region, + model, property_field, - string_field, - custom_type_field, scoping, + streams_container, + string_field, time_freq_support, - data_tree, workflow, - model, - generic_data_container, - any, - streams_container, ) out = [ diff --git a/src/ansys/dpf/core/elements.py b/src/ansys/dpf/core/elements.py index d4dd53a75e..15515401f8 100644 --- a/src/ansys/dpf/core/elements.py +++ b/src/ansys/dpf/core/elements.py @@ -23,13 +23,16 @@ """Elements.""" from __future__ import annotations + from enum import Enum + import numpy as np + from ansys.dpf.core import nodes -from ansys.dpf.core.common import locations, elemental_properties +from ansys.dpf.core.check_version import version_requires +from ansys.dpf.core.common import elemental_properties, locations from ansys.dpf.core.element_descriptor import ElementDescriptor from ansys.dpf.gate import integral_types -from ansys.dpf.core.check_version import version_requires class Element: diff --git a/src/ansys/dpf/core/errors.py b/src/ansys/dpf/core/errors.py index fdaab9ade5..fb7332c57c 100644 --- a/src/ansys/dpf/core/errors.py +++ b/src/ansys/dpf/core/errors.py @@ -23,6 +23,7 @@ """Errors.""" from functools import wraps + from ansys.dpf.gate.errors import ( # noqa: F401 DPFServerException, DPFServerNullObject, diff --git a/src/ansys/dpf/core/examples/__init__.py b/src/ansys/dpf/core/examples/__init__.py index 8ac8884584..1e521a0a27 100644 --- a/src/ansys/dpf/core/examples/__init__.py +++ b/src/ansys/dpf/core/examples/__init__.py @@ -21,8 +21,8 @@ # SOFTWARE. """Provide utility functions for downloading and locating DPF example files.""" -from .examples import * from .downloads import * +from .examples import * # called if module. fails diff --git a/src/ansys/dpf/core/examples/downloads.py b/src/ansys/dpf/core/examples/downloads.py index 0a9c9135ba..898bc8ccdb 100644 --- a/src/ansys/dpf/core/examples/downloads.py +++ b/src/ansys/dpf/core/examples/downloads.py @@ -28,9 +28,9 @@ import os from pathlib import Path +from typing import Union import urllib.request import warnings -from typing import Union from ansys.dpf.core.examples.examples import find_files diff --git a/src/ansys/dpf/core/examples/examples.py b/src/ansys/dpf/core/examples/examples.py index c90def9e05..53ae359f82 100644 --- a/src/ansys/dpf/core/examples/examples.py +++ b/src/ansys/dpf/core/examples/examples.py @@ -25,10 +25,8 @@ import os from pathlib import Path -from ansys.dpf.core import server as server_module +from ansys.dpf.core import DataSources, path_utilities, server as server_module from ansys.dpf.core.core import upload_file_in_tmp_folder -from ansys.dpf.core import path_utilities -from ansys.dpf.core import DataSources def get_example_required_minimum_dpf_version(file: os.PathLike) -> str: diff --git a/src/ansys/dpf/core/faces.py b/src/ansys/dpf/core/faces.py index 01618d883f..66ab25614e 100644 --- a/src/ansys/dpf/core/faces.py +++ b/src/ansys/dpf/core/faces.py @@ -23,10 +23,11 @@ """Faces.""" import numpy as np + from ansys.dpf.core import scoping +from ansys.dpf.core.check_version import version_requires from ansys.dpf.core.common import face_properties from ansys.dpf.core.elements import element_types -from ansys.dpf.core.check_version import version_requires @version_requires("7.0") diff --git a/src/ansys/dpf/core/field.py b/src/ansys/dpf/core/field.py index b76563e711..f98b34fe8d 100644 --- a/src/ansys/dpf/core/field.py +++ b/src/ansys/dpf/core/field.py @@ -23,18 +23,18 @@ """Field.""" import numpy as np + from ansys import dpf -from ansys.dpf.core import errors, meshed_region, time_freq_support, scoping -from ansys.dpf.core import dimensionality -from ansys.dpf.core.common import locations, natures, types, _get_size_of_list +from ansys.dpf.core import dimensionality, errors, meshed_region, scoping, time_freq_support +from ansys.dpf.core.common import _get_size_of_list, locations, natures, types from ansys.dpf.core.field_base import _FieldBase, _LocalFieldBase from ansys.dpf.core.field_definition import FieldDefinition from ansys.dpf.gate import ( + dpf_array, + dpf_vector, field_abstract_api, field_capi, field_grpcapi, - dpf_array, - dpf_vector, ) diff --git a/src/ansys/dpf/core/field_base.py b/src/ansys/dpf/core/field_base.py index 12a14f6494..36046522d1 100644 --- a/src/ansys/dpf/core/field_base.py +++ b/src/ansys/dpf/core/field_base.py @@ -21,23 +21,20 @@ # SOFTWARE. """Provide base APIs for DPF's field concept and means of caching field data.""" +from abc import abstractmethod import traceback import warnings -from abc import abstractmethod -from ansys.dpf.gate.generated import field_abstract_api +import numpy as np -from ansys.dpf.core import scoping -from ansys.dpf.core.common import natures, locations -from ansys.dpf.core import errors -from ansys.dpf.core import server as server_module +from ansys.dpf.core import errors, scoping, server as server_module from ansys.dpf.core.cache import _setter +from ansys.dpf.core.common import locations, natures from ansys.dpf.gate import ( data_processing_capi, data_processing_grpcapi, ) - -import numpy as np +from ansys.dpf.gate.generated import field_abstract_api class _FieldBase: diff --git a/src/ansys/dpf/core/field_definition.py b/src/ansys/dpf/core/field_definition.py index 4a55f324e8..2271c469f1 100644 --- a/src/ansys/dpf/core/field_definition.py +++ b/src/ansys/dpf/core/field_definition.py @@ -25,10 +25,10 @@ import traceback import warnings -from ansys.dpf.core.common import natures, shell_layers +from ansys.dpf.core import server as server_module from ansys.dpf.core.check_version import version_requires +from ansys.dpf.core.common import natures, shell_layers from ansys.dpf.core.dimensionality import Dimensionality -from ansys.dpf.core import server as server_module from ansys.dpf.gate import ( field_definition_capi, field_definition_grpcapi, diff --git a/src/ansys/dpf/core/fields_container.py b/src/ansys/dpf/core/fields_container.py index 07161c3b1e..0f8f43a1a2 100644 --- a/src/ansys/dpf/core/fields_container.py +++ b/src/ansys/dpf/core/fields_container.py @@ -27,12 +27,11 @@ """ from ansys import dpf +from ansys.dpf.core import errors as dpf_errors, field from ansys.dpf.core.collection_base import CollectionBase -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import field -class FieldsContainer(CollectionBase[field.Field]): +class FieldsContainer(CollectionBase["field.Field"]): """Represents a fields container, which contains fields belonging to a common result. A fields container is a set of fields ordered by labels and IDs. Each field @@ -50,7 +49,7 @@ class FieldsContainer(CollectionBase[field.Field]): Parameters ---------- - fields_container : ansys.grpc.dpf.collection_pb2.Collection, ctypes.c_void_p, + fields_container : ansys.grpc.dpf.collection_message_pb2.Collection, ctypes.c_void_p, FieldsContainer, optional Fields container created from either a collection message or by copying an existing fields container. The default is "None``. @@ -88,8 +87,6 @@ class FieldsContainer(CollectionBase[field.Field]): """ - entries_type = field.Field - def __init__(self, fields_container=None, server=None): super().__init__(collection=fields_container, server=server) if self._internal_obj is None: @@ -333,7 +330,7 @@ def get_imaginary_field(self, timeid=None): return super()._get_entry(label_space) - def __getitem__(self, key) -> field.Field: + def __getitem__(self, key) -> "field.Field": """Retrieve the field at a requested index. Parameters @@ -660,8 +657,7 @@ def __add__(self, fields_b): ------- add : operators.math.add_fc """ - from ansys.dpf.core import dpf_operator - from ansys.dpf.core import operators + from ansys.dpf.core import dpf_operator, operators if hasattr(operators, "math") and hasattr(operators.math, "add_fc"): op = operators.math.add_fc(self, fields_b, server=self._server) @@ -678,8 +674,7 @@ def __sub__(self, fields_b): ------- minus : operators.math.minus_fc """ - from ansys.dpf.core import dpf_operator - from ansys.dpf.core import operators + from ansys.dpf.core import dpf_operator, operators if hasattr(operators, "math") and hasattr(operators.math, "minus_fc"): op = operators.math.minus_fc(server=self._server) @@ -693,8 +688,7 @@ def __pow__(self, value): """Compute element-wise field[i]^2.""" if value != 2: raise ValueError('DPF only the value is "2" supported') - from ansys.dpf.core import dpf_operator - from ansys.dpf.core import operators + from ansys.dpf.core import dpf_operator, operators if hasattr(operators, "math") and hasattr(operators.math, "sqr_fc"): op = operators.math.sqr_fc(server=self._server) @@ -711,8 +705,7 @@ def __mul__(self, value): ------- mul : operators.math.generalized_inner_product_fc """ - from ansys.dpf.core import dpf_operator - from ansys.dpf.core import operators + from ansys.dpf.core import dpf_operator, operators if hasattr(operators, "math") and hasattr(operators.math, "generalized_inner_product_fc"): op = operators.math.generalized_inner_product_fc(server=self._server) diff --git a/src/ansys/dpf/core/fields_container_factory.py b/src/ansys/dpf/core/fields_container_factory.py index e689170458..de5f8f0741 100644 --- a/src/ansys/dpf/core/fields_container_factory.py +++ b/src/ansys/dpf/core/fields_container_factory.py @@ -26,9 +26,7 @@ Contains functions to simplify creating a fields container. """ -from ansys.dpf.core import FieldsContainer, TimeFreqSupport -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import fields_factory +from ansys.dpf.core import FieldsContainer, TimeFreqSupport, errors as dpf_errors, fields_factory from ansys.dpf.core.common import locations diff --git a/src/ansys/dpf/core/fields_factory.py b/src/ansys/dpf/core/fields_factory.py index 86f448c529..fd10704199 100644 --- a/src/ansys/dpf/core/fields_factory.py +++ b/src/ansys/dpf/core/fields_factory.py @@ -26,13 +26,12 @@ Contains functions to simplify creating fields. """ -from ansys.dpf.core.common import natures, locations -from ansys.dpf.core import Field -from ansys.dpf.core import server as server_module -from ansys.dpf.gate import field_capi, field_grpcapi - import numpy as np +from ansys.dpf.core import Field, server as server_module +from ansys.dpf.core.common import locations, natures +from ansys.dpf.gate import field_capi, field_grpcapi + def field_from_array(arr, server=None): """Create a DPF vector or scalar field from a numpy array or a Python list. diff --git a/src/ansys/dpf/core/generic_data_container.py b/src/ansys/dpf/core/generic_data_container.py index 6f7c5b0f6e..7bab2bc2e9 100644 --- a/src/ansys/dpf/core/generic_data_container.py +++ b/src/ansys/dpf/core/generic_data_container.py @@ -23,10 +23,11 @@ """GenericDataContainer.""" from __future__ import annotations + +import builtins import traceback +from typing import TYPE_CHECKING, Union import warnings -import builtins -from typing import Union, TYPE_CHECKING import numpy as np @@ -34,15 +35,11 @@ from ansys.dpf.gate import dpf_vector if TYPE_CHECKING: # pragma: no cover - from ansys.dpf.core import Field, Scoping, StringField, GenericDataContainer + from ansys.dpf.core import Field, GenericDataContainer, Scoping, StringField -from ansys.dpf.core.dpf_operator import _write_output_type_to_type - - -from ansys.dpf.core import server as server_module -from ansys.dpf.core import errors, types +from ansys.dpf.core import collection_base, errors, server as server_module, types from ansys.dpf.core.any import Any -from ansys.dpf.core import collection_base +from ansys.dpf.core.dpf_operator import _write_output_type_to_type from ansys.dpf.core.mapping_types import map_types_to_python diff --git a/src/ansys/dpf/core/generic_support.py b/src/ansys/dpf/core/generic_support.py index 2781e1609c..0bbd720f42 100644 --- a/src/ansys/dpf/core/generic_support.py +++ b/src/ansys/dpf/core/generic_support.py @@ -22,9 +22,9 @@ """GenericSupport.""" -from ansys.dpf.gate import generic_support_capi, generic_support_grpcapi +from ansys.dpf.core import errors, field, property_field, string_field from ansys.dpf.core.support import Support -from ansys.dpf.core import field, property_field, string_field, errors +from ansys.dpf.gate import generic_support_capi, generic_support_grpcapi class GenericSupport(Support): diff --git a/src/ansys/dpf/core/geometry.py b/src/ansys/dpf/core/geometry.py index 073a3a6a8f..a2a328a818 100644 --- a/src/ansys/dpf/core/geometry.py +++ b/src/ansys/dpf/core/geometry.py @@ -27,14 +27,13 @@ """ -from ansys.dpf import core as dpf +import numpy as np +from ansys.dpf import core as dpf from ansys.dpf.core import Field from ansys.dpf.core.fields_factory import field_from_array from ansys.dpf.core.plotter import DpfPlotter -import numpy as np - def normalize_vector(vector): """Normalize vector.""" diff --git a/src/ansys/dpf/core/geometry_factory.py b/src/ansys/dpf/core/geometry_factory.py index f0d4daf2c3..ac042505ab 100644 --- a/src/ansys/dpf/core/geometry_factory.py +++ b/src/ansys/dpf/core/geometry_factory.py @@ -29,12 +29,12 @@ import numpy as np from ansys.dpf.core.geometry import ( - Points, Line, Plane, - normalize_vector, - get_plane_local_axis, + Points, get_local_coords_from_global, + get_plane_local_axis, + normalize_vector, ) diff --git a/src/ansys/dpf/core/helpers/streamlines.py b/src/ansys/dpf/core/helpers/streamlines.py index ce5c589230..c5360847bf 100644 --- a/src/ansys/dpf/core/helpers/streamlines.py +++ b/src/ansys/dpf/core/helpers/streamlines.py @@ -22,9 +22,10 @@ """Streamlines computation specific helpers.""" -import numpy as np import warnings +import numpy as np + from ansys.dpf.core.common import locations from ansys.dpf.core.fields_container import FieldsContainer from ansys.dpf.core.helpers.utils import _sort_supported_kwargs diff --git a/src/ansys/dpf/core/incremental.py b/src/ansys/dpf/core/incremental.py index 208bb1c82b..0e8e024b34 100644 --- a/src/ansys/dpf/core/incremental.py +++ b/src/ansys/dpf/core/incremental.py @@ -22,9 +22,9 @@ """Incremental.""" -from ansys.dpf import core +from typing import Any, Dict -from typing import Dict, Any +from ansys.dpf import core class IncrementalHelper: diff --git a/src/ansys/dpf/core/inputs.py b/src/ansys/dpf/core/inputs.py index cde64a9a78..16fda8534f 100644 --- a/src/ansys/dpf/core/inputs.py +++ b/src/ansys/dpf/core/inputs.py @@ -22,11 +22,12 @@ """Inputs.""" -import weakref from textwrap import wrap -from ansys.dpf.core.mapping_types import map_types_to_python -from ansys.dpf.core.outputs import _Outputs, Output +import weakref + from ansys.dpf import core +from ansys.dpf.core.mapping_types import map_types_to_python +from ansys.dpf.core.outputs import Output, _Outputs class Input: diff --git a/src/ansys/dpf/core/label_space.py b/src/ansys/dpf/core/label_space.py index 4b2ac68569..ea38180c02 100644 --- a/src/ansys/dpf/core/label_space.py +++ b/src/ansys/dpf/core/label_space.py @@ -22,16 +22,17 @@ """Internal Usage.""" -import warnings import traceback from typing import Dict +import warnings + +from ansys.dpf.core import server as server_module from ansys.dpf.gate import ( - label_space_capi, - label_space_grpcapi, data_processing_capi, data_processing_grpcapi, + label_space_capi, + label_space_grpcapi, ) -from ansys.dpf.core import server as server_module class LabelSpace: diff --git a/src/ansys/dpf/core/mapping_types.py b/src/ansys/dpf/core/mapping_types.py index e345af2418..d23dcbd48c 100644 --- a/src/ansys/dpf/core/mapping_types.py +++ b/src/ansys/dpf/core/mapping_types.py @@ -21,23 +21,23 @@ # SOFTWARE. """Provides utilities for mapping and transforming data types between Python and C++ representations.""" -import sys import inspect +import sys -## to do : change that one the module is done -from ansys.dpf.core.meshed_region import * # noqa: F401, F403 from ansys.dpf.core.available_result import * # noqa: F401, F403 -from ansys.dpf.core.data_sources import * # noqa: F401, F403 -from ansys.dpf.core.field import * # noqa: F401, F403 -from ansys.dpf.core.fields_container import * # noqa: F401, F403 -from ansys.dpf.core.scoping import * # noqa: F401, F403 -from ansys.dpf.core.time_freq_support import * # noqa: F401, F403 from ansys.dpf.core.common import ( - _smart_dict_camel, _camel_to_snake_case, + _smart_dict_camel, _snake_to_camel_case, ) +from ansys.dpf.core.data_sources import * # noqa: F401, F403 +from ansys.dpf.core.field import * # noqa: F401, F403 +from ansys.dpf.core.fields_container import * # noqa: F401, F403 +## to do : change that one the module is done +from ansys.dpf.core.meshed_region import * # noqa: F401, F403 +from ansys.dpf.core.scoping import * # noqa: F401, F403 +from ansys.dpf.core.time_freq_support import * # noqa: F401, F403 map_types_to_cpp = _smart_dict_camel() for classes in inspect.getmembers(sys.modules[__name__], inspect.isclass): diff --git a/src/ansys/dpf/core/mesh_scoping_factory.py b/src/ansys/dpf/core/mesh_scoping_factory.py index 0f8900e2e6..c81ab5910b 100644 --- a/src/ansys/dpf/core/mesh_scoping_factory.py +++ b/src/ansys/dpf/core/mesh_scoping_factory.py @@ -31,9 +31,9 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: # pragma: nocover - from ansys.dpf.core.server_types import AnyServerType - from ansys.dpf.core.scoping import IdVectorType from ansys.dpf.core.model import Model + from ansys.dpf.core.scoping import IdVectorType + from ansys.dpf.core.server_types import AnyServerType from ansys.dpf.core import Scoping from ansys.dpf.core.common import locations diff --git a/src/ansys/dpf/core/meshed_region.py b/src/ansys/dpf/core/meshed_region.py index 29fb7e2ff9..f17bdf6467 100644 --- a/src/ansys/dpf/core/meshed_region.py +++ b/src/ansys/dpf/core/meshed_region.py @@ -27,27 +27,25 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: # pragma: nocover - from ansys.dpf.core.server_types import AnyServerType from ansys.dpf.core.scoping import Scoping + from ansys.dpf.core.server_types import AnyServerType import traceback import warnings -import ansys.dpf.core.errors - -from ansys.dpf.core import scoping, field, property_field +from ansys.dpf.core import field, property_field, scoping, server as server_module +from ansys.dpf.core.cache import class_handling_cache from ansys.dpf.core.check_version import server_meet_version, version_requires from ansys.dpf.core.common import ( locations, - types, nodal_properties, + types, ) from ansys.dpf.core.elements import Elements, element_types -from ansys.dpf.core.nodes import Nodes +import ansys.dpf.core.errors from ansys.dpf.core.faces import Faces +from ansys.dpf.core.nodes import Nodes from ansys.dpf.core.plotter import DpfPlotter, Plotter -from ansys.dpf.core.cache import class_handling_cache -from ansys.dpf.core import server as server_module from ansys.dpf.gate import meshed_region_capi, meshed_region_grpcapi diff --git a/src/ansys/dpf/core/meshes_container.py b/src/ansys/dpf/core/meshes_container.py index e2e43e8ee8..6b722bff1a 100644 --- a/src/ansys/dpf/core/meshes_container.py +++ b/src/ansys/dpf/core/meshes_container.py @@ -27,10 +27,9 @@ Contains classes associated with the DPF MeshesContainer. """ -from ansys.dpf.core import meshed_region +from ansys.dpf.core import errors as dpf_errors, meshed_region from ansys.dpf.core.collection_base import CollectionBase from ansys.dpf.core.plotter import DpfPlotter -from ansys.dpf.core import errors as dpf_errors class MeshesContainer(CollectionBase[meshed_region.MeshedRegion]): @@ -38,7 +37,7 @@ class MeshesContainer(CollectionBase[meshed_region.MeshedRegion]): Parameters ---------- - meshes_container : ansys.grpc.dpf.collection_pb2.Collection or + meshes_container : ansys.grpc.dpf.collection_message_pb2.Collection or ansys.dpf.core.MeshesContainer, optional Create a meshes container from a collection message or create a copy from an existing meshes container. The default is ``None``. diff --git a/src/ansys/dpf/core/misc.py b/src/ansys/dpf/core/misc.py index 13ccee9d62..2ba6e93956 100644 --- a/src/ansys/dpf/core/misc.py +++ b/src/ansys/dpf/core/misc.py @@ -22,16 +22,16 @@ """Miscellaneous functions for the DPF module.""" -import platform import glob import os -import re from pathlib import Path - from pkgutil import iter_modules +import platform +import re + from ansys.dpf.core import errors -from ansys.dpf.gate._version import __ansys_version__ from ansys.dpf.gate import load_api +from ansys.dpf.gate._version import __ansys_version__ DEFAULT_FILE_CHUNK_SIZE = 524288 DYNAMIC_RESULTS = True diff --git a/src/ansys/dpf/core/model.py b/src/ansys/dpf/core/model.py index 6b5ef71cb1..95ca770996 100644 --- a/src/ansys/dpf/core/model.py +++ b/src/ansys/dpf/core/model.py @@ -31,19 +31,18 @@ from typing import TYPE_CHECKING if TYPE_CHECKING: # pragma: nocover - from ansys.dpf.core.server_types import AnyServerType from ansys.dpf.core.scoping import Scoping + from ansys.dpf.core.server_types import AnyServerType from ansys import dpf -from ansys.dpf.core import Operator +from ansys.dpf.core import Operator, misc +from ansys.dpf.core._model_helpers import DataSourcesOrStreamsConnector +from ansys.dpf.core.check_version import version_requires from ansys.dpf.core.common import types from ansys.dpf.core.data_sources import DataSources -from ansys.dpf.core.results import Results, CommonResults -from ansys.dpf.core.server_types import LOG -from ansys.dpf.core import misc from ansys.dpf.core.errors import protect_source_op_not_found -from ansys.dpf.core._model_helpers import DataSourcesOrStreamsConnector -from ansys.dpf.core.check_version import version_requires +from ansys.dpf.core.results import CommonResults, Results +from ansys.dpf.core.server_types import LOG class Model: diff --git a/src/ansys/dpf/core/nodes.py b/src/ansys/dpf/core/nodes.py index 241c142571..668922148e 100644 --- a/src/ansys/dpf/core/nodes.py +++ b/src/ansys/dpf/core/nodes.py @@ -23,9 +23,9 @@ """Nodes.""" import numpy as np -from ansys.dpf.core.common import nodal_properties, locations -from ansys.dpf.core.check_version import version_requires + from ansys.dpf.core.check_version import version_requires +from ansys.dpf.core.common import locations, nodal_properties class Node: diff --git a/src/ansys/dpf/core/operator_specification.py b/src/ansys/dpf/core/operator_specification.py index 55315c5290..5fe6070e64 100644 --- a/src/ansys/dpf/core/operator_specification.py +++ b/src/ansys/dpf/core/operator_specification.py @@ -27,17 +27,17 @@ """ from __future__ import annotations + import abc from typing import Union -from ansys.dpf.core import server as server_module + +from ansys.dpf.core import common, mapping_types, server as server_module +from ansys.dpf.core.check_version import server_meet_version, version_requires from ansys.dpf.gate import ( + integral_types, operator_specification_capi, operator_specification_grpcapi, - integral_types, ) -from ansys.dpf.core import mapping_types, common -from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core.check_version import server_meet_version class PinSpecification: diff --git a/src/ansys/dpf/core/outputs.py b/src/ansys/dpf/core/outputs.py index 64f691869c..51eb731eeb 100644 --- a/src/ansys/dpf/core/outputs.py +++ b/src/ansys/dpf/core/outputs.py @@ -22,10 +22,11 @@ """Outputs.""" -from ansys.dpf.core.mapping_types import map_types_to_python +import re + from ansys.dpf.core.common import types +from ansys.dpf.core.mapping_types import map_types_to_python from ansys.dpf.core.operator_specification import PinSpecification -import re class Output: diff --git a/src/ansys/dpf/core/path_utilities.py b/src/ansys/dpf/core/path_utilities.py index 844afd71fe..7cdad7d070 100644 --- a/src/ansys/dpf/core/path_utilities.py +++ b/src/ansys/dpf/core/path_utilities.py @@ -28,10 +28,10 @@ """ import os +from pathlib import Path -import ansys.dpf.core.server_types from ansys.dpf.core import server as server_module -from pathlib import Path +import ansys.dpf.core.server_types def join(*args, **kwargs): diff --git a/src/ansys/dpf/core/plotter.py b/src/ansys/dpf/core/plotter.py index 9c957c4198..b7a7558bcb 100644 --- a/src/ansys/dpf/core/plotter.py +++ b/src/ansys/dpf/core/plotter.py @@ -30,20 +30,20 @@ from __future__ import annotations -import tempfile import os -import sys -import numpy as np -import warnings from pathlib import Path +import sys +import tempfile from typing import TYPE_CHECKING, List, Union +import warnings + +import numpy as np from ansys import dpf from ansys.dpf import core -from ansys.dpf.core.common import locations, DefinitionLabels -from ansys.dpf.core.common import shell_layers as eshell_layers -from ansys.dpf.core.helpers.streamlines import _sort_supported_kwargs from ansys.dpf.core import errors as dpf_errors +from ansys.dpf.core.common import DefinitionLabels, locations, shell_layers as eshell_layers +from ansys.dpf.core.helpers.streamlines import _sort_supported_kwargs from ansys.dpf.core.nodes import Node, Nodes if TYPE_CHECKING: # pragma: no cover @@ -186,10 +186,9 @@ def get_label_at_grid_point(index): # Filter kwargs kwargs_in = _sort_supported_kwargs(bound_method=self._plotter.add_point_labels, **kwargs) - import pyvista as pv - # The scalar data used will be the one of the last field added. from packaging.version import parse + import pyvista as pv active_scalars = None if parse(pv.__version__) >= parse("0.35.2"): diff --git a/src/ansys/dpf/core/property_field.py b/src/ansys/dpf/core/property_field.py index aad26188f4..aa07ee8ce0 100644 --- a/src/ansys/dpf/core/property_field.py +++ b/src/ansys/dpf/core/property_field.py @@ -23,18 +23,18 @@ """PropertyField.""" import numpy as np -from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core.common import natures, locations, _get_size_of_list -from ansys.dpf.core import scoping, dimensionality + +from ansys.dpf.core import dimensionality, scoping +from ansys.dpf.core.check_version import meets_version, version_requires +from ansys.dpf.core.common import _get_size_of_list, locations, natures from ansys.dpf.core.field_base import _FieldBase, _LocalFieldBase -from ansys.dpf.core.check_version import meets_version from ansys.dpf.core.field_definition import FieldDefinition from ansys.dpf.gate import ( + dpf_array, + dpf_vector, property_field_abstract_api, property_field_capi, property_field_grpcapi, - dpf_array, - dpf_vector, ) diff --git a/src/ansys/dpf/core/result_info.py b/src/ansys/dpf/core/result_info.py index 14f5a7f4b8..336a571e0f 100644 --- a/src/ansys/dpf/core/result_info.py +++ b/src/ansys/dpf/core/result_info.py @@ -22,33 +22,30 @@ """ResultInfo.""" +from enum import Enum, unique import traceback +from types import SimpleNamespace +from typing import List, Union import warnings -from typing import List, Union -from enum import Enum, unique -from types import SimpleNamespace +from ansys.dpf.core import available_result, collection_base, server as server_module, support +from ansys.dpf.core.available_result import Homogeneity +from ansys.dpf.core.check_version import version_requires +from ansys.dpf.core.common import locations +from ansys.dpf.core.cyclic_support import CyclicSupport +from ansys.dpf.core.dimensionality import natures +from ansys.dpf.core.label_space import LabelSpace from ansys.dpf.gate import ( - result_info_capi, - result_info_grpcapi, + data_processing_capi, + data_processing_grpcapi, integral_types, label_space_capi, label_space_grpcapi, object_handler, - data_processing_grpcapi, - data_processing_capi, + result_info_capi, + result_info_grpcapi, ) -from ansys.dpf.core import collection_base -from ansys.dpf.core import server as server_module -from ansys.dpf.core import available_result, support -from ansys.dpf.core.cyclic_support import CyclicSupport -from ansys.dpf.core.label_space import LabelSpace -from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core.dimensionality import natures -from ansys.dpf.core.common import locations -from ansys.dpf.core.available_result import Homogeneity - @unique class physics_types(Enum): diff --git a/src/ansys/dpf/core/results.py b/src/ansys/dpf/core/results.py index 89ad91c46b..a1801ee4f5 100644 --- a/src/ansys/dpf/core/results.py +++ b/src/ansys/dpf/core/results.py @@ -29,13 +29,12 @@ import functools -from ansys.dpf.core import Operator -from ansys.dpf.core import errors -from ansys.dpf.core.scoping import Scoping +from ansys.dpf.core import Operator, errors from ansys.dpf.core.custom_fields_container import ( - ElShapeFieldsContainer, BodyFieldsContainer, + ElShapeFieldsContainer, ) +from ansys.dpf.core.scoping import Scoping class Results: diff --git a/src/ansys/dpf/core/runtime_config.py b/src/ansys/dpf/core/runtime_config.py index c3cdf4247f..e3f36a996f 100644 --- a/src/ansys/dpf/core/runtime_config.py +++ b/src/ansys/dpf/core/runtime_config.py @@ -22,9 +22,9 @@ """RuntimeConfig.""" -from ansys.dpf.core.data_tree import DataTree -from ansys.dpf.core.common import types from ansys.dpf.core import misc +from ansys.dpf.core.common import types +from ansys.dpf.core.data_tree import DataTree class _RuntimeConfig: diff --git a/src/ansys/dpf/core/scoping.py b/src/ansys/dpf/core/scoping.py index cfb49779e2..97e7b86029 100644 --- a/src/ansys/dpf/core/scoping.py +++ b/src/ansys/dpf/core/scoping.py @@ -23,31 +23,33 @@ """Scoping.""" from __future__ import annotations + +import ctypes import traceback -from typing import Union, TYPE_CHECKING +from typing import TYPE_CHECKING, Union import warnings -import ctypes import numpy as np +from ansys.dpf.core import server as server_module, server_types +from ansys.dpf.core.cache import _setter from ansys.dpf.core.check_version import version_requires from ansys.dpf.core.common import locations -from ansys.dpf.core import server as server_module -from ansys.dpf.core import server_types -from ansys.dpf.core.cache import _setter from ansys.dpf.gate import ( - scoping_capi, - scoping_grpcapi, data_processing_capi, data_processing_grpcapi, - dpf_vector_capi, - dpf_vector_abstract_api, dpf_vector, + dpf_vector_abstract_api, + dpf_vector_capi, + scoping_capi, + scoping_grpcapi, utils, ) from ansys.dpf.gate.dpf_array import DPFArray if TYPE_CHECKING: # pragma: nocover + from ctypes import c_void_p as ScopingPointer + from ansys.dpf.core.server_types import AnyServerType import ansys.grpc.dpf.scoping_pb2.Scoping as ScopingMessage from ctypes import c_void_p as ScopingPointer diff --git a/src/ansys/dpf/core/scopings_container.py b/src/ansys/dpf/core/scopings_container.py index 64a34a5eb0..c076b9fdc6 100644 --- a/src/ansys/dpf/core/scopings_container.py +++ b/src/ansys/dpf/core/scopings_container.py @@ -37,7 +37,7 @@ class ScopingsContainer(CollectionBase[scoping.Scoping]): Parameters ---------- - scopings_container : ansys.grpc.dpf.collection_pb2.Collection or + scopings_container : ansys.grpc.dpf.collection_message_pb2.Collection or ansys.dpf.core.ScopingsContainer, optional Create a scopings container from a Collection message or create a copy from an existing scopings container diff --git a/src/ansys/dpf/core/server.py b/src/ansys/dpf/core/server.py index 81888c4435..00d0e48a64 100644 --- a/src/ansys/dpf/core/server.py +++ b/src/ansys/dpf/core/server.py @@ -26,30 +26,27 @@ Contains the directives necessary to start the DPF server. """ +import copy import functools +import inspect import os +import platform import socket import sys -import weakref -import copy -import platform -import inspect -import warnings import traceback from typing import Union +import warnings +import weakref from ansys import dpf - -from ansys.dpf.core.misc import is_ubuntu, get_ansys_path -from ansys.dpf.core import errors - +from ansys.dpf.core import errors, server_context +from ansys.dpf.core.misc import get_ansys_path, is_ubuntu from ansys.dpf.core.server_factory import ( + CommunicationProtocols, ServerConfig, ServerFactory, - CommunicationProtocols, ) from ansys.dpf.core.server_types import DPF_DEFAULT_PORT, LOCALHOST, RUNNING_DOCKER, BaseServer -from ansys.dpf.core import server_context def shutdown_global_server(): diff --git a/src/ansys/dpf/core/server_context.py b/src/ansys/dpf/core/server_context.py index d8e80193fa..3587989716 100644 --- a/src/ansys/dpf/core/server_context.py +++ b/src/ansys/dpf/core/server_context.py @@ -35,11 +35,11 @@ ANSYS_DPF_SERVER_CONTEXT=ENTRY and ANSYS_DPF_SERVER_CONTEXT=PREMIUM can be used. """ +from enum import Enum import os import warnings -from enum import Enum -from ansys.dpf.core import dpf_operator -from ansys.dpf.core import errors + +from ansys.dpf.core import dpf_operator, errors class LicensingContextType(Enum): diff --git a/src/ansys/dpf/core/server_factory.py b/src/ansys/dpf/core/server_factory.py index 6268767bf4..2be2f8a069 100644 --- a/src/ansys/dpf/core/server_factory.py +++ b/src/ansys/dpf/core/server_factory.py @@ -27,15 +27,15 @@ protocols and server configurations available. """ +import io import logging import os import subprocess import time -import io from ansys.dpf.gate.load_api import ( - _get_path_in_install, _find_outdated_ansys_version, + _get_path_in_install, ) @@ -700,9 +700,9 @@ def get_server_type_from_config( ): """Return server type determined from the server configuration.""" from ansys.dpf.core.server_types import ( - LegacyGrpcServer, GrpcServer, InProcessServer, + LegacyGrpcServer, ) # dpf.core.SERVER_CONFIGURATION is required to know what type of connection to set diff --git a/src/ansys/dpf/core/server_types.py b/src/ansys/dpf/core/server_types.py index d88e4cc47e..b98d243e3b 100644 --- a/src/ansys/dpf/core/server_types.py +++ b/src/ansys/dpf/core/server_types.py @@ -28,29 +28,29 @@ """ from __future__ import annotations + import abc +from abc import ABC +import ctypes import io import os +from pathlib import Path import socket import subprocess import sys +from threading import Lock, Thread import time -import warnings import traceback -from threading import Thread, Lock -from abc import ABC -import ctypes from typing import TYPE_CHECKING, Union -from pathlib import Path +import warnings import psutil import ansys.dpf.core as core -from ansys.dpf.core.check_version import server_meet_version -from ansys.dpf.core import errors, server_factory, __version__ +from ansys.dpf.core import __version__, errors, server_context, server_factory from ansys.dpf.core._version import min_server_version, server_to_ansys_version -from ansys.dpf.core import server_context -from ansys.dpf.gate import load_api, data_processing_grpcapi +from ansys.dpf.core.check_version import server_meet_version +from ansys.dpf.gate import data_processing_grpcapi, load_api if TYPE_CHECKING: from ansys.dpf.core.server_factory import DockerConfig @@ -329,6 +329,7 @@ def launch_remote_dpf(version=None): def _compare_ansys_grpc_dpf_version(right_grpc_module_version_str: str, grpc_module_version: str): if right_grpc_module_version_str: import re + from packaging.version import parse as parse_version right_version_first_numbers = re.search(r"\d", right_grpc_module_version_str) diff --git a/src/ansys/dpf/core/session.py b/src/ansys/dpf/core/session.py index bb2166366e..1dc22a5de9 100644 --- a/src/ansys/dpf/core/session.py +++ b/src/ansys/dpf/core/session.py @@ -30,17 +30,13 @@ import warnings import weakref -from ansys.dpf.gate import session_capi, session_grpcapi, capi - -from ansys.dpf.core import server as server_module -from ansys.dpf.core import server_types, errors -from ansys.dpf.core.check_version import version_requires, server_meet_version +from ansys.dpf.core import data_tree, errors, server as server_module, server_types +from ansys.dpf.core.check_version import version_requires from ansys.dpf.core.common import ( _common_percentage_progress_bar, _progress_bar_is_available, ) -from ansys.dpf.core import data_tree - +from ansys.dpf.gate import capi, session_capi, session_grpcapi LOG = logging.getLogger(__name__) LOG.setLevel("DEBUG") diff --git a/src/ansys/dpf/core/settings.py b/src/ansys/dpf/core/settings.py index 4e1b8ea295..9d5e381cb5 100644 --- a/src/ansys/dpf/core/settings.py +++ b/src/ansys/dpf/core/settings.py @@ -26,12 +26,11 @@ Customize the behavior of the module. """ +from ansys.dpf.core import core, misc from ansys.dpf.core.misc import module_exists -from ansys.dpf.core import misc from ansys.dpf.core.server import set_server_configuration # noqa: F401 from ansys.dpf.core.server_context import set_default_server_context # noqa: F401 from ansys.dpf.core.server_factory import ServerConfig # noqa: F401 -from ansys.dpf.core import core from ansys.dpf.gate import ( data_processing_capi, data_processing_grpcapi, @@ -121,9 +120,9 @@ def set_dynamic_available_results_capability(value) -> None: def _forward_to_gate(): - from ansys.dpf.gate import settings - from ansys.dpf.core.misc import DEFAULT_FILE_CHUNK_SIZE from ansys.dpf.core.common import _common_progress_bar, _progress_bar_is_available + from ansys.dpf.core.misc import DEFAULT_FILE_CHUNK_SIZE + from ansys.dpf.gate import settings settings.forward_settings( DEFAULT_FILE_CHUNK_SIZE, @@ -152,8 +151,8 @@ def get_runtime_client_config(server=None): with Ans.Dpf.GrpcClient configuration. """ - from ansys.dpf.core.runtime_config import RuntimeClientConfig from ansys.dpf import core as root + from ansys.dpf.core.runtime_config import RuntimeClientConfig if server is None: server = root.SERVER diff --git a/src/ansys/dpf/core/streams_container.py b/src/ansys/dpf/core/streams_container.py index 0b59677fc5..8e61a97514 100644 --- a/src/ansys/dpf/core/streams_container.py +++ b/src/ansys/dpf/core/streams_container.py @@ -27,17 +27,16 @@ Contains classes associated with the DPF StreamsContainer. """ -import warnings import traceback +import warnings +from ansys.dpf.core import data_sources, errors, server as server_module from ansys.dpf.core.server_types import BaseServer -from ansys.dpf.core import server as server_module from ansys.dpf.gate import ( - streams_capi, data_processing_capi, data_processing_grpcapi, + streams_capi, ) -from ansys.dpf.core import errors, data_sources class StreamsContainer: diff --git a/src/ansys/dpf/core/string_field.py b/src/ansys/dpf/core/string_field.py index a547441843..d8e6da0d72 100644 --- a/src/ansys/dpf/core/string_field.py +++ b/src/ansys/dpf/core/string_field.py @@ -22,20 +22,20 @@ """StringField.""" +from typing import List + import numpy as np -from ansys.dpf.core.common import natures, locations, _get_size_of_list -from ansys.dpf.core import scoping -from ansys.dpf.core import server as server_module -from ansys.dpf.core import errors + +from ansys.dpf.core import errors, scoping, server as server_module +from ansys.dpf.core.common import _get_size_of_list, locations, natures from ansys.dpf.core.field_base import _FieldBase from ansys.dpf.gate import ( + dpf_vector, + integral_types, string_field_abstract_api, string_field_capi, string_field_grpcapi, - dpf_vector, - integral_types, ) -from typing import List class StringField(_FieldBase): diff --git a/src/ansys/dpf/core/support.py b/src/ansys/dpf/core/support.py index 9bc9076d17..26a6acbf12 100644 --- a/src/ansys/dpf/core/support.py +++ b/src/ansys/dpf/core/support.py @@ -24,11 +24,10 @@ import traceback import warnings -from ansys.dpf.gate import support_capi, support_grpcapi -from ansys.dpf.core.check_version import version_requires -from ansys.dpf.core import server as server_module -from ansys.dpf.core import collection_base +from ansys.dpf.core import collection_base, server as server_module +from ansys.dpf.core.check_version import version_requires +from ansys.dpf.gate import support_capi, support_grpcapi class Support: diff --git a/src/ansys/dpf/core/time_freq_scoping_factory.py b/src/ansys/dpf/core/time_freq_scoping_factory.py index adfc8a2592..3c87f06306 100644 --- a/src/ansys/dpf/core/time_freq_scoping_factory.py +++ b/src/ansys/dpf/core/time_freq_scoping_factory.py @@ -26,16 +26,14 @@ Contains functions to simplify creating time frequency scopings. """ -from ansys.dpf.core import Scoping -from ansys.dpf.core import errors as dpf_errors +from typing import Union + +from ansys.dpf.core import Scoping, errors as dpf_errors, types from ansys.dpf.core.common import locations -from ansys.dpf.core.model import Model -from ansys.dpf.core.time_freq_support import TimeFreqSupport from ansys.dpf.core.data_sources import DataSources +from ansys.dpf.core.model import Model from ansys.dpf.core.operators.metadata import time_freq_provider - -from ansys.dpf.core import types -from typing import Union +from ansys.dpf.core.time_freq_support import TimeFreqSupport def scoping_by_load_step(load_step: int, server=None): diff --git a/src/ansys/dpf/core/time_freq_support.py b/src/ansys/dpf/core/time_freq_support.py index 9497aae523..e010bd58b1 100644 --- a/src/ansys/dpf/core/time_freq_support.py +++ b/src/ansys/dpf/core/time_freq_support.py @@ -22,12 +22,11 @@ """TimeFreqSupport.""" -from ansys.dpf.gate import time_freq_support_capi, time_freq_support_grpcapi - from ansys import dpf from ansys.dpf import core from ansys.dpf.core import errors as dpf_errors from ansys.dpf.core.support import Support +from ansys.dpf.gate import time_freq_support_capi, time_freq_support_grpcapi class TimeFreqSupport(Support): diff --git a/src/ansys/dpf/core/unit_system.py b/src/ansys/dpf/core/unit_system.py index f6f318ff65..819279146d 100644 --- a/src/ansys/dpf/core/unit_system.py +++ b/src/ansys/dpf/core/unit_system.py @@ -23,8 +23,7 @@ """UnitSystem.""" from ansys.dpf import core as dpf -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import server as server_module +from ansys.dpf.core import errors as dpf_errors, server as server_module class UnitSystem: diff --git a/src/ansys/dpf/core/vtk_helper.py b/src/ansys/dpf/core/vtk_helper.py index 0be3efa9c5..ad5c49a556 100644 --- a/src/ansys/dpf/core/vtk_helper.py +++ b/src/ansys/dpf/core/vtk_helper.py @@ -22,9 +22,10 @@ """Provides for vtk helper functions.""" +from typing import Union + import numpy as np import pyvista as pv -from typing import Union from vtk import ( VTK_HEXAHEDRON, VTK_LINE, diff --git a/src/ansys/dpf/core/workflow.py b/src/ansys/dpf/core/workflow.py index 6d93283574..7c26580219 100644 --- a/src/ansys/dpf/core/workflow.py +++ b/src/ansys/dpf/core/workflow.py @@ -22,34 +22,32 @@ """Workflow.""" +from enum import Enum import logging import os -import traceback -import warnings from pathlib import Path - -from enum import Enum +import traceback from typing import Union +import warnings import numpy from ansys import dpf -from ansys.dpf.core import dpf_operator, inputs, outputs +from ansys.dpf.core import dpf_operator, inputs, outputs, server as server_module from ansys.dpf.core.check_version import ( server_meet_version, - version_requires, server_meet_version_and_raise, + version_requires, ) -from ansys.dpf.core import server as server_module from ansys.dpf.gate import ( - workflow_abstract_api, - workflow_grpcapi, - workflow_capi, data_processing_capi, data_processing_grpcapi, dpf_vector, - object_handler, integral_types, + object_handler, + workflow_abstract_api, + workflow_capi, + workflow_grpcapi, ) LOG = logging.getLogger(__name__) @@ -240,22 +238,22 @@ def connect(self, pin_name, inpt, pin_out=0): @property def _type_to_input_method(self): from ansys.dpf.core import ( + any, + collection, + custom_type_field, cyclic_support, data_sources, + data_tree, field, - collection, + generic_data_container, meshed_region, + model, property_field, - string_field, - custom_type_field, scoping, + streams_container, + string_field, time_freq_support, - data_tree, workflow, - model, - generic_data_container, - any, - streams_container, ) out = [ @@ -303,26 +301,26 @@ def _type_to_input_method(self): @property def _type_to_output_method(self): from ansys.dpf.core import ( + any, + collection, + collection_base, + custom_type_field, cyclic_support, data_sources, + data_tree, field, fields_container, + generic_data_container, meshed_region, meshes_container, property_field, - string_field, - custom_type_field, result_info, scoping, scopings_container, + streams_container, + string_field, time_freq_support, - data_tree, workflow, - collection, - generic_data_container, - any, - collection_base, - streams_container, ) from ansys.dpf.core.custom_container_base import CustomContainerBase diff --git a/src/ansys/dpf/core/workflow_topology/__init__.py b/src/ansys/dpf/core/workflow_topology/__init__.py index 013884911d..20abf694a8 100644 --- a/src/ansys/dpf/core/workflow_topology/__init__.py +++ b/src/ansys/dpf/core/workflow_topology/__init__.py @@ -21,7 +21,7 @@ # SOFTWARE. """Workflow topology module.""" -from .workflow_topology import WorkflowTopology -from .operator_connection import OperatorConnection from .data_connection import DataConnection from .exposed_pin import ExposedPin +from .operator_connection import OperatorConnection +from .workflow_topology import WorkflowTopology diff --git a/src/ansys/dpf/core/workflow_topology/data_connection.py b/src/ansys/dpf/core/workflow_topology/data_connection.py index 6217e51d61..ff3d7f13a2 100644 --- a/src/ansys/dpf/core/workflow_topology/data_connection.py +++ b/src/ansys/dpf/core/workflow_topology/data_connection.py @@ -29,6 +29,7 @@ """ from typing import Any, Iterator, Optional + from ansys.dpf.core import GenericDataContainersCollection from ansys.dpf.core.custom_container_base import CustomContainerBase from ansys.dpf.core.dpf_operator import Operator diff --git a/src/ansys/dpf/core/workflow_topology/exposed_pin.py b/src/ansys/dpf/core/workflow_topology/exposed_pin.py index fbc36b1ce1..1ef4e50e71 100644 --- a/src/ansys/dpf/core/workflow_topology/exposed_pin.py +++ b/src/ansys/dpf/core/workflow_topology/exposed_pin.py @@ -30,6 +30,7 @@ """ from typing import Iterator, Optional + from ansys.dpf.core import GenericDataContainersCollection from ansys.dpf.core.custom_container_base import CustomContainerBase from ansys.dpf.core.dpf_operator import Operator diff --git a/src/ansys/dpf/core/workflow_topology/operator_connection.py b/src/ansys/dpf/core/workflow_topology/operator_connection.py index 881f5600a9..fbd7552870 100644 --- a/src/ansys/dpf/core/workflow_topology/operator_connection.py +++ b/src/ansys/dpf/core/workflow_topology/operator_connection.py @@ -29,6 +29,7 @@ """ from typing import Iterator, Optional + from ansys.dpf.core import GenericDataContainersCollection from ansys.dpf.core.custom_container_base import CustomContainerBase from ansys.dpf.core.dpf_operator import Operator diff --git a/src/ansys/dpf/core/workflow_topology/workflow_topology.py b/src/ansys/dpf/core/workflow_topology/workflow_topology.py index e1bb6892ac..18268c325f 100644 --- a/src/ansys/dpf/core/workflow_topology/workflow_topology.py +++ b/src/ansys/dpf/core/workflow_topology/workflow_topology.py @@ -29,6 +29,7 @@ """ from typing import Optional + from ansys.dpf.core import OperatorsCollection from ansys.dpf.core.custom_container_base import CustomContainerBase from ansys.dpf.core.generic_data_container import GenericDataContainer diff --git a/src/ansys/dpf/gate/collection_grpcapi.py b/src/ansys/dpf/gate/collection_grpcapi.py index 3a717c1399..ed94af7e2d 100644 --- a/src/ansys/dpf/gate/collection_grpcapi.py +++ b/src/ansys/dpf/gate/collection_grpcapi.py @@ -21,7 +21,7 @@ class CollectionGRPCAPI(collection_abstract_api.CollectionAbstractAPI): @staticmethod def init_collection_environment(object): - from ansys.grpc.dpf import collection_pb2, collection_pb2_grpc + from ansys.grpc.dpf import collection_message_pb2, collection_pb2_grpc if not hasattr(object, "_server"): server = object elif isinstance(object._server, weakref.ref): @@ -32,7 +32,7 @@ def init_collection_environment(object): CollectionGRPCAPI.STUBNAME, collection_pb2_grpc.CollectionServiceStub) object._deleter_func = ( - _get_stub(server).Delete, lambda obj: obj._internal_obj if isinstance(obj, collection_pb2.Collection) else None) + _get_stub(server).Delete, lambda obj: obj._internal_obj if isinstance(obj, collection_message_pb2.Collection) else None) @staticmethod def collection_of_scoping_new_on_client(client): diff --git a/src/ansys/dpf/gate/data_processing_grpcapi.py b/src/ansys/dpf/gate/data_processing_grpcapi.py index 28c40fcac7..ae5d0be598 100644 --- a/src/ansys/dpf/gate/data_processing_grpcapi.py +++ b/src/ansys/dpf/gate/data_processing_grpcapi.py @@ -210,7 +210,7 @@ def data_processing_get_server_version_on_client(client, major, minor): @staticmethod def data_processing_description_string(data): data_obj = data._internal_obj - from ansys.grpc.dpf import base_pb2, collection_pb2 + from ansys.grpc.dpf import base_pb2, collection_message_pb2 request = base_pb2.DescribeRequest() if isinstance(data_obj.id, int): request.dpf_type_id = data_obj.id @@ -224,7 +224,7 @@ def data_processing_description_string(data): client = serv_to_test.client else: return "" - if isinstance(data_obj, collection_pb2.Collection): + if isinstance(data_obj, collection_message_pb2.Collection): from ansys.dpf.gate import collection_grpcapi collection_grpcapi.CollectionGRPCAPI.init_collection_environment(data) response = collection_grpcapi._get_stub(data._server.client).Describe(request) diff --git a/src/ansys/dpf/gate/generated/any_abstract_api.py b/src/ansys/dpf/gate/generated/any_abstract_api.py index 752f374dc8..721e9346e4 100644 --- a/src/ansys/dpf/gate/generated/any_abstract_api.py +++ b/src/ansys/dpf/gate/generated/any_abstract_api.py @@ -131,6 +131,10 @@ def any_get_as_custom_type_fields_container(any): def any_get_as_custom_type_field(any): raise NotImplementedError + @staticmethod + def any_get_as_support(any): + raise NotImplementedError + @staticmethod def any_make_obj_as_any(dpf_object): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/any_capi.py b/src/ansys/dpf/gate/generated/any_capi.py index f04345d448..8beed87a4f 100644 --- a/src/ansys/dpf/gate/generated/any_capi.py +++ b/src/ansys/dpf/gate/generated/any_capi.py @@ -293,6 +293,15 @@ def any_get_as_custom_type_field(any): raise errors.DPFServerException(sError.value) return res + @staticmethod + def any_get_as_support(any): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Any_getAs_Support(any._internal_obj if any is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def any_make_obj_as_any(dpf_object): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/capi.py b/src/ansys/dpf/gate/generated/capi.py index ba00de0514..6559ff4fae 100644 --- a/src/ansys/dpf/gate/generated/capi.py +++ b/src/ansys/dpf/gate/generated/capi.py @@ -140,6 +140,10 @@ def load_api(path): dll.Any_getAs_CustomTypeField.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Any_getAs_CustomTypeField.restype = ctypes.c_void_p + if hasattr(dll, "Any_getAs_Support"): + dll.Any_getAs_Support.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Any_getAs_Support.restype = ctypes.c_void_p + if hasattr(dll, "Any_makeObj_asAny"): dll.Any_makeObj_asAny.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Any_makeObj_asAny.restype = ctypes.c_void_p @@ -306,6 +310,10 @@ def load_api(path): dll.Collection_OfStringNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_OfStringNew.restype = ctypes.c_void_p + if hasattr(dll, "Collection_OfCharNew"): + dll.Collection_OfCharNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfCharNew.restype = ctypes.c_void_p + if hasattr(dll, "Collection_GetDataAsInt"): dll.Collection_GetDataAsInt.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_GetDataAsInt.restype = ctypes.POINTER(ctypes.c_int32) @@ -314,6 +322,10 @@ def load_api(path): dll.Collection_GetDataAsDouble.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_GetDataAsDouble.restype = ctypes.POINTER(ctypes.c_double) + if hasattr(dll, "Collection_GetDataAsChar"): + dll.Collection_GetDataAsChar.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_GetDataAsChar.restype = ctypes.POINTER(ctypes.c_char) + if hasattr(dll, "Collection_AddIntEntry"): dll.Collection_AddIntEntry.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_AddIntEntry.restype = None @@ -386,6 +398,26 @@ def load_api(path): dll.Collection_OfAnyNew.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_OfAnyNew.restype = ctypes.c_void_p + if hasattr(dll, "Collection_OfScopingNewWithData"): + dll.Collection_OfScopingNewWithData.argtypes = (ctypes.POINTER(ctypes.c_void_p), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfScopingNewWithData.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfFieldNewWithData"): + dll.Collection_OfFieldNewWithData.argtypes = (ctypes.POINTER(ctypes.c_void_p), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfFieldNewWithData.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfMeshNewWithData"): + dll.Collection_OfMeshNewWithData.argtypes = (ctypes.POINTER(ctypes.c_void_p), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfMeshNewWithData.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfCustomTypeFieldNewWithData"): + dll.Collection_OfCustomTypeFieldNewWithData.argtypes = (ctypes.POINTER(ctypes.c_void_p), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfCustomTypeFieldNewWithData.restype = ctypes.c_void_p + + if hasattr(dll, "Collection_OfAnyNewWithData"): + dll.Collection_OfAnyNewWithData.argtypes = (ctypes.POINTER(ctypes.c_void_p), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_int32)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Collection_OfAnyNewWithData.restype = ctypes.c_void_p + if hasattr(dll, "Collection_GetNumLabels"): dll.Collection_GetNumLabels.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Collection_GetNumLabels.restype = ctypes.c_int32 @@ -743,6 +775,10 @@ def load_api(path): dll.DataProcessing_deserialize.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.DataProcessing_deserialize.restype = ctypes.c_void_p + if hasattr(dll, "DataProcessing_deserializeMany"): + dll.DataProcessing_deserializeMany.argtypes = (ctypes.POINTER(ctypes.c_char), ctypes.c_size_t, ctypes.POINTER(ctypes.c_size_t), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_deserializeMany.restype = ctypes.POINTER(ctypes.c_void_p) + if hasattr(dll, "DataProcessing_getGlobalConfigAsDataTree"): dll.DataProcessing_getGlobalConfigAsDataTree.argtypes = (ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.DataProcessing_getGlobalConfigAsDataTree.restype = ctypes.c_void_p @@ -891,6 +927,10 @@ def load_api(path): dll.DataProcessing_create_param_tree_on_client.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.DataProcessing_create_param_tree_on_client.restype = ctypes.c_void_p + if hasattr(dll, "DataProcessing_create_from_on_client"): + dll.DataProcessing_create_from_on_client.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.DataProcessing_create_from_on_client.restype = ctypes.c_void_p + #------------------------------------------------------------------------------- # DataProcessingError #------------------------------------------------------------------------------- @@ -1795,10 +1835,18 @@ def load_api(path): dll.CSField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSField_SetData.restype = None + if hasattr(dll, "CSField_SetDataWithCollection"): + dll.CSField_SetDataWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetDataWithCollection.restype = None + if hasattr(dll, "CSField_SetDataPointer"): dll.CSField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSField_SetDataPointer.restype = None + if hasattr(dll, "CSField_SetDataPointerWithCollection"): + dll.CSField_SetDataPointerWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSField_SetDataPointerWithCollection.restype = None + if hasattr(dll, "CSField_SetEntityData"): dll.CSField_SetEntityData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_double), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSField_SetEntityData.restype = None @@ -3185,6 +3233,14 @@ def load_api(path): dll.CSPropertyField_SetData.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_SetData.restype = None + if hasattr(dll, "CSPropertyField_SetDataWithCollection"): + dll.CSPropertyField_SetDataWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetDataWithCollection.restype = None + + if hasattr(dll, "CSPropertyField_SetDataPointerWithCollection"): + dll.CSPropertyField_SetDataPointerWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSPropertyField_SetDataPointerWithCollection.restype = None + if hasattr(dll, "CSPropertyField_SetDataPointer"): dll.CSPropertyField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSPropertyField_SetDataPointer.restype = None @@ -3628,6 +3684,10 @@ def load_api(path): dll.Scoping_SetIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Scoping_SetIds.restype = None + if hasattr(dll, "Scoping_SetIdsWithCollection"): + dll.Scoping_SetIdsWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.Scoping_SetIdsWithCollection.restype = None + if hasattr(dll, "Scoping_GetIds"): dll.Scoping_GetIds.argtypes = (ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.Scoping_GetIds.restype = ctypes.POINTER(ctypes.c_int32) @@ -3935,6 +3995,10 @@ def load_api(path): dll.CSStringField_SetCScoping.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSStringField_SetCScoping.restype = None + if hasattr(dll, "CSStringField_SetDataPointer"): + dll.CSStringField_SetDataPointer.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSStringField_SetDataPointer.restype = None + if hasattr(dll, "CSStringField_PushBack"): dll.CSStringField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.POINTER(ctypes.c_char)), ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSStringField_PushBack.restype = None @@ -4034,6 +4098,14 @@ def load_api(path): dll.CSCustomTypeField_PushBack.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSCustomTypeField_PushBack.restype = None + if hasattr(dll, "CSCustomTypeField_SetDataWithCollection"): + dll.CSCustomTypeField_SetDataWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetDataWithCollection.restype = None + + if hasattr(dll, "CSCustomTypeField_SetDataPointerWithCollection"): + dll.CSCustomTypeField_SetDataPointerWithCollection.argtypes = (ctypes.c_void_p, ctypes.c_void_p, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) + dll.CSCustomTypeField_SetDataPointerWithCollection.restype = None + if hasattr(dll, "CSCustomTypeField_Resize"): dll.CSCustomTypeField_Resize.argtypes = (ctypes.c_void_p, ctypes.c_int32, ctypes.c_int32, ctypes.POINTER(ctypes.c_int32), ctypes.POINTER(ctypes.c_wchar_p), ) dll.CSCustomTypeField_Resize.restype = None diff --git a/src/ansys/dpf/gate/generated/collection_abstract_api.py b/src/ansys/dpf/gate/generated/collection_abstract_api.py index d3b10a6c89..2d0804ab00 100644 --- a/src/ansys/dpf/gate/generated/collection_abstract_api.py +++ b/src/ansys/dpf/gate/generated/collection_abstract_api.py @@ -23,6 +23,10 @@ def collection_of_double_new(): def collection_of_string_new(): raise NotImplementedError + @staticmethod + def collection_of_char_new(): + raise NotImplementedError + @staticmethod def collection_get_data_as_int(collection, size): raise NotImplementedError @@ -31,6 +35,10 @@ def collection_get_data_as_int(collection, size): def collection_get_data_as_double(collection, size): raise NotImplementedError + @staticmethod + def collection_get_data_as_char(collection, size): + raise NotImplementedError + @staticmethod def collection_add_int_entry(collection, obj): raise NotImplementedError @@ -103,6 +111,26 @@ def collection_of_custom_type_field_new(): def collection_of_any_new(): raise NotImplementedError + @staticmethod + def collection_of_scoping_new_with_data(data, num_ids, labels, num_labels, ids): + raise NotImplementedError + + @staticmethod + def collection_of_field_new_with_data(data, num_ids, labels, num_labels, ids): + raise NotImplementedError + + @staticmethod + def collection_of_mesh_new_with_data(data, num_ids, labels, num_labels, ids): + raise NotImplementedError + + @staticmethod + def collection_of_custom_type_field_new_with_data(data, num_ids, labels, num_labels, ids): + raise NotImplementedError + + @staticmethod + def collection_of_any_new_with_data(data, num_ids, labels, num_labels, ids): + raise NotImplementedError + @staticmethod def collection_get_num_labels(collection): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/collection_capi.py b/src/ansys/dpf/gate/generated/collection_capi.py index 7c4823c5a5..55da9adbbc 100644 --- a/src/ansys/dpf/gate/generated/collection_capi.py +++ b/src/ansys/dpf/gate/generated/collection_capi.py @@ -44,6 +44,15 @@ def collection_of_string_new(): raise errors.DPFServerException(sError.value) return res + @staticmethod + def collection_of_char_new(): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfCharNew(ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def collection_get_data_as_int(collection, size): errorSize = ctypes.c_int(0) @@ -62,6 +71,17 @@ def collection_get_data_as_double(collection, size): raise errors.DPFServerException(sError.value) return res + @staticmethod + def collection_get_data_as_char(collection, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_GetDataAsChar(collection._internal_obj if collection is not None else None, ctypes.byref(utils.to_int32(size)), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + newres = ctypes.cast(res, ctypes.c_char_p).value.decode("utf-8") if res else None + capi.dll.DataProcessing_String_post_event(res, ctypes.byref(errorSize), ctypes.byref(sError)) + return newres + @staticmethod def collection_add_int_entry(collection, obj): errorSize = ctypes.c_int(0) @@ -226,6 +246,51 @@ def collection_of_any_new(): raise errors.DPFServerException(sError.value) return res + @staticmethod + def collection_of_scoping_new_with_data(data, num_ids, labels, num_labels, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfScopingNewWithData(data, utils.to_int32(num_ids), utils.to_char_ptr_ptr(labels), utils.to_int32(num_labels), utils.to_int32_ptr_ptr(ids), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_field_new_with_data(data, num_ids, labels, num_labels, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfFieldNewWithData(data, utils.to_int32(num_ids), utils.to_char_ptr_ptr(labels), utils.to_int32(num_labels), utils.to_int32_ptr_ptr(ids), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_mesh_new_with_data(data, num_ids, labels, num_labels, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfMeshNewWithData(data, utils.to_int32(num_ids), utils.to_char_ptr_ptr(labels), utils.to_int32(num_labels), utils.to_int32_ptr_ptr(ids), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_custom_type_field_new_with_data(data, num_ids, labels, num_labels, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfCustomTypeFieldNewWithData(data, utils.to_int32(num_ids), utils.to_char_ptr_ptr(labels), utils.to_int32(num_labels), utils.to_int32_ptr_ptr(ids), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def collection_of_any_new_with_data(data, num_ids, labels, num_labels, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Collection_OfAnyNewWithData(data, utils.to_int32(num_ids), utils.to_char_ptr_ptr(labels), utils.to_int32(num_labels), utils.to_int32_ptr_ptr(ids), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def collection_get_num_labels(collection): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py b/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py index 6c23a3d69d..349f2a191b 100644 --- a/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py +++ b/src/ansys/dpf/gate/generated/custom_type_field_abstract_api.py @@ -71,6 +71,14 @@ def cscustom_type_field_set_cscoping(field, scoping): def cscustom_type_field_push_back(field, EntityId, size, data): raise NotImplementedError + @staticmethod + def cscustom_type_field_set_data_with_collection(field, data): + raise NotImplementedError + + @staticmethod + def cscustom_type_field_set_data_pointer_with_collection(field, data): + raise NotImplementedError + @staticmethod def cscustom_type_field_resize(field, dataSize, scopingSize): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/custom_type_field_capi.py b/src/ansys/dpf/gate/generated/custom_type_field_capi.py index 091aa46fcb..d9f72cc611 100644 --- a/src/ansys/dpf/gate/generated/custom_type_field_capi.py +++ b/src/ansys/dpf/gate/generated/custom_type_field_capi.py @@ -152,6 +152,24 @@ def cscustom_type_field_push_back(field, EntityId, size, data): raise errors.DPFServerException(sError.value) return res + @staticmethod + def cscustom_type_field_set_data_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetDataWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def cscustom_type_field_set_data_pointer_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSCustomTypeField_SetDataPointerWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def cscustom_type_field_resize(field, dataSize, scopingSize): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/data_processing_abstract_api.py b/src/ansys/dpf/gate/generated/data_processing_abstract_api.py index 03c20b603f..0dfeac5af9 100644 --- a/src/ansys/dpf/gate/generated/data_processing_abstract_api.py +++ b/src/ansys/dpf/gate/generated/data_processing_abstract_api.py @@ -115,6 +115,10 @@ def data_processing_serialize(obj): def data_processing_deserialize(data, dataSize): raise NotImplementedError + @staticmethod + def data_processing_deserialize_many(str, strSize, size): + raise NotImplementedError + @staticmethod def data_processing_get_global_config_as_data_tree(): raise NotImplementedError @@ -263,3 +267,7 @@ def data_processing_process_id_on_client(client): def data_processing_create_param_tree_on_client(client): raise NotImplementedError + @staticmethod + def data_processing_create_from_on_client(client, base): + raise NotImplementedError + diff --git a/src/ansys/dpf/gate/generated/data_processing_capi.py b/src/ansys/dpf/gate/generated/data_processing_capi.py index 468f6a982f..91ba055d7b 100644 --- a/src/ansys/dpf/gate/generated/data_processing_capi.py +++ b/src/ansys/dpf/gate/generated/data_processing_capi.py @@ -238,6 +238,15 @@ def data_processing_deserialize(data, dataSize): raise errors.DPFServerException(sError.value) return res + @staticmethod + def data_processing_deserialize_many(str, strSize, size): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_deserializeMany(utils.to_char_ptr(str), strSize, size, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def data_processing_get_global_config_as_data_tree(): errorSize = ctypes.c_int(0) @@ -569,3 +578,12 @@ def data_processing_create_param_tree_on_client(client): raise errors.DPFServerException(sError.value) return res + @staticmethod + def data_processing_create_from_on_client(client, base): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.DataProcessing_create_from_on_client(client._internal_obj if client is not None else None, base._internal_obj if base is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + diff --git a/src/ansys/dpf/gate/generated/field_abstract_api.py b/src/ansys/dpf/gate/generated/field_abstract_api.py index ae7d34f962..7d54c3346f 100644 --- a/src/ansys/dpf/gate/generated/field_abstract_api.py +++ b/src/ansys/dpf/gate/generated/field_abstract_api.py @@ -95,10 +95,18 @@ def csfield_get_data(field, size): def csfield_set_data(field, size, data): raise NotImplementedError + @staticmethod + def csfield_set_data_with_collection(field, data): + raise NotImplementedError + @staticmethod def csfield_set_data_pointer(field, size, data): raise NotImplementedError + @staticmethod + def csfield_set_data_pointer_with_collection(field, data): + raise NotImplementedError + @staticmethod def csfield_set_entity_data(field, index, id, size, data): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/field_capi.py b/src/ansys/dpf/gate/generated/field_capi.py index 1da7125b3b..82e8d65782 100644 --- a/src/ansys/dpf/gate/generated/field_capi.py +++ b/src/ansys/dpf/gate/generated/field_capi.py @@ -210,6 +210,15 @@ def csfield_set_data(field, size, data): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csfield_set_data_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetDataWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csfield_set_data_pointer(field, size, data): errorSize = ctypes.c_int(0) @@ -219,6 +228,15 @@ def csfield_set_data_pointer(field, size, data): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csfield_set_data_pointer_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSField_SetDataPointerWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csfield_set_entity_data(field, index, id, size, data): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/field_definition_capi.py b/src/ansys/dpf/gate/generated/field_definition_capi.py index 7a4a8a66da..97ef4bae29 100644 --- a/src/ansys/dpf/gate/generated/field_definition_capi.py +++ b/src/ansys/dpf/gate/generated/field_definition_capi.py @@ -351,4 +351,5 @@ def dimensionality_get_num_comp_for_object(api_to_use, nature, size, vsize): res = capi.dll.Dimensionality_GetNumComp_for_object(api_to_use._internal_obj if api_to_use is not None else None, utils.to_int32(nature), utils.to_int32_ptr(size), utils.to_int32(vsize), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) if errorSize.value != 0: raise errors.DPFServerException(sError.value) - return res \ No newline at end of file + return res + diff --git a/src/ansys/dpf/gate/generated/property_field_abstract_api.py b/src/ansys/dpf/gate/generated/property_field_abstract_api.py index 9b7f11c2f5..f883af1cf3 100644 --- a/src/ansys/dpf/gate/generated/property_field_abstract_api.py +++ b/src/ansys/dpf/gate/generated/property_field_abstract_api.py @@ -95,6 +95,14 @@ def csproperty_field_push_back(field, EntityId, size, data): def csproperty_field_set_data(field, size, data): raise NotImplementedError + @staticmethod + def csproperty_field_set_data_with_collection(field, data): + raise NotImplementedError + + @staticmethod + def csproperty_field_set_data_pointer_with_collection(field, data): + raise NotImplementedError + @staticmethod def csproperty_field_set_data_pointer(field, size, data): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/property_field_capi.py b/src/ansys/dpf/gate/generated/property_field_capi.py index 0dadcc306b..fcc7eb4fd1 100644 --- a/src/ansys/dpf/gate/generated/property_field_capi.py +++ b/src/ansys/dpf/gate/generated/property_field_capi.py @@ -208,6 +208,24 @@ def csproperty_field_set_data(field, size, data): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csproperty_field_set_data_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetDataWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + + @staticmethod + def csproperty_field_set_data_pointer_with_collection(field, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSPropertyField_SetDataPointerWithCollection(field._internal_obj if field is not None else None, data._internal_obj if data is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csproperty_field_set_data_pointer(field, size, data): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/scoping_abstract_api.py b/src/ansys/dpf/gate/generated/scoping_abstract_api.py index a10b1d3569..aba4018dc9 100644 --- a/src/ansys/dpf/gate/generated/scoping_abstract_api.py +++ b/src/ansys/dpf/gate/generated/scoping_abstract_api.py @@ -35,6 +35,10 @@ def scoping_get_data(scoping, location, size): def scoping_set_ids(scoping, ids, size): raise NotImplementedError + @staticmethod + def scoping_set_ids_with_collection(scoping, ids): + raise NotImplementedError + @staticmethod def scoping_get_ids(scoping, size): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/scoping_capi.py b/src/ansys/dpf/gate/generated/scoping_capi.py index e77679b45c..146b290c94 100644 --- a/src/ansys/dpf/gate/generated/scoping_capi.py +++ b/src/ansys/dpf/gate/generated/scoping_capi.py @@ -71,6 +71,15 @@ def scoping_set_ids(scoping, ids, size): raise errors.DPFServerException(sError.value) return res + @staticmethod + def scoping_set_ids_with_collection(scoping, ids): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.Scoping_SetIdsWithCollection(scoping._internal_obj if scoping is not None else None, ids._internal_obj if ids is not None else None, ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def scoping_get_ids(scoping, size): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gate/generated/string_field_abstract_api.py b/src/ansys/dpf/gate/generated/string_field_abstract_api.py index 93ad33970a..09af2ded76 100644 --- a/src/ansys/dpf/gate/generated/string_field_abstract_api.py +++ b/src/ansys/dpf/gate/generated/string_field_abstract_api.py @@ -87,6 +87,10 @@ def csstring_field_set_data_with_size(field, size, data, sizes): def csstring_field_set_cscoping(field, scoping): raise NotImplementedError + @staticmethod + def csstring_field_set_data_pointer(field, size, data): + raise NotImplementedError + @staticmethod def csstring_field_push_back(field, EntityId, size, data): raise NotImplementedError diff --git a/src/ansys/dpf/gate/generated/string_field_capi.py b/src/ansys/dpf/gate/generated/string_field_capi.py index 6c0b97ee1f..6dca80bf71 100644 --- a/src/ansys/dpf/gate/generated/string_field_capi.py +++ b/src/ansys/dpf/gate/generated/string_field_capi.py @@ -190,6 +190,15 @@ def csstring_field_set_cscoping(field, scoping): raise errors.DPFServerException(sError.value) return res + @staticmethod + def csstring_field_set_data_pointer(field, size, data): + errorSize = ctypes.c_int(0) + sError = ctypes.c_wchar_p() + res = capi.dll.CSStringField_SetDataPointer(field._internal_obj if field is not None else None, utils.to_int32(size), utils.to_int32_ptr(data), ctypes.byref(utils.to_int32(errorSize)), ctypes.byref(sError)) + if errorSize.value != 0: + raise errors.DPFServerException(sError.value) + return res + @staticmethod def csstring_field_push_back(field, EntityId, size, data): errorSize = ctypes.c_int(0) diff --git a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll index 1642ab0bc3..351706628d 100644 Binary files a/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll and b/src/ansys/dpf/gatebin/Ans.Dpf.GrpcClient.dll differ diff --git a/src/ansys/dpf/gatebin/DPFClientAPI.dll b/src/ansys/dpf/gatebin/DPFClientAPI.dll index a24b49b1f0..76202e0745 100644 Binary files a/src/ansys/dpf/gatebin/DPFClientAPI.dll and b/src/ansys/dpf/gatebin/DPFClientAPI.dll differ diff --git a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so index e9180db793..2bfc9c5d31 100644 Binary files a/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so and b/src/ansys/dpf/gatebin/libAns.Dpf.GrpcClient.so differ diff --git a/src/ansys/dpf/gatebin/libDPFClientAPI.so b/src/ansys/dpf/gatebin/libDPFClientAPI.so index 63de951a04..e05fe79303 100644 Binary files a/src/ansys/dpf/gatebin/libDPFClientAPI.so and b/src/ansys/dpf/gatebin/libDPFClientAPI.so differ diff --git a/src/ansys/grpc/dpf/base_pb2.py b/src/ansys/grpc/dpf/base_pb2.py index 602a5d2e18..92e59e094c 100644 --- a/src/ansys/grpc/dpf/base_pb2.py +++ b/src/ansys/grpc/dpf/base_pb2.py @@ -14,7 +14,7 @@ -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbase.proto\x12\x15\x61nsys.api.dpf.base.v0\"\x07\n\x05\x45mpty\"6\n\x10\x45ntityIdentifier\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\x0eserver_address\x18\x02 \x01(\t\"\"\n\x0c\x44oubleVector\x12\x12\n\nrep_double\x18\x01 \x03(\x01\" \n\x0b\x46loatVector\x12\x11\n\trep_float\x18\x01 \x03(\x02\"\x1c\n\tIntVector\x12\x0f\n\x07rep_int\x18\x01 \x03(\x05\"\x1f\n\nByteVector\x12\x11\n\trep_bytes\x18\x01 \x01(\x0c\"\x1a\n\x08PBString\x12\x0e\n\x06string\x18\x01 \x01(\t\"\"\n\x0cStringVector\x12\x12\n\nrep_string\x18\x01 \x03(\t\"4\n\x03Ids\x12-\n\x03ids\x18\x01 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVector\"\x1c\n\x08Location\x12\x10\n\x08location\x18\x01 \x01(\t\"\x1e\n\rCountResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\"\x16\n\x05\x41rray\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"V\n\rPluginRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x64llPath\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x16\n\x0egenerate_files\x18\x04 \x01(\x08\"\x13\n\x11ServerInfoRequest\"\xef\x01\n\x12ServerInfoResponse\x12\x14\n\x0cmajorVersion\x18\x01 \x01(\x05\x12\x14\n\x0cminorVersion\x18\x02 \x01(\x05\x12\x11\n\tprocessId\x18\x03 \x01(\x04\x12\n\n\x02ip\x18\x04 \x01(\t\x12\x0c\n\x04port\x18\x05 \x01(\x05\x12M\n\nproperties\x18\x06 \x03(\x0b\x32\x39.ansys.api.dpf.base.v0.ServerInfoResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"&\n\x0f\x44\x65scribeRequest\x12\x13\n\x0b\x64pf_type_id\x18\x01 \x01(\x05\"M\n\rDeleteRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"S\n\x13\x44uplicateRefRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\'\n\x10\x44\x65scribeResponse\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\"D\n\x15\x44\x65scribeArrayResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"X\n\x14\x44uplicateRefResponse\x12@\n\x0fnew_dpf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"2\n\x08\x46ileData\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x18\n\x10server_file_path\x18\x02 \x01(\t\"/\n\x13\x44ownloadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"E\n\x14\x44ownloadFileResponse\x12-\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\"r\n\x11UploadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\x12\x14\n\x0cuse_temp_dir\x18\x02 \x01(\x08\x12-\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\".\n\x12UploadFileResponse\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"G\n\x10SerializeRequest\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\"\n\x11SerializeResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"c\n\x0e\x43onfigResponse\x12Q\n runtime_core_config_data_tree_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\">\n\x05\x45rror\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x12\n\nerror_code\x18\x02 \x01(\x05\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\xac\x01\n\x15InitializationRequest\x12\x0f\n\x07\x63ontext\x18\x01 \x01(\x05\x12\x0b\n\x03xml\x18\x02 \x01(\t\x12\x14\n\x0c\x66orce_reinit\x18\x03 \x01(\x08\x12\x18\n\x0b\x61pi_version\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x0flicense_context\x18\x05 \x01(\x05\x12\x1c\n\x14\x65rror_on_plugin_load\x18\x06 \x01(\x05\x42\x0e\n\x0c_api_version\"E\n\x16InitializationResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Error*U\n\x0b\x43ountEntity\x12\x11\n\rNUM_COMPONENT\x10\x00\x12\x17\n\x13NUM_ELEMENTARY_DATA\x10\x01\x12\x0c\n\x08NUM_SETS\x10\x02\x12\x0c\n\x08NUM_DATA\x10\x03*\"\n\x07\x43omplex\x12\x08\n\x04REAL\x10\x00\x12\r\n\tIMAGINARY\x10\x01*;\n\x06Nature\x12\n\n\x06SCALAR\x10\x00\x12\n\n\x06VECTOR\x10\x01\x12\n\n\x06MATRIX\x10\x02\x12\r\n\tSYMMATRIX\x10\x05*\x8a\x03\n\x04Type\x12\n\n\x06STRING\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\t\n\x05\x46IELD\x10\x04\x12\x0e\n\nCOLLECTION\x10\x05\x12\x0b\n\x07SCOPING\x10\x06\x12\x10\n\x0c\x44\x41TA_SOURCES\x10\x07\x12\x11\n\rMESHED_REGION\x10\x08\x12\x15\n\x11TIME_FREQ_SUPPORT\x10\t\x12\x0f\n\x0bRESULT_INFO\x10\n\x12\x12\n\x0e\x43YCLIC_SUPPORT\x10\x0b\x12\x12\n\x0ePROPERTY_FIELD\x10\x0c\x12\x0c\n\x08WORKFLOW\x10\r\x12\x07\n\x03RUN\x10\x0e\x12\x07\n\x03\x41NY\x10\x0f\x12\x0b\n\x07VEC_INT\x10\x10\x12\x0e\n\nVEC_DOUBLE\x10\x11\x12\x0b\n\x07SUPPORT\x10\x12\x12\x0c\n\x08OPERATOR\x10\x13\x12\r\n\tDATA_TREE\x10\x14\x12\x0e\n\nVEC_STRING\x10\x15\x12\x10\n\x0cSTRING_FIELD\x10\x16\x12\x15\n\x11\x43USTOM_TYPE_FIELD\x10\x17\x12\x1a\n\x16GENERIC_DATA_CONTAINER\x10\x18\x32\xa3\n\n\x0b\x42\x61seService\x12i\n\nInitialize\x12,.ansys.api.dpf.base.v0.InitializationRequest\x1a-.ansys.api.dpf.base.v0.InitializationResponse\x12\x64\n\rGetServerInfo\x12(.ansys.api.dpf.base.v0.ServerInfoRequest\x1a).ansys.api.dpf.base.v0.ServerInfoResponse\x12P\n\tGetConfig\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a%.ansys.api.dpf.base.v0.ConfigResponse\x12J\n\x04Load\x12$.ansys.api.dpf.base.v0.PluginRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12j\n\x10\x44\x65scribeStreamed\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a,.ansys.api.dpf.base.v0.DescribeArrayResponse0\x01\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.base.v0.DeleteRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\tSerialize\x12\'.ansys.api.dpf.base.v0.SerializeRequest\x1a(.ansys.api.dpf.base.v0.SerializeResponse0\x01\x12g\n\x0c\x44uplicateRef\x12*.ansys.api.dpf.base.v0.DuplicateRefRequest\x1a+.ansys.api.dpf.base.v0.DuplicateRefResponse\x12W\n\x0c\x43reateTmpDir\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a).ansys.api.dpf.base.v0.UploadFileResponse\x12i\n\x0c\x44ownloadFile\x12*.ansys.api.dpf.base.v0.DownloadFileRequest\x1a+.ansys.api.dpf.base.v0.DownloadFileResponse0\x01\x12\x63\n\nUploadFile\x12(.ansys.api.dpf.base.v0.UploadFileRequest\x1a).ansys.api.dpf.base.v0.UploadFileResponse(\x01\x12M\n\x0fPrepareShutdown\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12K\n\rReleaseServer\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x18\xaa\x02\x15\x41nsys.Api.Dpf.Base.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\nbase.proto\x12\x15\x61nsys.api.dpf.base.v0\"\x07\n\x05\x45mpty\"6\n\x10\x45ntityIdentifier\x12\n\n\x02id\x18\x01 \x01(\x05\x12\x16\n\x0eserver_address\x18\x02 \x01(\t\"\"\n\x0c\x44oubleVector\x12\x12\n\nrep_double\x18\x01 \x03(\x01\" \n\x0b\x46loatVector\x12\x11\n\trep_float\x18\x01 \x03(\x02\"\x1c\n\tIntVector\x12\x0f\n\x07rep_int\x18\x01 \x03(\x05\"\x1f\n\nByteVector\x12\x11\n\trep_bytes\x18\x01 \x01(\x0c\"\x1a\n\x08PBString\x12\x0e\n\x06string\x18\x01 \x01(\t\"\"\n\x0cStringVector\x12\x12\n\nrep_string\x18\x01 \x03(\t\"4\n\x03Ids\x12-\n\x03ids\x18\x01 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVector\"\x1c\n\x08Location\x12\x10\n\x08location\x18\x01 \x01(\t\"\x1e\n\rCountResponse\x12\r\n\x05\x63ount\x18\x01 \x01(\x05\"\x16\n\x05\x41rray\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"V\n\rPluginRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x64llPath\x18\x02 \x01(\t\x12\x0e\n\x06symbol\x18\x03 \x01(\t\x12\x16\n\x0egenerate_files\x18\x04 \x01(\x08\"\x13\n\x11ServerInfoRequest\"\xef\x01\n\x12ServerInfoResponse\x12\x14\n\x0cmajorVersion\x18\x01 \x01(\x05\x12\x14\n\x0cminorVersion\x18\x02 \x01(\x05\x12\x11\n\tprocessId\x18\x03 \x01(\x04\x12\n\n\x02ip\x18\x04 \x01(\t\x12\x0c\n\x04port\x18\x05 \x01(\x05\x12M\n\nproperties\x18\x06 \x03(\x0b\x32\x39.ansys.api.dpf.base.v0.ServerInfoResponse.PropertiesEntry\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"&\n\x0f\x44\x65scribeRequest\x12\x13\n\x0b\x64pf_type_id\x18\x01 \x01(\x05\"M\n\rDeleteRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"S\n\x13\x44uplicateRefRequest\x12<\n\x0b\x64pf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\'\n\x10\x44\x65scribeResponse\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\"D\n\x15\x44\x65scribeArrayResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"X\n\x14\x44uplicateRefResponse\x12@\n\x0fnew_dpf_type_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"2\n\x08\x46ileData\x12\x0c\n\x04\x64\x61ta\x18\x01 \x01(\x0c\x12\x18\n\x10server_file_path\x18\x02 \x01(\t\"/\n\x13\x44ownloadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"E\n\x14\x44ownloadFileResponse\x12-\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\"r\n\x11UploadFileRequest\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\x12\x14\n\x0cuse_temp_dir\x18\x02 \x01(\x08\x12-\n\x04\x64\x61ta\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.FileData\".\n\x12UploadFileResponse\x12\x18\n\x10server_file_path\x18\x01 \x01(\t\"G\n\x10SerializeRequest\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\"\n\x11SerializeResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"c\n\x0e\x43onfigResponse\x12Q\n runtime_core_config_data_tree_id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\">\n\x05\x45rror\x12\n\n\x02ok\x18\x01 \x01(\x08\x12\x12\n\nerror_code\x18\x02 \x01(\x05\x12\x15\n\rerror_message\x18\x03 \x01(\t\"\xac\x01\n\x15InitializationRequest\x12\x0f\n\x07\x63ontext\x18\x01 \x01(\x05\x12\x0b\n\x03xml\x18\x02 \x01(\t\x12\x14\n\x0c\x66orce_reinit\x18\x03 \x01(\x08\x12\x18\n\x0b\x61pi_version\x18\x04 \x01(\x05H\x00\x88\x01\x01\x12\x17\n\x0flicense_context\x18\x05 \x01(\x05\x12\x1c\n\x14\x65rror_on_plugin_load\x18\x06 \x01(\x05\x42\x0e\n\x0c_api_version\"E\n\x16InitializationResponse\x12+\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Error*U\n\x0b\x43ountEntity\x12\x11\n\rNUM_COMPONENT\x10\x00\x12\x17\n\x13NUM_ELEMENTARY_DATA\x10\x01\x12\x0c\n\x08NUM_SETS\x10\x02\x12\x0c\n\x08NUM_DATA\x10\x03*\"\n\x07\x43omplex\x12\x08\n\x04REAL\x10\x00\x12\r\n\tIMAGINARY\x10\x01*;\n\x06Nature\x12\n\n\x06SCALAR\x10\x00\x12\n\n\x06VECTOR\x10\x01\x12\n\n\x06MATRIX\x10\x02\x12\r\n\tSYMMATRIX\x10\x05*\x94\x03\n\x04Type\x12\n\n\x06STRING\x10\x00\x12\x07\n\x03INT\x10\x01\x12\n\n\x06\x44OUBLE\x10\x02\x12\x08\n\x04\x42OOL\x10\x03\x12\x08\n\x04\x43HAR\x10\x19\x12\t\n\x05\x46IELD\x10\x04\x12\x0e\n\nCOLLECTION\x10\x05\x12\x0b\n\x07SCOPING\x10\x06\x12\x10\n\x0c\x44\x41TA_SOURCES\x10\x07\x12\x11\n\rMESHED_REGION\x10\x08\x12\x15\n\x11TIME_FREQ_SUPPORT\x10\t\x12\x0f\n\x0bRESULT_INFO\x10\n\x12\x12\n\x0e\x43YCLIC_SUPPORT\x10\x0b\x12\x12\n\x0ePROPERTY_FIELD\x10\x0c\x12\x0c\n\x08WORKFLOW\x10\r\x12\x07\n\x03RUN\x10\x0e\x12\x07\n\x03\x41NY\x10\x0f\x12\x0b\n\x07VEC_INT\x10\x10\x12\x0e\n\nVEC_DOUBLE\x10\x11\x12\x0b\n\x07SUPPORT\x10\x12\x12\x0c\n\x08OPERATOR\x10\x13\x12\r\n\tDATA_TREE\x10\x14\x12\x0e\n\nVEC_STRING\x10\x15\x12\x10\n\x0cSTRING_FIELD\x10\x16\x12\x15\n\x11\x43USTOM_TYPE_FIELD\x10\x17\x12\x1a\n\x16GENERIC_DATA_CONTAINER\x10\x18\x32\xfb\n\n\x0b\x42\x61seService\x12i\n\nInitialize\x12,.ansys.api.dpf.base.v0.InitializationRequest\x1a-.ansys.api.dpf.base.v0.InitializationResponse\x12\x64\n\rGetServerInfo\x12(.ansys.api.dpf.base.v0.ServerInfoRequest\x1a).ansys.api.dpf.base.v0.ServerInfoResponse\x12P\n\tGetConfig\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a%.ansys.api.dpf.base.v0.ConfigResponse\x12J\n\x04Load\x12$.ansys.api.dpf.base.v0.PluginRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12j\n\x10\x44\x65scribeStreamed\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a,.ansys.api.dpf.base.v0.DescribeArrayResponse0\x01\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.base.v0.DeleteRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12V\n\x0e\x44\x65leteStreamed\x12$.ansys.api.dpf.base.v0.DeleteRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12`\n\tSerialize\x12\'.ansys.api.dpf.base.v0.SerializeRequest\x1a(.ansys.api.dpf.base.v0.SerializeResponse0\x01\x12g\n\x0c\x44uplicateRef\x12*.ansys.api.dpf.base.v0.DuplicateRefRequest\x1a+.ansys.api.dpf.base.v0.DuplicateRefResponse\x12W\n\x0c\x43reateTmpDir\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a).ansys.api.dpf.base.v0.UploadFileResponse\x12i\n\x0c\x44ownloadFile\x12*.ansys.api.dpf.base.v0.DownloadFileRequest\x1a+.ansys.api.dpf.base.v0.DownloadFileResponse0\x01\x12\x63\n\nUploadFile\x12(.ansys.api.dpf.base.v0.UploadFileRequest\x1a).ansys.api.dpf.base.v0.UploadFileResponse(\x01\x12M\n\x0fPrepareShutdown\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12K\n\rReleaseServer\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x18\xaa\x02\x15\x41nsys.Api.Dpf.Base.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -31,7 +31,7 @@ _globals['_NATURE']._serialized_start=2174 _globals['_NATURE']._serialized_end=2233 _globals['_TYPE']._serialized_start=2236 - _globals['_TYPE']._serialized_end=2630 + _globals['_TYPE']._serialized_end=2640 _globals['_EMPTY']._serialized_start=37 _globals['_EMPTY']._serialized_end=44 _globals['_ENTITYIDENTIFIER']._serialized_start=46 @@ -98,6 +98,6 @@ _globals['_INITIALIZATIONREQUEST']._serialized_end=1978 _globals['_INITIALIZATIONRESPONSE']._serialized_start=1980 _globals['_INITIALIZATIONRESPONSE']._serialized_end=2049 - _globals['_BASESERVICE']._serialized_start=2633 - _globals['_BASESERVICE']._serialized_end=3948 + _globals['_BASESERVICE']._serialized_start=2643 + _globals['_BASESERVICE']._serialized_end=4046 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/base_pb2_grpc.py b/src/ansys/grpc/dpf/base_pb2_grpc.py index af83f1eeed..18316bae10 100644 --- a/src/ansys/grpc/dpf/base_pb2_grpc.py +++ b/src/ansys/grpc/dpf/base_pb2_grpc.py @@ -49,6 +49,11 @@ def __init__(self, channel): request_serializer=base__pb2.DeleteRequest.SerializeToString, response_deserializer=base__pb2.Empty.FromString, ) + self.DeleteStreamed = channel.stream_unary( + '/ansys.api.dpf.base.v0.BaseService/DeleteStreamed', + request_serializer=base__pb2.DeleteRequest.SerializeToString, + response_deserializer=base__pb2.Empty.FromString, + ) self.Serialize = channel.unary_stream( '/ansys.api.dpf.base.v0.BaseService/Serialize', request_serializer=base__pb2.SerializeRequest.SerializeToString, @@ -134,6 +139,12 @@ def Delete(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def DeleteStreamed(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Serialize(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -221,6 +232,11 @@ def add_BaseServiceServicer_to_server(servicer, server): request_deserializer=base__pb2.DeleteRequest.FromString, response_serializer=base__pb2.Empty.SerializeToString, ), + 'DeleteStreamed': grpc.stream_unary_rpc_method_handler( + servicer.DeleteStreamed, + request_deserializer=base__pb2.DeleteRequest.FromString, + response_serializer=base__pb2.Empty.SerializeToString, + ), 'Serialize': grpc.unary_stream_rpc_method_handler( servicer.Serialize, request_deserializer=base__pb2.SerializeRequest.FromString, @@ -385,6 +401,23 @@ def Delete(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def DeleteStreamed(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_unary(request_iterator, target, '/ansys.api.dpf.base.v0.BaseService/DeleteStreamed', + base__pb2.DeleteRequest.SerializeToString, + base__pb2.Empty.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Serialize(request, target, diff --git a/src/ansys/grpc/dpf/collection_message_pb2.py b/src/ansys/grpc/dpf/collection_message_pb2.py new file mode 100644 index 0000000000..ae21a9d84d --- /dev/null +++ b/src/ansys/grpc/dpf/collection_message_pb2.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Generated by the protocol buffer compiler. DO NOT EDIT! +# source: collection_message.proto +# Protobuf Python Version: 4.25.1 +"""Generated protocol buffer code.""" +from google.protobuf import descriptor as _descriptor +from google.protobuf import descriptor_pool as _descriptor_pool +from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import builder as _builder +# @@protoc_insertion_point(imports) + +_sym_db = _symbol_database.Default() + + +import ansys.grpc.dpf.base_pb2 as base__pb2 + + +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x18\x63ollection_message.proto\x12\x1b\x61nsys.api.dpf.collection.v0\x1a\nbase.proto\"l\n\nCollection\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.Collection.v0b\x06proto3') + +_globals = globals() +_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) +_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'collection_message_pb2', _globals) +if _descriptor._USE_C_DESCRIPTORS == False: + _globals['DESCRIPTOR']._options = None + _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Ansys.Api.Dpf.Collection.v0' + _globals['_COLLECTION']._serialized_start=69 + _globals['_COLLECTION']._serialized_end=177 +# @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/collection_message_pb2_grpc.py b/src/ansys/grpc/dpf/collection_message_pb2_grpc.py new file mode 100644 index 0000000000..2daafffebf --- /dev/null +++ b/src/ansys/grpc/dpf/collection_message_pb2_grpc.py @@ -0,0 +1,4 @@ +# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! +"""Client and server classes corresponding to protobuf-defined services.""" +import grpc + diff --git a/src/ansys/grpc/dpf/collection_pb2.py b/src/ansys/grpc/dpf/collection_pb2.py index 5c7a939baa..265b9c2205 100644 --- a/src/ansys/grpc/dpf/collection_pb2.py +++ b/src/ansys/grpc/dpf/collection_pb2.py @@ -18,9 +18,11 @@ import ansys.grpc.dpf.time_freq_support_pb2 as time__freq__support__pb2 import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 +import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63ollection.proto\x12\x1b\x61nsys.api.dpf.collection.v0\x1a\x19google/protobuf/any.proto\x1a\nbase.proto\x1a\rsupport.proto\x1a\x17time_freq_support.proto\x1a\rscoping.proto\x1a\x11label_space.proto\"l\n\nCollection\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\">\n\x11\x43ollectionRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"%\n\x0c\x44\x65\x66\x61ultValue\x12\x15\n\rdefault_value\x18\x01 \x01(\x05\"[\n\x08NewLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12@\n\rdefault_value\x18\x02 \x01(\x0b\x32).ansys.api.dpf.collection.v0.DefaultValue\"\xa2\x01\n\x13UpdateLabelsRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x35\n\x06labels\x18\x02 \x03(\x0b\x32%.ansys.api.dpf.collection.v0.NewLabel\x12\x17\n\x0foverride_others\x18\x03 \x01(\x08\"\x87\x02\n\rUpdateRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x31\n\x05\x65ntry\x18\x02 \x01(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x12\x18\n\x0b\x63\x61n_replace\x18\x05 \x01(\x08H\x01\x88\x01\x01\x42\n\n\x08locationB\x0e\n\x0c_can_replace\"\xa9\x01\n\x0c\x45ntryRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x42\n\n\x08location\"\xbb\x01\n\x05\x45ntry\x12(\n\x08\x64pf_type\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08int_type\x18\x02 \x01(\x05H\x00\x12\x15\n\x0b\x64ouble_type\x18\x03 \x01(\x01H\x00\x12\x15\n\x0bstring_type\x18\x04 \x01(\tH\x00\x12=\n\x0blabel_space\x18\x05 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceB\x07\n\x05\x65ntry\"I\n\x12GetEntriesResponse\x12\x33\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\"N\n\x19GetEntriesIndicesResponse\x12\x31\n\x07indices\x18\x01 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVector\"\x18\n\x06Labels\x12\x0e\n\x06labels\x18\x01 \x03(\t\"h\n\x0cListResponse\x12\x33\n\x06labels\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.collection.v0.Labels\x12\x15\n\rcount_entries\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\"a\n\x13LabelScopingRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\"P\n\x14LabelScopingResponse\x12\x38\n\rlabel_scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x87\x01\n\x0eSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\r\n\x05label\x18\x03 \x01(\t\"\xfa\x01\n\x14UpdateSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\x12P\n\x11time_freq_support\x18\x03 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x34\n\x07support\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.support.v0.SupportH\x00\x42\x0e\n\x0csupport_type\"P\n\x11GetAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\"b\n\x14UpdateAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"\xf6\x01\n\x17UpdateCollectionRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x65\n\x11string_properties\x18\x02 \x03(\x0b\x32J.ansys.api.dpf.collection.v0.UpdateCollectionRequest.StringPropertiesEntry\x1a\x37\n\x15StringPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"o\n\x11UpdateSizeRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x0c\n\x04size\x18\x02 \x01(\x05\x12\x0f\n\x07reserve\x18\x03 \x01(\x08\x32\xcf\x0b\n\x11\x43ollectionService\x12\x61\n\x06\x43reate\x12..ansys.api.dpf.collection.v0.CollectionRequest\x1a\'.ansys.api.dpf.collection.v0.Collection\x12\\\n\x06Update\x12\x34.ansys.api.dpf.collection.v0.UpdateCollectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12^\n\x0cUpdateLabels\x12\x30.ansys.api.dpf.collection.v0.UpdateLabelsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\x0bUpdateEntry\x12*.ansys.api.dpf.collection.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Z\n\nUpdateSize\x12..ansys.api.dpf.collection.v0.UpdateSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Z\n\x04List\x12\'.ansys.api.dpf.collection.v0.Collection\x1a).ansys.api.dpf.collection.v0.ListResponse\x12h\n\nGetEntries\x12).ansys.api.dpf.collection.v0.EntryRequest\x1a/.ansys.api.dpf.collection.v0.GetEntriesResponse\x12v\n\x11GetEntriesIndices\x12).ansys.api.dpf.collection.v0.EntryRequest\x1a\x36.ansys.api.dpf.collection.v0.GetEntriesIndicesResponse\x12\\\n\nGetSupport\x12+.ansys.api.dpf.collection.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12v\n\x0fGetLabelScoping\x12\x30.ansys.api.dpf.collection.v0.LabelScopingRequest\x1a\x31.ansys.api.dpf.collection.v0.LabelScopingResponse\x12`\n\rUpdateSupport\x12\x31.ansys.api.dpf.collection.v0.UpdateSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\nGetAllData\x12..ansys.api.dpf.collection.v0.GetAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Array0\x01\x12\x62\n\rUpdateAllData\x12\x31.ansys.api.dpf.collection.v0.UpdateAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.collection.v0.Collection\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.Collection.v0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x10\x63ollection.proto\x12\x1b\x61nsys.api.dpf.collection.v0\x1a\x19google/protobuf/any.proto\x1a\nbase.proto\x1a\rsupport.proto\x1a\x17time_freq_support.proto\x1a\rscoping.proto\x1a\x11label_space.proto\x1a\x15\x64pf_any_message.proto\x1a\x18\x63ollection_message.proto\">\n\x11\x43ollectionRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"%\n\x0c\x44\x65\x66\x61ultValue\x12\x15\n\rdefault_value\x18\x01 \x01(\x05\"[\n\x08NewLabel\x12\r\n\x05label\x18\x01 \x01(\t\x12@\n\rdefault_value\x18\x02 \x01(\x0b\x32).ansys.api.dpf.collection.v0.DefaultValue\"\xa2\x01\n\x13UpdateLabelsRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x35\n\x06labels\x18\x02 \x03(\x0b\x32%.ansys.api.dpf.collection.v0.NewLabel\x12\x17\n\x0foverride_others\x18\x03 \x01(\x08\"\x87\x02\n\rUpdateRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x31\n\x05\x65ntry\x18\x02 \x01(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x12\x18\n\x0b\x63\x61n_replace\x18\x05 \x01(\x08H\x01\x88\x01\x01\x42\n\n\x08locationB\x0e\n\x0c_can_replace\"\xa9\x01\n\x0c\x45ntryRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12?\n\x0blabel_space\x18\x03 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x0f\n\x05index\x18\x04 \x01(\x05H\x00\x42\n\n\x08location\"\xbb\x01\n\x05\x45ntry\x12(\n\x08\x64pf_type\x18\x01 \x01(\x0b\x32\x14.google.protobuf.AnyH\x00\x12\x12\n\x08int_type\x18\x02 \x01(\x05H\x00\x12\x15\n\x0b\x64ouble_type\x18\x03 \x01(\x01H\x00\x12\x15\n\x0bstring_type\x18\x04 \x01(\tH\x00\x12=\n\x0blabel_space\x18\x05 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceB\x07\n\x05\x65ntry\"I\n\x12GetEntriesResponse\x12\x33\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\".ansys.api.dpf.collection.v0.Entry\"N\n\x19GetEntriesIndicesResponse\x12\x31\n\x07indices\x18\x01 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVector\"\x18\n\x06Labels\x12\x0e\n\x06labels\x18\x01 \x03(\t\"h\n\x0cListResponse\x12\x33\n\x06labels\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.collection.v0.Labels\x12\x15\n\rcount_entries\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\"a\n\x13LabelScopingRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\"P\n\x14LabelScopingResponse\x12\x38\n\rlabel_scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x87\x01\n\x0eSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\r\n\x05label\x18\x03 \x01(\t\"\xfa\x01\n\x14UpdateSupportRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05label\x18\x02 \x01(\t\x12P\n\x11time_freq_support\x18\x03 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x34\n\x07support\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.support.v0.SupportH\x00\x42\x0e\n\x0csupport_type\"P\n\x11GetAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\"b\n\x14UpdateAllDataRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"\xf6\x01\n\x17UpdateCollectionRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x65\n\x11string_properties\x18\x02 \x03(\x0b\x32J.ansys.api.dpf.collection.v0.UpdateCollectionRequest.StringPropertiesEntry\x1a\x37\n\x15StringPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"o\n\x11UpdateSizeRequest\x12;\n\ncollection\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x0c\n\x04size\x18\x02 \x01(\x05\x12\x0f\n\x07reserve\x18\x03 \x01(\x08\"\xfe\x03\n\x17SingleCollectionAllData\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\\\n\rids_per_label\x18\x02 \x03(\x0b\x32\x45.ansys.api.dpf.collection.v0.SingleCollectionAllData.IdsPerLabelEntry\x12\x64\n\x11support_per_label\x18\x03 \x03(\x0b\x32I.ansys.api.dpf.collection.v0.SingleCollectionAllData.SupportPerLabelEntry\x12\x35\n\x04\x64\x61ta\x18\x04 \x03(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x1a[\n\x10IdsPerLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x36\n\x05value\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection:\x02\x38\x01\x1a`\n\x14SupportPerLabelEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x37\n\x05value\x18\x02 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny:\x02\x38\x01\"j\n\x07\x41llData\x12I\n\x0b\x63ollections\x18\x01 \x03(\x0b\x32\x34.ansys.api.dpf.collection.v0.SingleCollectionAllData\x12\x14\n\x0c\x63oll_indices\x18\x02 \x03(\x04\"_\n\x13IntegralAllDataSize\x12\x18\n\x10\x63ollection_index\x18\x01 \x01(\x04\x12\x1a\n\x12\x63urrent_chunk_size\x18\x02 \x01(\x04\x12\x12\n\ntotal_size\x18\x03 \x01(\x04\"\x8c\x01\n\x0fIntegralAllData\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\x12?\n\x05sizes\x18\x03 \x03(\x0b\x32\x30.ansys.api.dpf.collection.v0.IntegralAllDataSize\"V\n\x16\x43reateWithDataResponse\x12<\n\x0b\x63ollections\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection2\xc1\r\n\x11\x43ollectionService\x12\x61\n\x06\x43reate\x12..ansys.api.dpf.collection.v0.CollectionRequest\x1a\'.ansys.api.dpf.collection.v0.Collection\x12o\n\x0e\x43reateWithData\x12$.ansys.api.dpf.collection.v0.AllData\x1a\x33.ansys.api.dpf.collection.v0.CreateWithDataResponse(\x01\x30\x01\x12\x7f\n\x16\x43reateIntegralWithData\x12,.ansys.api.dpf.collection.v0.IntegralAllData\x1a\x33.ansys.api.dpf.collection.v0.CreateWithDataResponse(\x01\x30\x01\x12\\\n\x06Update\x12\x34.ansys.api.dpf.collection.v0.UpdateCollectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12^\n\x0cUpdateLabels\x12\x30.ansys.api.dpf.collection.v0.UpdateLabelsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\x0bUpdateEntry\x12*.ansys.api.dpf.collection.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Z\n\nUpdateSize\x12..ansys.api.dpf.collection.v0.UpdateSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Z\n\x04List\x12\'.ansys.api.dpf.collection.v0.Collection\x1a).ansys.api.dpf.collection.v0.ListResponse\x12h\n\nGetEntries\x12).ansys.api.dpf.collection.v0.EntryRequest\x1a/.ansys.api.dpf.collection.v0.GetEntriesResponse\x12v\n\x11GetEntriesIndices\x12).ansys.api.dpf.collection.v0.EntryRequest\x1a\x36.ansys.api.dpf.collection.v0.GetEntriesIndicesResponse\x12\\\n\nGetSupport\x12+.ansys.api.dpf.collection.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12v\n\x0fGetLabelScoping\x12\x30.ansys.api.dpf.collection.v0.LabelScopingRequest\x1a\x31.ansys.api.dpf.collection.v0.LabelScopingResponse\x12`\n\rUpdateSupport\x12\x31.ansys.api.dpf.collection.v0.UpdateSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\nGetAllData\x12..ansys.api.dpf.collection.v0.GetAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Array0\x01\x12\x62\n\rUpdateAllData\x12\x31.ansys.api.dpf.collection.v0.UpdateAllDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\x08\x44\x65scribe\x12&.ansys.api.dpf.base.v0.DescribeRequest\x1a\'.ansys.api.dpf.base.v0.DescribeResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.collection.v0.Collection\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1e\xaa\x02\x1b\x41nsys.Api.Dpf.Collection.v0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -30,48 +32,64 @@ _globals['DESCRIPTOR']._serialized_options = b'\252\002\033Ansys.Api.Dpf.Collection.v0' _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._options = None _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._serialized_options = b'8\001' - _globals['_COLLECTION']._serialized_start=162 - _globals['_COLLECTION']._serialized_end=270 - _globals['_COLLECTIONREQUEST']._serialized_start=272 - _globals['_COLLECTIONREQUEST']._serialized_end=334 - _globals['_DEFAULTVALUE']._serialized_start=336 - _globals['_DEFAULTVALUE']._serialized_end=373 - _globals['_NEWLABEL']._serialized_start=375 - _globals['_NEWLABEL']._serialized_end=466 - _globals['_UPDATELABELSREQUEST']._serialized_start=469 - _globals['_UPDATELABELSREQUEST']._serialized_end=631 - _globals['_UPDATEREQUEST']._serialized_start=634 - _globals['_UPDATEREQUEST']._serialized_end=897 - _globals['_ENTRYREQUEST']._serialized_start=900 - _globals['_ENTRYREQUEST']._serialized_end=1069 - _globals['_ENTRY']._serialized_start=1072 - _globals['_ENTRY']._serialized_end=1259 - _globals['_GETENTRIESRESPONSE']._serialized_start=1261 - _globals['_GETENTRIESRESPONSE']._serialized_end=1334 - _globals['_GETENTRIESINDICESRESPONSE']._serialized_start=1336 - _globals['_GETENTRIESINDICESRESPONSE']._serialized_end=1414 - _globals['_LABELS']._serialized_start=1416 - _globals['_LABELS']._serialized_end=1440 - _globals['_LISTRESPONSE']._serialized_start=1442 - _globals['_LISTRESPONSE']._serialized_end=1546 - _globals['_LABELSCOPINGREQUEST']._serialized_start=1548 - _globals['_LABELSCOPINGREQUEST']._serialized_end=1645 - _globals['_LABELSCOPINGRESPONSE']._serialized_start=1647 - _globals['_LABELSCOPINGRESPONSE']._serialized_end=1727 - _globals['_SUPPORTREQUEST']._serialized_start=1730 - _globals['_SUPPORTREQUEST']._serialized_end=1865 - _globals['_UPDATESUPPORTREQUEST']._serialized_start=1868 - _globals['_UPDATESUPPORTREQUEST']._serialized_end=2118 - _globals['_GETALLDATAREQUEST']._serialized_start=2120 - _globals['_GETALLDATAREQUEST']._serialized_end=2200 - _globals['_UPDATEALLDATAREQUEST']._serialized_start=2202 - _globals['_UPDATEALLDATAREQUEST']._serialized_end=2300 - _globals['_UPDATECOLLECTIONREQUEST']._serialized_start=2303 - _globals['_UPDATECOLLECTIONREQUEST']._serialized_end=2549 - _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._serialized_start=2494 - _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._serialized_end=2549 - _globals['_UPDATESIZEREQUEST']._serialized_start=2551 - _globals['_UPDATESIZEREQUEST']._serialized_end=2662 - _globals['_COLLECTIONSERVICE']._serialized_start=2665 - _globals['_COLLECTIONSERVICE']._serialized_end=4152 + _globals['_SINGLECOLLECTIONALLDATA_IDSPERLABELENTRY']._options = None + _globals['_SINGLECOLLECTIONALLDATA_IDSPERLABELENTRY']._serialized_options = b'8\001' + _globals['_SINGLECOLLECTIONALLDATA_SUPPORTPERLABELENTRY']._options = None + _globals['_SINGLECOLLECTIONALLDATA_SUPPORTPERLABELENTRY']._serialized_options = b'8\001' + _globals['_COLLECTIONREQUEST']._serialized_start=211 + _globals['_COLLECTIONREQUEST']._serialized_end=273 + _globals['_DEFAULTVALUE']._serialized_start=275 + _globals['_DEFAULTVALUE']._serialized_end=312 + _globals['_NEWLABEL']._serialized_start=314 + _globals['_NEWLABEL']._serialized_end=405 + _globals['_UPDATELABELSREQUEST']._serialized_start=408 + _globals['_UPDATELABELSREQUEST']._serialized_end=570 + _globals['_UPDATEREQUEST']._serialized_start=573 + _globals['_UPDATEREQUEST']._serialized_end=836 + _globals['_ENTRYREQUEST']._serialized_start=839 + _globals['_ENTRYREQUEST']._serialized_end=1008 + _globals['_ENTRY']._serialized_start=1011 + _globals['_ENTRY']._serialized_end=1198 + _globals['_GETENTRIESRESPONSE']._serialized_start=1200 + _globals['_GETENTRIESRESPONSE']._serialized_end=1273 + _globals['_GETENTRIESINDICESRESPONSE']._serialized_start=1275 + _globals['_GETENTRIESINDICESRESPONSE']._serialized_end=1353 + _globals['_LABELS']._serialized_start=1355 + _globals['_LABELS']._serialized_end=1379 + _globals['_LISTRESPONSE']._serialized_start=1381 + _globals['_LISTRESPONSE']._serialized_end=1485 + _globals['_LABELSCOPINGREQUEST']._serialized_start=1487 + _globals['_LABELSCOPINGREQUEST']._serialized_end=1584 + _globals['_LABELSCOPINGRESPONSE']._serialized_start=1586 + _globals['_LABELSCOPINGRESPONSE']._serialized_end=1666 + _globals['_SUPPORTREQUEST']._serialized_start=1669 + _globals['_SUPPORTREQUEST']._serialized_end=1804 + _globals['_UPDATESUPPORTREQUEST']._serialized_start=1807 + _globals['_UPDATESUPPORTREQUEST']._serialized_end=2057 + _globals['_GETALLDATAREQUEST']._serialized_start=2059 + _globals['_GETALLDATAREQUEST']._serialized_end=2139 + _globals['_UPDATEALLDATAREQUEST']._serialized_start=2141 + _globals['_UPDATEALLDATAREQUEST']._serialized_end=2239 + _globals['_UPDATECOLLECTIONREQUEST']._serialized_start=2242 + _globals['_UPDATECOLLECTIONREQUEST']._serialized_end=2488 + _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._serialized_start=2433 + _globals['_UPDATECOLLECTIONREQUEST_STRINGPROPERTIESENTRY']._serialized_end=2488 + _globals['_UPDATESIZEREQUEST']._serialized_start=2490 + _globals['_UPDATESIZEREQUEST']._serialized_end=2601 + _globals['_SINGLECOLLECTIONALLDATA']._serialized_start=2604 + _globals['_SINGLECOLLECTIONALLDATA']._serialized_end=3114 + _globals['_SINGLECOLLECTIONALLDATA_IDSPERLABELENTRY']._serialized_start=2925 + _globals['_SINGLECOLLECTIONALLDATA_IDSPERLABELENTRY']._serialized_end=3016 + _globals['_SINGLECOLLECTIONALLDATA_SUPPORTPERLABELENTRY']._serialized_start=3018 + _globals['_SINGLECOLLECTIONALLDATA_SUPPORTPERLABELENTRY']._serialized_end=3114 + _globals['_ALLDATA']._serialized_start=3116 + _globals['_ALLDATA']._serialized_end=3222 + _globals['_INTEGRALALLDATASIZE']._serialized_start=3224 + _globals['_INTEGRALALLDATASIZE']._serialized_end=3319 + _globals['_INTEGRALALLDATA']._serialized_start=3322 + _globals['_INTEGRALALLDATA']._serialized_end=3462 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=3464 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=3550 + _globals['_COLLECTIONSERVICE']._serialized_start=3553 + _globals['_COLLECTIONSERVICE']._serialized_end=5282 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/collection_pb2_grpc.py b/src/ansys/grpc/dpf/collection_pb2_grpc.py index 1d7a8d6485..4b5adec311 100644 --- a/src/ansys/grpc/dpf/collection_pb2_grpc.py +++ b/src/ansys/grpc/dpf/collection_pb2_grpc.py @@ -3,6 +3,7 @@ import grpc import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 import ansys.grpc.dpf.collection_pb2 as collection__pb2 import ansys.grpc.dpf.support_pb2 as support__pb2 @@ -19,7 +20,17 @@ def __init__(self, channel): self.Create = channel.unary_unary( '/ansys.api.dpf.collection.v0.CollectionService/Create', request_serializer=collection__pb2.CollectionRequest.SerializeToString, - response_deserializer=collection__pb2.Collection.FromString, + response_deserializer=collection__message__pb2.Collection.FromString, + ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.collection.v0.CollectionService/CreateWithData', + request_serializer=collection__pb2.AllData.SerializeToString, + response_deserializer=collection__pb2.CreateWithDataResponse.FromString, + ) + self.CreateIntegralWithData = channel.stream_stream( + '/ansys.api.dpf.collection.v0.CollectionService/CreateIntegralWithData', + request_serializer=collection__pb2.IntegralAllData.SerializeToString, + response_deserializer=collection__pb2.CreateWithDataResponse.FromString, ) self.Update = channel.unary_unary( '/ansys.api.dpf.collection.v0.CollectionService/Update', @@ -43,7 +54,7 @@ def __init__(self, channel): ) self.List = channel.unary_unary( '/ansys.api.dpf.collection.v0.CollectionService/List', - request_serializer=collection__pb2.Collection.SerializeToString, + request_serializer=collection__message__pb2.Collection.SerializeToString, response_deserializer=collection__pb2.ListResponse.FromString, ) self.GetEntries = channel.unary_unary( @@ -88,7 +99,7 @@ def __init__(self, channel): ) self.Delete = channel.unary_unary( '/ansys.api.dpf.collection.v0.CollectionService/Delete', - request_serializer=collection__pb2.Collection.SerializeToString, + request_serializer=collection__message__pb2.Collection.SerializeToString, response_deserializer=base__pb2.Empty.FromString, ) @@ -102,6 +113,18 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + + def CreateIntegralWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Update(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -199,7 +222,17 @@ def add_CollectionServiceServicer_to_server(servicer, server): 'Create': grpc.unary_unary_rpc_method_handler( servicer.Create, request_deserializer=collection__pb2.CollectionRequest.FromString, - response_serializer=collection__pb2.Collection.SerializeToString, + response_serializer=collection__message__pb2.Collection.SerializeToString, + ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=collection__pb2.AllData.FromString, + response_serializer=collection__pb2.CreateWithDataResponse.SerializeToString, + ), + 'CreateIntegralWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateIntegralWithData, + request_deserializer=collection__pb2.IntegralAllData.FromString, + response_serializer=collection__pb2.CreateWithDataResponse.SerializeToString, ), 'Update': grpc.unary_unary_rpc_method_handler( servicer.Update, @@ -223,7 +256,7 @@ def add_CollectionServiceServicer_to_server(servicer, server): ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, - request_deserializer=collection__pb2.Collection.FromString, + request_deserializer=collection__message__pb2.Collection.FromString, response_serializer=collection__pb2.ListResponse.SerializeToString, ), 'GetEntries': grpc.unary_unary_rpc_method_handler( @@ -268,7 +301,7 @@ def add_CollectionServiceServicer_to_server(servicer, server): ), 'Delete': grpc.unary_unary_rpc_method_handler( servicer.Delete, - request_deserializer=collection__pb2.Collection.FromString, + request_deserializer=collection__message__pb2.Collection.FromString, response_serializer=base__pb2.Empty.SerializeToString, ), } @@ -294,7 +327,41 @@ def Create(request, metadata=None): return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/Create', collection__pb2.CollectionRequest.SerializeToString, - collection__pb2.Collection.FromString, + collection__message__pb2.Collection.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.collection.v0.CollectionService/CreateWithData', + collection__pb2.AllData.SerializeToString, + collection__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def CreateIntegralWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.collection.v0.CollectionService/CreateIntegralWithData', + collection__pb2.IntegralAllData.SerializeToString, + collection__pb2.CreateWithDataResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -378,7 +445,7 @@ def List(request, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/List', - collection__pb2.Collection.SerializeToString, + collection__message__pb2.Collection.SerializeToString, collection__pb2.ListResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) @@ -531,7 +598,7 @@ def Delete(request, timeout=None, metadata=None): return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.collection.v0.CollectionService/Delete', - collection__pb2.Collection.SerializeToString, + collection__message__pb2.Collection.SerializeToString, base__pb2.Empty.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) diff --git a/src/ansys/grpc/dpf/data_tree_pb2.py b/src/ansys/grpc/dpf/data_tree_pb2.py index 4d708d0634..5fc5a3ac0a 100644 --- a/src/ansys/grpc/dpf/data_tree_pb2.py +++ b/src/ansys/grpc/dpf/data_tree_pb2.py @@ -15,7 +15,7 @@ import ansys.grpc.dpf.base_pb2 as base__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x64\x61ta_tree.proto\x12\x1a\x61nsys.api.dpf.data_tree.v0\x1a\nbase.proto\"?\n\x08\x44\x61taTree\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"x\n\rUpdateRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"\x82\x01\n\nGetRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12;\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32-.ansys.api.dpf.data_tree.v0.SingleDataRequest\"=\n\x0bGetResponse\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"T\n\nHasRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12\r\n\x05names\x18\x02 \x03(\t\"\x92\x01\n\x0bHasResponse\x12O\n\rhas_each_name\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.data_tree.v0.HasResponse.HasEachNameEntry\x1a\x32\n\x10HasEachNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\xba\x02\n\x04\x44\x61ta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x03int\x18\x02 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x10\n\x06string\x18\x04 \x01(\tH\x00\x12\x33\n\x07vec_int\x18\x05 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x39\n\nvec_double\x18\x06 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x39\n\nvec_string\x18\x07 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x39\n\tdata_tree\x18\x08 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x42\x0b\n\tdata_type\"L\n\x11SingleDataRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"F\n\x0bListRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\"?\n\x0cListResponse\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x12\x16\n\x0esub_tree_names\x18\x02 \x03(\t2\x8b\x04\n\x0f\x44\x61taTreeService\x12L\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a$.ansys.api.dpf.data_tree.v0.DataTree\x12Q\n\x06Update\x12).ansys.api.dpf.data_tree.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Y\n\x04List\x12\'.ansys.api.dpf.data_tree.v0.ListRequest\x1a(.ansys.api.dpf.data_tree.v0.ListResponse\x12V\n\x03Get\x12&.ansys.api.dpf.data_tree.v0.GetRequest\x1a\'.ansys.api.dpf.data_tree.v0.GetResponse\x12V\n\x03Has\x12&.ansys.api.dpf.data_tree.v0.HasRequest\x1a\'.ansys.api.dpf.data_tree.v0.HasResponse\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.data_tree.v0.DataTree\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1c\xaa\x02\x19\x41nsys.Api.Dpf.DataTree.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x64\x61ta_tree.proto\x12\x1a\x61nsys.api.dpf.data_tree.v0\x1a\nbase.proto\"?\n\x08\x44\x61taTree\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"x\n\rUpdateRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"\x82\x01\n\nGetRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12;\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32-.ansys.api.dpf.data_tree.v0.SingleDataRequest\"=\n\x0bGetResponse\x12.\n\x04\x64\x61ta\x18\x02 \x03(\x0b\x32 .ansys.api.dpf.data_tree.v0.Data\"T\n\nHasRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\x12\r\n\x05names\x18\x02 \x03(\t\"\x92\x01\n\x0bHasResponse\x12O\n\rhas_each_name\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.data_tree.v0.HasResponse.HasEachNameEntry\x1a\x32\n\x10HasEachNameEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\"\xba\x02\n\x04\x44\x61ta\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x03int\x18\x02 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x03 \x01(\x01H\x00\x12\x10\n\x06string\x18\x04 \x01(\tH\x00\x12\x33\n\x07vec_int\x18\x05 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x39\n\nvec_double\x18\x06 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x39\n\nvec_string\x18\x07 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x39\n\tdata_tree\x18\x08 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x42\x0b\n\tdata_type\"L\n\x11SingleDataRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"F\n\x0bListRequest\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\"?\n\x0cListResponse\x12\x17\n\x0f\x61ttribute_names\x18\x01 \x03(\t\x12\x16\n\x0esub_tree_names\x18\x02 \x03(\t\"\x97\x02\n\x0c\x44\x61taTreeNode\x12L\n\nattributes\x18\x01 \x03(\x0b\x32\x38.ansys.api.dpf.data_tree.v0.DataTreeNode.AttributesEntry\x12Q\n\rsubtree_index\x18\x02 \x03(\x0b\x32:.ansys.api.dpf.data_tree.v0.DataTreeNode.SubtreeIndexEntry\x1a\x31\n\x0f\x41ttributesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x1a\x33\n\x11SubtreeIndexEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x04:\x02\x38\x01\"W\n\x07\x41llData\x12\x38\n\x06values\x18\x01 \x03(\x0b\x32(.ansys.api.dpf.data_tree.v0.DataTreeNode\x12\x12\n\ntree_index\x18\x02 \x03(\x04\"R\n\x16\x43reateWithDataResponse\x12\x38\n\ndata_trees\x18\x01 \x03(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree2\xfa\x04\n\x0f\x44\x61taTreeService\x12L\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a$.ansys.api.dpf.data_tree.v0.DataTree\x12m\n\x0e\x43reateWithData\x12#.ansys.api.dpf.data_tree.v0.AllData\x1a\x32.ansys.api.dpf.data_tree.v0.CreateWithDataResponse(\x01\x30\x01\x12Q\n\x06Update\x12).ansys.api.dpf.data_tree.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12Y\n\x04List\x12\'.ansys.api.dpf.data_tree.v0.ListRequest\x1a(.ansys.api.dpf.data_tree.v0.ListResponse\x12V\n\x03Get\x12&.ansys.api.dpf.data_tree.v0.GetRequest\x1a\'.ansys.api.dpf.data_tree.v0.GetResponse\x12V\n\x03Has\x12&.ansys.api.dpf.data_tree.v0.HasRequest\x1a\'.ansys.api.dpf.data_tree.v0.HasResponse\x12L\n\x06\x44\x65lete\x12$.ansys.api.dpf.data_tree.v0.DataTree\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1c\xaa\x02\x19\x41nsys.Api.Dpf.DataTree.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -25,6 +25,10 @@ _globals['DESCRIPTOR']._serialized_options = b'\252\002\031Ansys.Api.Dpf.DataTree.V0' _globals['_HASRESPONSE_HASEACHNAMEENTRY']._options = None _globals['_HASRESPONSE_HASEACHNAMEENTRY']._serialized_options = b'8\001' + _globals['_DATATREENODE_ATTRIBUTESENTRY']._options = None + _globals['_DATATREENODE_ATTRIBUTESENTRY']._serialized_options = b'8\001' + _globals['_DATATREENODE_SUBTREEINDEXENTRY']._options = None + _globals['_DATATREENODE_SUBTREEINDEXENTRY']._serialized_options = b'8\001' _globals['_DATATREE']._serialized_start=59 _globals['_DATATREE']._serialized_end=122 _globals['_UPDATEREQUEST']._serialized_start=124 @@ -47,6 +51,16 @@ _globals['_LISTREQUEST']._serialized_end=1142 _globals['_LISTRESPONSE']._serialized_start=1144 _globals['_LISTRESPONSE']._serialized_end=1207 - _globals['_DATATREESERVICE']._serialized_start=1210 - _globals['_DATATREESERVICE']._serialized_end=1733 + _globals['_DATATREENODE']._serialized_start=1210 + _globals['_DATATREENODE']._serialized_end=1489 + _globals['_DATATREENODE_ATTRIBUTESENTRY']._serialized_start=1387 + _globals['_DATATREENODE_ATTRIBUTESENTRY']._serialized_end=1436 + _globals['_DATATREENODE_SUBTREEINDEXENTRY']._serialized_start=1438 + _globals['_DATATREENODE_SUBTREEINDEXENTRY']._serialized_end=1489 + _globals['_ALLDATA']._serialized_start=1491 + _globals['_ALLDATA']._serialized_end=1578 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=1580 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=1662 + _globals['_DATATREESERVICE']._serialized_start=1665 + _globals['_DATATREESERVICE']._serialized_end=2299 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/data_tree_pb2_grpc.py b/src/ansys/grpc/dpf/data_tree_pb2_grpc.py index 21fd175283..0b83c4382e 100644 --- a/src/ansys/grpc/dpf/data_tree_pb2_grpc.py +++ b/src/ansys/grpc/dpf/data_tree_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=base__pb2.Empty.SerializeToString, response_deserializer=data__tree__pb2.DataTree.FromString, ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.data_tree.v0.DataTreeService/CreateWithData', + request_serializer=data__tree__pb2.AllData.SerializeToString, + response_deserializer=data__tree__pb2.CreateWithDataResponse.FromString, + ) self.Update = channel.unary_unary( '/ansys.api.dpf.data_tree.v0.DataTreeService/Update', request_serializer=data__tree__pb2.UpdateRequest.SerializeToString, @@ -56,6 +61,12 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Update(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -94,6 +105,11 @@ def add_DataTreeServiceServicer_to_server(servicer, server): request_deserializer=base__pb2.Empty.FromString, response_serializer=data__tree__pb2.DataTree.SerializeToString, ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=data__tree__pb2.AllData.FromString, + response_serializer=data__tree__pb2.CreateWithDataResponse.SerializeToString, + ), 'Update': grpc.unary_unary_rpc_method_handler( servicer.Update, request_deserializer=data__tree__pb2.UpdateRequest.FromString, @@ -146,6 +162,23 @@ def Create(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.data_tree.v0.DataTreeService/CreateWithData', + data__tree__pb2.AllData.SerializeToString, + data__tree__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Update(request, target, diff --git a/src/ansys/grpc/dpf/dpf_any_pb2.py b/src/ansys/grpc/dpf/dpf_any_pb2.py index 26cd3c1bcb..76e7101b20 100644 --- a/src/ansys/grpc/dpf/dpf_any_pb2.py +++ b/src/ansys/grpc/dpf/dpf_any_pb2.py @@ -14,7 +14,7 @@ import ansys.grpc.dpf.base_pb2 as base__pb2 import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 -import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 import ansys.grpc.dpf.field_pb2 as field__pb2 import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 import ansys.grpc.dpf.data_sources_pb2 as data__sources__pb2 @@ -28,7 +28,7 @@ import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rdpf_any.proto\x12\x18\x61nsys.api.dpf.dpf_any.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x1cgeneric_data_container.proto\x1a\x0f\x64\x61ta_tree.proto\"$\n\x0cListResponse\x12\x14\n\x0cwrapped_type\x18\x01 \x01(\t\"\\\n\x0bTypeRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12\x16\n\x0erequested_type\x18\x02 \x01(\t\"\"\n\x0cTypeResponse\x12\x12\n\nis_type_of\x18\x01 \x01(\x08\"\x9e\x01\n\x0cGetAsRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xf1\x06\n\rGetAsResponse\x12.\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\x04 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x05 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x45\n\x0b\x63yc_support\x18\x06 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x07 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x08 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12;\n\x08operator\x18\t \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12?\n\x0bresult_info\x18\n \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12_\n\x16generic_data_container\x18\x0b \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12\x39\n\tdata_tree\x18\x0f \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12\x11\n\x07int_val\x18\x0c \x01(\x05H\x00\x12\x14\n\nstring_val\x18\r \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x42\x06\n\x04\x64\x61ta\"\xe6\x01\n\rCreateRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierH\x00\x12\x11\n\x07int_val\x18\x03 \x01(\x05H\x00\x12\x14\n\nstring_val\x18\x04 \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x05 \x01(\x01H\x00\x12,\n\x07subtype\x18\x06 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x06\n\x04\x64\x61ta\"A\n\x12GetAsArrayResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"o\n\x15\x43reateStreamedRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12+\n\x05\x61rray\x18\x02 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array2\xd1\x04\n\rDpfAnyService\x12[\n\x06\x43reate\x12\'.ansys.api.dpf.dpf_any.v0.CreateRequest\x1a(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12X\n\x04List\x12(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x1a&.ansys.api.dpf.dpf_any.v0.ListResponse\x12W\n\x06IsType\x12%.ansys.api.dpf.dpf_any.v0.TypeRequest\x1a&.ansys.api.dpf.dpf_any.v0.TypeResponse\x12X\n\x05GetAs\x12&.ansys.api.dpf.dpf_any.v0.GetAsRequest\x1a\'.ansys.api.dpf.dpf_any.v0.GetAsResponse\x12m\n\x0e\x43reateStreamed\x12/.ansys.api.dpf.dpf_any.v0.CreateStreamedRequest\x1a(.ansys.api.dpf.dpf_any_message.v0.DpfAny(\x01\x12g\n\rGetAsStreamed\x12&.ansys.api.dpf.dpf_any.v0.GetAsRequest\x1a,.ansys.api.dpf.dpf_any.v0.GetAsArrayResponse0\x01\x42\x1a\xaa\x02\x17\x41nsys.Api.Dpf.DpfAny.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rdpf_any.proto\x12\x18\x61nsys.api.dpf.dpf_any.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\x1a\x18\x63ollection_message.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x1cgeneric_data_container.proto\x1a\x0f\x64\x61ta_tree.proto\"$\n\x0cListResponse\x12\x14\n\x0cwrapped_type\x18\x01 \x01(\t\"\\\n\x0bTypeRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12\x16\n\x0erequested_type\x18\x02 \x01(\t\"\"\n\x0cTypeResponse\x12\x12\n\nis_type_of\x18\x01 \x01(\x08\"\x9e\x01\n\x0cGetAsRequest\x12\x35\n\x03\x61ny\x18\x01 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xf1\x06\n\rGetAsResponse\x12.\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\x04 \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x05 \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x45\n\x0b\x63yc_support\x18\x06 \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x07 \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x08 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12;\n\x08operator\x18\t \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12?\n\x0bresult_info\x18\n \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12_\n\x16generic_data_container\x18\x0b \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12\x39\n\tdata_tree\x18\x0f \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12\x11\n\x07int_val\x18\x0c \x01(\x05H\x00\x12\x14\n\nstring_val\x18\r \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x0e \x01(\x01H\x00\x42\x06\n\x04\x64\x61ta\"\xe6\x01\n\rCreateRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12\x35\n\x02id\x18\x02 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifierH\x00\x12\x11\n\x07int_val\x18\x03 \x01(\x05H\x00\x12\x14\n\nstring_val\x18\x04 \x01(\tH\x00\x12\x14\n\ndouble_val\x18\x05 \x01(\x01H\x00\x12,\n\x07subtype\x18\x06 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.TypeB\x06\n\x04\x64\x61ta\"A\n\x12GetAsArrayResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"o\n\x15\x43reateStreamedRequest\x12)\n\x04type\x18\x01 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12+\n\x05\x61rray\x18\x02 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"6\n\x07\x41llData\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"P\n\x16\x43reateWithDataResponse\x12\x36\n\x04\x61nys\x18\x01 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny2\xbc\x05\n\rDpfAnyService\x12[\n\x06\x43reate\x12\'.ansys.api.dpf.dpf_any.v0.CreateRequest\x1a(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x12i\n\x0e\x43reateWithData\x12!.ansys.api.dpf.dpf_any.v0.AllData\x1a\x30.ansys.api.dpf.dpf_any.v0.CreateWithDataResponse(\x01\x30\x01\x12X\n\x04List\x12(.ansys.api.dpf.dpf_any_message.v0.DpfAny\x1a&.ansys.api.dpf.dpf_any.v0.ListResponse\x12W\n\x06IsType\x12%.ansys.api.dpf.dpf_any.v0.TypeRequest\x1a&.ansys.api.dpf.dpf_any.v0.TypeResponse\x12X\n\x05GetAs\x12&.ansys.api.dpf.dpf_any.v0.GetAsRequest\x1a\'.ansys.api.dpf.dpf_any.v0.GetAsResponse\x12m\n\x0e\x43reateStreamed\x12/.ansys.api.dpf.dpf_any.v0.CreateStreamedRequest\x1a(.ansys.api.dpf.dpf_any_message.v0.DpfAny(\x01\x12g\n\rGetAsStreamed\x12&.ansys.api.dpf.dpf_any.v0.GetAsRequest\x1a,.ansys.api.dpf.dpf_any.v0.GetAsArrayResponse0\x01\x42\x1a\xaa\x02\x17\x41nsys.Api.Dpf.DpfAny.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -36,22 +36,26 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\027Ansys.Api.Dpf.DpfAny.V0' - _globals['_LISTRESPONSE']._serialized_start=318 - _globals['_LISTRESPONSE']._serialized_end=354 - _globals['_TYPEREQUEST']._serialized_start=356 - _globals['_TYPEREQUEST']._serialized_end=448 - _globals['_TYPERESPONSE']._serialized_start=450 - _globals['_TYPERESPONSE']._serialized_end=484 - _globals['_GETASREQUEST']._serialized_start=487 - _globals['_GETASREQUEST']._serialized_end=645 - _globals['_GETASRESPONSE']._serialized_start=648 - _globals['_GETASRESPONSE']._serialized_end=1529 - _globals['_CREATEREQUEST']._serialized_start=1532 - _globals['_CREATEREQUEST']._serialized_end=1762 - _globals['_GETASARRAYRESPONSE']._serialized_start=1764 - _globals['_GETASARRAYRESPONSE']._serialized_end=1829 - _globals['_CREATESTREAMEDREQUEST']._serialized_start=1831 - _globals['_CREATESTREAMEDREQUEST']._serialized_end=1942 - _globals['_DPFANYSERVICE']._serialized_start=1945 - _globals['_DPFANYSERVICE']._serialized_end=2538 + _globals['_LISTRESPONSE']._serialized_start=326 + _globals['_LISTRESPONSE']._serialized_end=362 + _globals['_TYPEREQUEST']._serialized_start=364 + _globals['_TYPEREQUEST']._serialized_end=456 + _globals['_TYPERESPONSE']._serialized_start=458 + _globals['_TYPERESPONSE']._serialized_end=492 + _globals['_GETASREQUEST']._serialized_start=495 + _globals['_GETASREQUEST']._serialized_end=653 + _globals['_GETASRESPONSE']._serialized_start=656 + _globals['_GETASRESPONSE']._serialized_end=1537 + _globals['_CREATEREQUEST']._serialized_start=1540 + _globals['_CREATEREQUEST']._serialized_end=1770 + _globals['_GETASARRAYRESPONSE']._serialized_start=1772 + _globals['_GETASARRAYRESPONSE']._serialized_end=1837 + _globals['_CREATESTREAMEDREQUEST']._serialized_start=1839 + _globals['_CREATESTREAMEDREQUEST']._serialized_end=1950 + _globals['_ALLDATA']._serialized_start=1952 + _globals['_ALLDATA']._serialized_end=2006 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=2008 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=2088 + _globals['_DPFANYSERVICE']._serialized_start=2091 + _globals['_DPFANYSERVICE']._serialized_end=2791 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py b/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py index d2eff048b0..5825a4e9ff 100644 --- a/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py +++ b/src/ansys/grpc/dpf/dpf_any_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=dpf__any__pb2.CreateRequest.SerializeToString, response_deserializer=dpf__any__message__pb2.DpfAny.FromString, ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.dpf_any.v0.DpfAnyService/CreateWithData', + request_serializer=dpf__any__pb2.AllData.SerializeToString, + response_deserializer=dpf__any__pb2.CreateWithDataResponse.FromString, + ) self.List = channel.unary_unary( '/ansys.api.dpf.dpf_any.v0.DpfAnyService/List', request_serializer=dpf__any__message__pb2.DpfAny.SerializeToString, @@ -56,6 +61,12 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def List(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -94,6 +105,11 @@ def add_DpfAnyServiceServicer_to_server(servicer, server): request_deserializer=dpf__any__pb2.CreateRequest.FromString, response_serializer=dpf__any__message__pb2.DpfAny.SerializeToString, ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=dpf__any__pb2.AllData.FromString, + response_serializer=dpf__any__pb2.CreateWithDataResponse.SerializeToString, + ), 'List': grpc.unary_unary_rpc_method_handler( servicer.List, request_deserializer=dpf__any__message__pb2.DpfAny.FromString, @@ -146,6 +162,23 @@ def Create(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.dpf_any.v0.DpfAnyService/CreateWithData', + dpf__any__pb2.AllData.SerializeToString, + dpf__any__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def List(request, target, diff --git a/src/ansys/grpc/dpf/field_pb2.py b/src/ansys/grpc/dpf/field_pb2.py index 8a6bc275ac..40f1e15f31 100644 --- a/src/ansys/grpc/dpf/field_pb2.py +++ b/src/ansys/grpc/dpf/field_pb2.py @@ -17,9 +17,10 @@ import ansys.grpc.dpf.field_definition_pb2 as field__definition__pb2 import ansys.grpc.dpf.support_pb2 as support__pb2 import ansys.grpc.dpf.data_tree_pb2 as data__tree__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x66ield.proto\x12\x16\x61nsys.api.dpf.field.v0\x1a\nbase.proto\x1a\rscoping.proto\x1a\x16\x66ield_definition.proto\x1a\rsupport.proto\x1a\x0f\x64\x61ta_tree.proto\"P\n\x14\x43ustomTypeDefinition\x12\x18\n\x10unitary_datatype\x18\x01 \x01(\t\x12\x1e\n\x16num_bytes_unitary_data\x18\x02 \x01(\x05\"\x95\x01\n\x05\x46ield\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x10\n\x08\x64\x61tatype\x18\x02 \x01(\t\x12\x45\n\x0f\x63ustom_type_def\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\xc5\x02\n\x0c\x46ieldRequest\x12-\n\x06nature\x18\x01 \x01(\x0e\x32\x1d.ansys.api.dpf.base.v0.Nature\x12\x31\n\x08location\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\x12/\n\x04size\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\t\x12I\n\x0e\x64imensionality\x18\x05 \x01(\x0b\x32\x31.ansys.api.dpf.field_definition.v0.Dimensionality\x12\x45\n\x0f\x63ustom_type_def\x18\x06 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\x8d\x01\n\x0e\x41\x64\x64\x44\x61taRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"x\n\x14UpdateScopingRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07scoping\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x93\x01\n\x1cUpdateFieldDefinitionRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x45\n\tfield_def\x18\x02 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\"\x9a\x01\n\x1bUpdateElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"\x83\x01\n\x11UpdateSizeRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12/\n\x04size\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\x12\x0f\n\x07reserve\x18\x03 \x01(\x08\"Z\n\x1cUpdateDataPointerSizeRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x0c\n\x04size\x18\x02 \x01(\x05\"4\n\tFieldSize\x12\x14\n\x0cscoping_size\x18\x01 \x01(\x05\x12\x11\n\tdata_size\x18\x02 \x01(\x05\"\xae\x02\n\x04\x44\x61ta\x12\x39\n\ndatadouble\x18\x02 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x33\n\x07\x64\x61taint\x18\x03 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x37\n\tdatafloat\x18\x04 \x01(\x0b\x32\".ansys.api.dpf.base.v0.FloatVectorH\x00\x12\x39\n\ndatastring\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x35\n\x08\x64\x61tabyte\x18\x05 \x01(\x0b\x32!.ansys.api.dpf.base.v0.ByteVectorH\x00\x42\x0b\n\tdatatypes\"q\n\x18\x45lementaryDataContainers\x12\x12\n\nscoping_id\x18\x01 \x01(\x05\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.ansys.api.dpf.field.v0.Data\x12\x15\n\rscoping_index\x18\x03 \x01(\x05\";\n\x0bListRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\":\n\nGetRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"s\n\x18GetElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x12\x0c\n\x02id\x18\x03 \x01(\x05H\x00\x42\n\n\x08index_id\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"j\n\x19GetElementaryDataResponse\x12M\n\x13\x65lemdata_containers\x18\x01 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"H\n\x12GetScopingResponse\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"x\n\x1aGetFieldDefinitionResponse\x12L\n\x10\x66ield_definition\x18\x01 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x12\x0c\n\x04name\x18\x02 \x01(\t\"p\n\x0c\x43ountRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"i\n\x0eSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"A\n\x11PropertiesRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"M\n\x12PropertiesResponse\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\"u\n\x11SetSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07support\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support\"P\n\x11UpdateDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\x32\x8f\x0e\n\x0c\x46ieldService\x12M\n\x06\x43reate\x12$.ansys.api.dpf.field.v0.FieldRequest\x1a\x1d.ansys.api.dpf.field.v0.Field\x12O\n\x07\x41\x64\x64\x44\x61ta\x12&.ansys.api.dpf.field.v0.AddDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\nUpdateData\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12^\n\x11UpdateDataPointer\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\rUpdateScoping\x12,.ansys.api.dpf.field.v0.UpdateScopingRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12U\n\nUpdateSize\x12).ansys.api.dpf.field.v0.UpdateSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12k\n\x15UpdateDataPointerSize\x12\x34.ansys.api.dpf.field.v0.UpdateDataPointerSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12k\n\x15UpdateFieldDefinition\x12\x34.ansys.api.dpf.field.v0.UpdateFieldDefinitionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12i\n\x14UpdateElementaryData\x12\x33.ansys.api.dpf.field.v0.UpdateElementaryDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12S\n\x04List\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12^\n\x0fListDataPointer\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12\\\n\nGetScoping\x12\".ansys.api.dpf.field.v0.GetRequest\x1a*.ansys.api.dpf.field.v0.GetScopingResponse\x12W\n\nGetSupport\x12&.ansys.api.dpf.field.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12\x66\n\rGetProperties\x12).ansys.api.dpf.field.v0.PropertiesRequest\x1a*.ansys.api.dpf.field.v0.PropertiesResponse\x12U\n\nSetSupport\x12).ansys.api.dpf.field.v0.SetSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12l\n\x12GetFieldDefinition\x12\".ansys.api.dpf.field.v0.GetRequest\x1a\x32.ansys.api.dpf.field.v0.GetFieldDefinitionResponse\x12x\n\x11GetElementaryData\x12\x30.ansys.api.dpf.field.v0.GetElementaryDataRequest\x1a\x31.ansys.api.dpf.field.v0.GetElementaryDataResponse\x12S\n\x05\x43ount\x12$.ansys.api.dpf.field.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12\x45\n\x06\x44\x65lete\x12\x1d.ansys.api.dpf.field.v0.Field\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x19\xaa\x02\x16\x41nsys.Api.Dpf.Field.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0b\x66ield.proto\x12\x16\x61nsys.api.dpf.field.v0\x1a\nbase.proto\x1a\rscoping.proto\x1a\x16\x66ield_definition.proto\x1a\rsupport.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x18\x63ollection_message.proto\"P\n\x14\x43ustomTypeDefinition\x12\x18\n\x10unitary_datatype\x18\x01 \x01(\t\x12\x1e\n\x16num_bytes_unitary_data\x18\x02 \x01(\x05\"\x95\x01\n\x05\x46ield\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x10\n\x08\x64\x61tatype\x18\x02 \x01(\t\x12\x45\n\x0f\x63ustom_type_def\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\xc5\x02\n\x0c\x46ieldRequest\x12-\n\x06nature\x18\x01 \x01(\x0e\x32\x1d.ansys.api.dpf.base.v0.Nature\x12\x31\n\x08location\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\x12/\n\x04size\x18\x03 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\x12\x10\n\x08\x64\x61tatype\x18\x04 \x01(\t\x12I\n\x0e\x64imensionality\x18\x05 \x01(\x0b\x32\x31.ansys.api.dpf.field_definition.v0.Dimensionality\x12\x45\n\x0f\x63ustom_type_def\x18\x06 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\"\x8d\x01\n\x0e\x41\x64\x64\x44\x61taRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"x\n\x14UpdateScopingRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07scoping\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"\x93\x01\n\x1cUpdateFieldDefinitionRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x45\n\tfield_def\x18\x02 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\"\x9a\x01\n\x1bUpdateElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12M\n\x13\x65lemdata_containers\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"\x83\x01\n\x11UpdateSizeRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12/\n\x04size\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.field.v0.FieldSize\x12\x0f\n\x07reserve\x18\x03 \x01(\x08\"Z\n\x1cUpdateDataPointerSizeRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x0c\n\x04size\x18\x02 \x01(\x05\"4\n\tFieldSize\x12\x14\n\x0cscoping_size\x18\x01 \x01(\x05\x12\x11\n\tdata_size\x18\x02 \x01(\x05\"\xae\x02\n\x04\x44\x61ta\x12\x39\n\ndatadouble\x18\x02 \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x33\n\x07\x64\x61taint\x18\x03 \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x37\n\tdatafloat\x18\x04 \x01(\x0b\x32\".ansys.api.dpf.base.v0.FloatVectorH\x00\x12\x39\n\ndatastring\x18\x01 \x01(\x0b\x32#.ansys.api.dpf.base.v0.StringVectorH\x00\x12\x35\n\x08\x64\x61tabyte\x18\x05 \x01(\x0b\x32!.ansys.api.dpf.base.v0.ByteVectorH\x00\x42\x0b\n\tdatatypes\"q\n\x18\x45lementaryDataContainers\x12\x12\n\nscoping_id\x18\x01 \x01(\x05\x12*\n\x04\x64\x61ta\x18\x02 \x01(\x0b\x32\x1c.ansys.api.dpf.field.v0.Data\x12\x15\n\rscoping_index\x18\x03 \x01(\x05\";\n\x0bListRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\":\n\nGetRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"s\n\x18GetElementaryDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x12\x0c\n\x02id\x18\x03 \x01(\x05H\x00\x42\n\n\x08index_id\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"j\n\x19GetElementaryDataResponse\x12M\n\x13\x65lemdata_containers\x18\x01 \x01(\x0b\x32\x30.ansys.api.dpf.field.v0.ElementaryDataContainers\"H\n\x12GetScopingResponse\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\"x\n\x1aGetFieldDefinitionResponse\x12L\n\x10\x66ield_definition\x18\x01 \x01(\x0b\x32\x32.ansys.api.dpf.field_definition.v0.FieldDefinition\x12\x0c\n\x04name\x18\x02 \x01(\t\"p\n\x0c\x43ountRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"i\n\x0eSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12)\n\x04type\x18\x02 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"A\n\x11PropertiesRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\"M\n\x12PropertiesResponse\x12\x37\n\tdata_tree\x18\x01 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTree\"u\n\x11SetSupportRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\x32\n\x07support\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support\"P\n\x11UpdateDataRequest\x12,\n\x05\x66ield\x18\x01 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"\x8b\x03\n\x12SingleFieldAllData\x12\x45\n\x0f\x63ustom_type_def\x18\x01 \x01(\x0b\x32,.ansys.api.dpf.field.v0.CustomTypeDefinition\x12\x32\n\x07scoping\x18\x02 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12P\n\x10\x66ield_definition\x18\x03 \x01(\x0b\x32\x36.ansys.api.dpf.field_definition.v0.FieldDefinitionData\x12\x35\n\x04\x64\x61ta\x18\x04 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12=\n\x0c\x64\x61ta_pointer\x18\x05 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x32\n\x07support\x18\x06 \x01(\x0b\x32!.ansys.api.dpf.support.v0.Support\"W\n\x07\x41llData\x12\x10\n\x08\x64\x61tatype\x18\x01 \x01(\t\x12:\n\x06\x66ields\x18\x02 \x03(\x0b\x32*.ansys.api.dpf.field.v0.SingleFieldAllData\"G\n\x16\x43reateWithDataResponse\x12-\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1d.ansys.api.dpf.field.v0.Field2\xc4\x0f\n\x0c\x46ieldService\x12M\n\x06\x43reate\x12$.ansys.api.dpf.field.v0.FieldRequest\x1a\x1d.ansys.api.dpf.field.v0.Field\x12\x65\n\x0e\x43reateWithData\x12\x1f.ansys.api.dpf.field.v0.AllData\x1a..ansys.api.dpf.field.v0.CreateWithDataResponse(\x01\x30\x01\x12O\n\x07\x41\x64\x64\x44\x61ta\x12&.ansys.api.dpf.field.v0.AddDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\nUpdateData\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12^\n\x11UpdateDataPointer\x12).ansys.api.dpf.field.v0.UpdateDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12[\n\rUpdateScoping\x12,.ansys.api.dpf.field.v0.UpdateScopingRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12U\n\nUpdateSize\x12).ansys.api.dpf.field.v0.UpdateSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12k\n\x15UpdateDataPointerSize\x12\x34.ansys.api.dpf.field.v0.UpdateDataPointerSizeRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12k\n\x15UpdateFieldDefinition\x12\x34.ansys.api.dpf.field.v0.UpdateFieldDefinitionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12i\n\x14UpdateElementaryData\x12\x33.ansys.api.dpf.field.v0.UpdateElementaryDataRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12S\n\x04List\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12^\n\x0fListDataPointer\x12#.ansys.api.dpf.field.v0.ListRequest\x1a$.ansys.api.dpf.field.v0.ListResponse0\x01\x12\\\n\nGetScoping\x12\".ansys.api.dpf.field.v0.GetRequest\x1a*.ansys.api.dpf.field.v0.GetScopingResponse\x12W\n\nGetSupport\x12&.ansys.api.dpf.field.v0.SupportRequest\x1a!.ansys.api.dpf.support.v0.Support\x12\x66\n\rGetProperties\x12).ansys.api.dpf.field.v0.PropertiesRequest\x1a*.ansys.api.dpf.field.v0.PropertiesResponse\x12U\n\nSetSupport\x12).ansys.api.dpf.field.v0.SetSupportRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12l\n\x12GetFieldDefinition\x12\".ansys.api.dpf.field.v0.GetRequest\x1a\x32.ansys.api.dpf.field.v0.GetFieldDefinitionResponse\x12x\n\x11GetElementaryData\x12\x30.ansys.api.dpf.field.v0.GetElementaryDataRequest\x1a\x31.ansys.api.dpf.field.v0.GetElementaryDataResponse\x12S\n\x05\x43ount\x12$.ansys.api.dpf.field.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12L\n\nGetAllData\x12\x1d.ansys.api.dpf.field.v0.Field\x1a\x1f.ansys.api.dpf.field.v0.AllData\x12\x45\n\x06\x44\x65lete\x12\x1d.ansys.api.dpf.field.v0.Field\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x19\xaa\x02\x16\x41nsys.Api.Dpf.Field.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -27,56 +28,62 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\026Ansys.Api.Dpf.Field.V0' - _globals['_CUSTOMTYPEDEFINITION']._serialized_start=122 - _globals['_CUSTOMTYPEDEFINITION']._serialized_end=202 - _globals['_FIELD']._serialized_start=205 - _globals['_FIELD']._serialized_end=354 - _globals['_FIELDREQUEST']._serialized_start=357 - _globals['_FIELDREQUEST']._serialized_end=682 - _globals['_ADDDATAREQUEST']._serialized_start=685 - _globals['_ADDDATAREQUEST']._serialized_end=826 - _globals['_UPDATESCOPINGREQUEST']._serialized_start=828 - _globals['_UPDATESCOPINGREQUEST']._serialized_end=948 - _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_start=951 - _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_end=1098 - _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_start=1101 - _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_end=1255 - _globals['_UPDATESIZEREQUEST']._serialized_start=1258 - _globals['_UPDATESIZEREQUEST']._serialized_end=1389 - _globals['_UPDATEDATAPOINTERSIZEREQUEST']._serialized_start=1391 - _globals['_UPDATEDATAPOINTERSIZEREQUEST']._serialized_end=1481 - _globals['_FIELDSIZE']._serialized_start=1483 - _globals['_FIELDSIZE']._serialized_end=1535 - _globals['_DATA']._serialized_start=1538 - _globals['_DATA']._serialized_end=1840 - _globals['_ELEMENTARYDATACONTAINERS']._serialized_start=1842 - _globals['_ELEMENTARYDATACONTAINERS']._serialized_end=1955 - _globals['_LISTREQUEST']._serialized_start=1957 - _globals['_LISTREQUEST']._serialized_end=2016 - _globals['_GETREQUEST']._serialized_start=2018 - _globals['_GETREQUEST']._serialized_end=2076 - _globals['_GETELEMENTARYDATAREQUEST']._serialized_start=2078 - _globals['_GETELEMENTARYDATAREQUEST']._serialized_end=2193 - _globals['_LISTRESPONSE']._serialized_start=2195 - _globals['_LISTRESPONSE']._serialized_end=2224 - _globals['_GETELEMENTARYDATARESPONSE']._serialized_start=2226 - _globals['_GETELEMENTARYDATARESPONSE']._serialized_end=2332 - _globals['_GETSCOPINGRESPONSE']._serialized_start=2334 - _globals['_GETSCOPINGRESPONSE']._serialized_end=2406 - _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_start=2408 - _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_end=2528 - _globals['_COUNTREQUEST']._serialized_start=2530 - _globals['_COUNTREQUEST']._serialized_end=2642 - _globals['_SUPPORTREQUEST']._serialized_start=2644 - _globals['_SUPPORTREQUEST']._serialized_end=2749 - _globals['_PROPERTIESREQUEST']._serialized_start=2751 - _globals['_PROPERTIESREQUEST']._serialized_end=2816 - _globals['_PROPERTIESRESPONSE']._serialized_start=2818 - _globals['_PROPERTIESRESPONSE']._serialized_end=2895 - _globals['_SETSUPPORTREQUEST']._serialized_start=2897 - _globals['_SETSUPPORTREQUEST']._serialized_end=3014 - _globals['_UPDATEDATAREQUEST']._serialized_start=3016 - _globals['_UPDATEDATAREQUEST']._serialized_end=3096 - _globals['_FIELDSERVICE']._serialized_start=3099 - _globals['_FIELDSERVICE']._serialized_end=4906 + _globals['_CUSTOMTYPEDEFINITION']._serialized_start=148 + _globals['_CUSTOMTYPEDEFINITION']._serialized_end=228 + _globals['_FIELD']._serialized_start=231 + _globals['_FIELD']._serialized_end=380 + _globals['_FIELDREQUEST']._serialized_start=383 + _globals['_FIELDREQUEST']._serialized_end=708 + _globals['_ADDDATAREQUEST']._serialized_start=711 + _globals['_ADDDATAREQUEST']._serialized_end=852 + _globals['_UPDATESCOPINGREQUEST']._serialized_start=854 + _globals['_UPDATESCOPINGREQUEST']._serialized_end=974 + _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_start=977 + _globals['_UPDATEFIELDDEFINITIONREQUEST']._serialized_end=1124 + _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_start=1127 + _globals['_UPDATEELEMENTARYDATAREQUEST']._serialized_end=1281 + _globals['_UPDATESIZEREQUEST']._serialized_start=1284 + _globals['_UPDATESIZEREQUEST']._serialized_end=1415 + _globals['_UPDATEDATAPOINTERSIZEREQUEST']._serialized_start=1417 + _globals['_UPDATEDATAPOINTERSIZEREQUEST']._serialized_end=1507 + _globals['_FIELDSIZE']._serialized_start=1509 + _globals['_FIELDSIZE']._serialized_end=1561 + _globals['_DATA']._serialized_start=1564 + _globals['_DATA']._serialized_end=1866 + _globals['_ELEMENTARYDATACONTAINERS']._serialized_start=1868 + _globals['_ELEMENTARYDATACONTAINERS']._serialized_end=1981 + _globals['_LISTREQUEST']._serialized_start=1983 + _globals['_LISTREQUEST']._serialized_end=2042 + _globals['_GETREQUEST']._serialized_start=2044 + _globals['_GETREQUEST']._serialized_end=2102 + _globals['_GETELEMENTARYDATAREQUEST']._serialized_start=2104 + _globals['_GETELEMENTARYDATAREQUEST']._serialized_end=2219 + _globals['_LISTRESPONSE']._serialized_start=2221 + _globals['_LISTRESPONSE']._serialized_end=2250 + _globals['_GETELEMENTARYDATARESPONSE']._serialized_start=2252 + _globals['_GETELEMENTARYDATARESPONSE']._serialized_end=2358 + _globals['_GETSCOPINGRESPONSE']._serialized_start=2360 + _globals['_GETSCOPINGRESPONSE']._serialized_end=2432 + _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_start=2434 + _globals['_GETFIELDDEFINITIONRESPONSE']._serialized_end=2554 + _globals['_COUNTREQUEST']._serialized_start=2556 + _globals['_COUNTREQUEST']._serialized_end=2668 + _globals['_SUPPORTREQUEST']._serialized_start=2670 + _globals['_SUPPORTREQUEST']._serialized_end=2775 + _globals['_PROPERTIESREQUEST']._serialized_start=2777 + _globals['_PROPERTIESREQUEST']._serialized_end=2842 + _globals['_PROPERTIESRESPONSE']._serialized_start=2844 + _globals['_PROPERTIESRESPONSE']._serialized_end=2921 + _globals['_SETSUPPORTREQUEST']._serialized_start=2923 + _globals['_SETSUPPORTREQUEST']._serialized_end=3040 + _globals['_UPDATEDATAREQUEST']._serialized_start=3042 + _globals['_UPDATEDATAREQUEST']._serialized_end=3122 + _globals['_SINGLEFIELDALLDATA']._serialized_start=3125 + _globals['_SINGLEFIELDALLDATA']._serialized_end=3520 + _globals['_ALLDATA']._serialized_start=3522 + _globals['_ALLDATA']._serialized_end=3609 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=3611 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=3682 + _globals['_FIELDSERVICE']._serialized_start=3685 + _globals['_FIELDSERVICE']._serialized_end=5673 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/field_pb2_grpc.py b/src/ansys/grpc/dpf/field_pb2_grpc.py index 74d808542f..7416cfbe89 100644 --- a/src/ansys/grpc/dpf/field_pb2_grpc.py +++ b/src/ansys/grpc/dpf/field_pb2_grpc.py @@ -21,6 +21,11 @@ def __init__(self, channel): request_serializer=field__pb2.FieldRequest.SerializeToString, response_deserializer=field__pb2.Field.FromString, ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.field.v0.FieldService/CreateWithData', + request_serializer=field__pb2.AllData.SerializeToString, + response_deserializer=field__pb2.CreateWithDataResponse.FromString, + ) self.AddData = channel.unary_unary( '/ansys.api.dpf.field.v0.FieldService/AddData', request_serializer=field__pb2.AddDataRequest.SerializeToString, @@ -106,6 +111,11 @@ def __init__(self, channel): request_serializer=field__pb2.CountRequest.SerializeToString, response_deserializer=base__pb2.CountResponse.FromString, ) + self.GetAllData = channel.unary_unary( + '/ansys.api.dpf.field.v0.FieldService/GetAllData', + request_serializer=field__pb2.Field.SerializeToString, + response_deserializer=field__pb2.AllData.FromString, + ) self.Delete = channel.unary_unary( '/ansys.api.dpf.field.v0.FieldService/Delete', request_serializer=field__pb2.Field.SerializeToString, @@ -122,6 +132,12 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def AddData(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -232,6 +248,12 @@ def Count(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def GetAllData(self, request, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Delete(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -246,6 +268,11 @@ def add_FieldServiceServicer_to_server(servicer, server): request_deserializer=field__pb2.FieldRequest.FromString, response_serializer=field__pb2.Field.SerializeToString, ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=field__pb2.AllData.FromString, + response_serializer=field__pb2.CreateWithDataResponse.SerializeToString, + ), 'AddData': grpc.unary_unary_rpc_method_handler( servicer.AddData, request_deserializer=field__pb2.AddDataRequest.FromString, @@ -331,6 +358,11 @@ def add_FieldServiceServicer_to_server(servicer, server): request_deserializer=field__pb2.CountRequest.FromString, response_serializer=base__pb2.CountResponse.SerializeToString, ), + 'GetAllData': grpc.unary_unary_rpc_method_handler( + servicer.GetAllData, + request_deserializer=field__pb2.Field.FromString, + response_serializer=field__pb2.AllData.SerializeToString, + ), 'Delete': grpc.unary_unary_rpc_method_handler( servicer.Delete, request_deserializer=field__pb2.Field.FromString, @@ -363,6 +395,23 @@ def Create(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.field.v0.FieldService/CreateWithData', + field__pb2.AllData.SerializeToString, + field__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def AddData(request, target, @@ -652,6 +701,23 @@ def Count(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def GetAllData(request, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.unary_unary(request, target, '/ansys.api.dpf.field.v0.FieldService/GetAllData', + field__pb2.Field.SerializeToString, + field__pb2.AllData.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Delete(request, target, diff --git a/src/ansys/grpc/dpf/generic_data_container_pb2.py b/src/ansys/grpc/dpf/generic_data_container_pb2.py index 2909e7c47c..d5e68b9c44 100644 --- a/src/ansys/grpc/dpf/generic_data_container_pb2.py +++ b/src/ansys/grpc/dpf/generic_data_container_pb2.py @@ -16,7 +16,7 @@ import ansys.grpc.dpf.dpf_any_message_pb2 as dpf__any__message__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cgeneric_data_container.proto\x12\'ansys.api.dpf.generic_data_container.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\"K\n\x14GenericDataContainer\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\x0f\n\rCreateRequest\"w\n\x12GetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\"L\n\x13GetPropertyResponse\x12\x35\n\x03\x61ny\x18\x01 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\xae\x01\n\x12SetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\x12\x35\n\x03\x61ny\x18\x03 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\x15\n\x13SetPropertyResponse\"e\n\x17GetPropertyTypesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyTypesResponse\x12\x16\n\x0eproperty_types\x18\x01 \x03(\t\"e\n\x17GetPropertyNamesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyNamesResponse\x12\x16\n\x0eproperty_names\x18\x01 \x03(\t2\xcf\x06\n\x1bGenericDataContainerService\x12\x7f\n\x06\x43reate\x12\x36.ansys.api.dpf.generic_data_container.v0.CreateRequest\x1a=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x88\x01\n\x0bSetProperty\x12;.ansys.api.dpf.generic_data_container.v0.SetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.SetPropertyResponse\x12\x88\x01\n\x0bGetProperty\x12;.ansys.api.dpf.generic_data_container.v0.GetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.GetPropertyResponse\x12\x97\x01\n\x10GetPropertyTypes\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesResponse\x12\x97\x01\n\x10GetPropertyNames\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesResponse\x12\x65\n\x06\x44\x65lete\x12=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x1a\x1c.ansys.api.dpf.base.v0.EmptyB(\xaa\x02%Ansys.Api.Dpf.GenericDataContainer.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x1cgeneric_data_container.proto\x12\'ansys.api.dpf.generic_data_container.v0\x1a\nbase.proto\x1a\x15\x64pf_any_message.proto\"K\n\x14GenericDataContainer\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\x0f\n\rCreateRequest\"w\n\x12GetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\"L\n\x13GetPropertyResponse\x12\x35\n\x03\x61ny\x18\x01 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\xae\x01\n\x12SetPropertyRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x15\n\rproperty_name\x18\x02 \x03(\t\x12\x35\n\x03\x61ny\x18\x03 \x03(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAny\"\x15\n\x13SetPropertyResponse\"e\n\x17GetPropertyTypesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyTypesResponse\x12\x16\n\x0eproperty_types\x18\x01 \x03(\t\"e\n\x17GetPropertyNamesRequest\x12J\n\x03gdc\x18\x01 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\"2\n\x18GetPropertyNamesResponse\x12\x16\n\x0eproperty_names\x18\x01 \x03(\t\"\xab\x01\n\x08Property\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\r\n\x03str\x18\x02 \x01(\tH\x00\x12\r\n\x03int\x18\x03 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x04 \x01(\x01H\x00\x12\x37\n\x03\x61ny\x18\x07 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12\x17\n\rsub_gdc_index\x18\x0b \x01(\x04H\x00\x42\x0f\n\rproperty_data\"j\n!SingleGenericDataContainerAllData\x12\x45\n\nproperties\x18\x01 \x03(\x0b\x32\x31.ansys.api.dpf.generic_data_container.v0.Property\"x\n\x07\x41llData\x12X\n\x04gdcs\x18\x01 \x03(\x0b\x32J.ansys.api.dpf.generic_data_container.v0.SingleGenericDataContainerAllData\x12\x13\n\x0bgdc_indices\x18\x02 \x03(\x04\"e\n\x16\x43reateWithDataResponse\x12K\n\x04gdcs\x18\x01 \x03(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer2\xd9\x07\n\x1bGenericDataContainerService\x12\x7f\n\x06\x43reate\x12\x36.ansys.api.dpf.generic_data_container.v0.CreateRequest\x1a=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x12\x87\x01\n\x0e\x43reateWithData\x12\x30.ansys.api.dpf.generic_data_container.v0.AllData\x1a?.ansys.api.dpf.generic_data_container.v0.CreateWithDataResponse(\x01\x30\x01\x12\x88\x01\n\x0bSetProperty\x12;.ansys.api.dpf.generic_data_container.v0.SetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.SetPropertyResponse\x12\x88\x01\n\x0bGetProperty\x12;.ansys.api.dpf.generic_data_container.v0.GetPropertyRequest\x1a<.ansys.api.dpf.generic_data_container.v0.GetPropertyResponse\x12\x97\x01\n\x10GetPropertyTypes\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyTypesResponse\x12\x97\x01\n\x10GetPropertyNames\x12@.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesRequest\x1a\x41.ansys.api.dpf.generic_data_container.v0.GetPropertyNamesResponse\x12\x65\n\x06\x44\x65lete\x12=.ansys.api.dpf.generic_data_container.v0.GenericDataContainer\x1a\x1c.ansys.api.dpf.base.v0.EmptyB(\xaa\x02%Ansys.Api.Dpf.GenericDataContainer.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -44,6 +44,14 @@ _globals['_GETPROPERTYNAMESREQUEST']._serialized_end=857 _globals['_GETPROPERTYNAMESRESPONSE']._serialized_start=859 _globals['_GETPROPERTYNAMESRESPONSE']._serialized_end=909 - _globals['_GENERICDATACONTAINERSERVICE']._serialized_start=912 - _globals['_GENERICDATACONTAINERSERVICE']._serialized_end=1759 + _globals['_PROPERTY']._serialized_start=912 + _globals['_PROPERTY']._serialized_end=1083 + _globals['_SINGLEGENERICDATACONTAINERALLDATA']._serialized_start=1085 + _globals['_SINGLEGENERICDATACONTAINERALLDATA']._serialized_end=1191 + _globals['_ALLDATA']._serialized_start=1193 + _globals['_ALLDATA']._serialized_end=1313 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=1315 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=1416 + _globals['_GENERICDATACONTAINERSERVICE']._serialized_start=1419 + _globals['_GENERICDATACONTAINERSERVICE']._serialized_end=2404 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py b/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py index 9bbd812d99..2b14b070d4 100644 --- a/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py +++ b/src/ansys/grpc/dpf/generic_data_container_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=generic__data__container__pb2.CreateRequest.SerializeToString, response_deserializer=generic__data__container__pb2.GenericDataContainer.FromString, ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/CreateWithData', + request_serializer=generic__data__container__pb2.AllData.SerializeToString, + response_deserializer=generic__data__container__pb2.CreateWithDataResponse.FromString, + ) self.SetProperty = channel.unary_unary( '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/SetProperty', request_serializer=generic__data__container__pb2.SetPropertyRequest.SerializeToString, @@ -56,6 +61,12 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def SetProperty(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -94,6 +105,11 @@ def add_GenericDataContainerServiceServicer_to_server(servicer, server): request_deserializer=generic__data__container__pb2.CreateRequest.FromString, response_serializer=generic__data__container__pb2.GenericDataContainer.SerializeToString, ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=generic__data__container__pb2.AllData.FromString, + response_serializer=generic__data__container__pb2.CreateWithDataResponse.SerializeToString, + ), 'SetProperty': grpc.unary_unary_rpc_method_handler( servicer.SetProperty, request_deserializer=generic__data__container__pb2.SetPropertyRequest.FromString, @@ -146,6 +162,23 @@ def Create(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.generic_data_container.v0.GenericDataContainerService/CreateWithData', + generic__data__container__pb2.AllData.SerializeToString, + generic__data__container__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def SetProperty(request, target, diff --git a/src/ansys/grpc/dpf/operator_pb2.py b/src/ansys/grpc/dpf/operator_pb2.py index 408f4ff0b0..7ead9af4b0 100644 --- a/src/ansys/grpc/dpf/operator_pb2.py +++ b/src/ansys/grpc/dpf/operator_pb2.py @@ -12,7 +12,7 @@ _sym_db = _symbol_database.Default() -import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 import ansys.grpc.dpf.field_pb2 as field__pb2 import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 import ansys.grpc.dpf.base_pb2 as base__pb2 @@ -29,7 +29,7 @@ import ansys.grpc.dpf.generic_data_container_pb2 as generic__data__container__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eoperator.proto\x12\x1d\x61nsys.api.dpf.dpf_operator.v0\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x15operator_config.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x11label_space.proto\x1a\x1cgeneric_data_container.proto\"M\n\x08Operator\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x88\x05\n\rSpecification\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12]\n\x12map_input_pin_spec\x18\x02 \x03(\x0b\x32\x41.ansys.api.dpf.dpf_operator.v0.Specification.MapInputPinSpecEntry\x12_\n\x13map_output_pin_spec\x18\x03 \x03(\x0b\x32\x42.ansys.api.dpf.dpf_operator.v0.Specification.MapOutputPinSpecEntry\x12J\n\x0b\x63onfig_spec\x18\x04 \x01(\x0b\x32\x35.ansys.api.dpf.operator_config.v0.ConfigSpecification\x12P\n\nproperties\x18\x05 \x03(\x0b\x32<.ansys.api.dpf.dpf_operator.v0.Specification.PropertiesEntry\x1ag\n\x14MapInputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1ah\n\x15MapOutputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x86\x01\n\x10PinSpecification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntype_names\x18\x02 \x03(\t\x12\x10\n\x08optional\x18\x03 \x01(\x08\x12\x10\n\x08\x64ocument\x18\x04 \x01(\t\x12\x10\n\x08\x65llipsis\x18\x05 \x01(\x08\x12\x1a\n\x12name_derived_class\x18\x06 \x01(\t\"Y\n\rOperatorInput\x12\x38\n\x07inputop\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0e\n\x06pinOut\x18\x03 \x01(\x05\"\xa5\t\n\rUpdateRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x44\n\x11operator_as_input\x18\x15 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12_\n\x16generic_data_container\x18\x16 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\xae\x01\n\x12\x41rrayUpdateRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12+\n\x05\x61rray\x18\x03 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\x12)\n\x04type\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\x8c\x01\n\x13UpdateConfigRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb6\x01\n\x19OperatorEvaluationRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"g\n\x15\x43reateOperatorRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb0\x07\n\x10OperatorResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"D\n\x15\x41rrayOperatorResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"\x9d\x01\n\x0cListResponse\x12\x0f\n\x07op_name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x12:\n\x04spec\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.Specification\"G\n\x10GetStatusRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"#\n\x11GetStatusResponse\x12\x0e\n\x06status\x18\x01 \x01(\x05\"\x19\n\x17ListAllOperatorsRequest\")\n\x18ListAllOperatorsResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\x32\xb1\x08\n\x0fOperatorService\x12g\n\x06\x43reate\x12\x34.ansys.api.dpf.dpf_operator.v0.CreateOperatorRequest\x1a\'.ansys.api.dpf.dpf_operator.v0.Operator\x12T\n\x06Update\x12,.ansys.api.dpf.dpf_operator.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0cUpdateConfig\x12\x32.ansys.api.dpf.dpf_operator.v0.UpdateConfigRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12p\n\x03Get\x12\x38.ansys.api.dpf.dpf_operator.v0.OperatorEvaluationRequest\x1a/.ansys.api.dpf.dpf_operator.v0.OperatorResponse\x12\\\n\x04List\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a+.ansys.api.dpf.dpf_operator.v0.ListResponse\x12n\n\tGetStatus\x12/.ansys.api.dpf.dpf_operator.v0.GetStatusRequest\x1a\x30.ansys.api.dpf.dpf_operator.v0.GetStatusResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x85\x01\n\x10ListAllOperators\x12\x36.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsRequest\x1a\x37.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsResponse0\x01\x12\x63\n\x0eUpdateStreamed\x12\x31.ansys.api.dpf.dpf_operator.v0.ArrayUpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12\x7f\n\x0bGetStreamed\x12\x38.ansys.api.dpf.dpf_operator.v0.OperatorEvaluationRequest\x1a\x34.ansys.api.dpf.dpf_operator.v0.ArrayOperatorResponse0\x01\x42\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Operator.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eoperator.proto\x12\x1d\x61nsys.api.dpf.dpf_operator.v0\x1a\x18\x63ollection_message.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x15operator_config.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x11label_space.proto\x1a\x1cgeneric_data_container.proto\"M\n\x08Operator\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\x12\x0c\n\x04name\x18\x02 \x01(\t\"\x88\x05\n\rSpecification\x12\x13\n\x0b\x64\x65scription\x18\x01 \x01(\t\x12]\n\x12map_input_pin_spec\x18\x02 \x03(\x0b\x32\x41.ansys.api.dpf.dpf_operator.v0.Specification.MapInputPinSpecEntry\x12_\n\x13map_output_pin_spec\x18\x03 \x03(\x0b\x32\x42.ansys.api.dpf.dpf_operator.v0.Specification.MapOutputPinSpecEntry\x12J\n\x0b\x63onfig_spec\x18\x04 \x01(\x0b\x32\x35.ansys.api.dpf.operator_config.v0.ConfigSpecification\x12P\n\nproperties\x18\x05 \x03(\x0b\x32<.ansys.api.dpf.dpf_operator.v0.Specification.PropertiesEntry\x1ag\n\x14MapInputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1ah\n\x15MapOutputPinSpecEntry\x12\x0b\n\x03key\x18\x01 \x01(\x05\x12>\n\x05value\x18\x02 \x01(\x0b\x32/.ansys.api.dpf.dpf_operator.v0.PinSpecification:\x02\x38\x01\x1a\x31\n\x0fPropertiesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\"\x86\x01\n\x10PinSpecification\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x12\n\ntype_names\x18\x02 \x03(\t\x12\x10\n\x08optional\x18\x03 \x01(\x08\x12\x10\n\x08\x64ocument\x18\x04 \x01(\t\x12\x10\n\x08\x65llipsis\x18\x05 \x01(\x08\x12\x1a\n\x12name_derived_class\x18\x06 \x01(\t\"Y\n\rOperatorInput\x12\x38\n\x07inputop\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0e\n\x06pinOut\x18\x03 \x01(\x05\"\xa5\t\n\rUpdateRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12\x44\n\x11operator_as_input\x18\x15 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12_\n\x16generic_data_container\x18\x16 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\xae\x01\n\x12\x41rrayUpdateRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12+\n\x05\x61rray\x18\x03 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\x12)\n\x04type\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\x8c\x01\n\x13UpdateConfigRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb6\x01\n\x19OperatorEvaluationRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"g\n\x15\x43reateOperatorRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\"\xb0\x07\n\x10OperatorResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"D\n\x15\x41rrayOperatorResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"\x9d\x01\n\x0cListResponse\x12\x0f\n\x07op_name\x18\x01 \x01(\t\x12@\n\x06\x63onfig\x18\x02 \x01(\x0b\x32\x30.ansys.api.dpf.operator_config.v0.OperatorConfig\x12:\n\x04spec\x18\x03 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.Specification\"G\n\x10GetStatusRequest\x12\x33\n\x02op\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"#\n\x11GetStatusResponse\x12\x0e\n\x06status\x18\x01 \x01(\x05\"\x19\n\x17ListAllOperatorsRequest\")\n\x18ListAllOperatorsResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\x32\xb1\x08\n\x0fOperatorService\x12g\n\x06\x43reate\x12\x34.ansys.api.dpf.dpf_operator.v0.CreateOperatorRequest\x1a\'.ansys.api.dpf.dpf_operator.v0.Operator\x12T\n\x06Update\x12,.ansys.api.dpf.dpf_operator.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0cUpdateConfig\x12\x32.ansys.api.dpf.dpf_operator.v0.UpdateConfigRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12p\n\x03Get\x12\x38.ansys.api.dpf.dpf_operator.v0.OperatorEvaluationRequest\x1a/.ansys.api.dpf.dpf_operator.v0.OperatorResponse\x12\\\n\x04List\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a+.ansys.api.dpf.dpf_operator.v0.ListResponse\x12n\n\tGetStatus\x12/.ansys.api.dpf.dpf_operator.v0.GetStatusRequest\x1a\x30.ansys.api.dpf.dpf_operator.v0.GetStatusResponse\x12O\n\x06\x44\x65lete\x12\'.ansys.api.dpf.dpf_operator.v0.Operator\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x85\x01\n\x10ListAllOperators\x12\x36.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsRequest\x1a\x37.ansys.api.dpf.dpf_operator.v0.ListAllOperatorsResponse0\x01\x12\x63\n\x0eUpdateStreamed\x12\x31.ansys.api.dpf.dpf_operator.v0.ArrayUpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12\x7f\n\x0bGetStreamed\x12\x38.ansys.api.dpf.dpf_operator.v0.OperatorEvaluationRequest\x1a\x34.ansys.api.dpf.dpf_operator.v0.ArrayOperatorResponse0\x01\x42\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Operator.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -43,44 +43,44 @@ _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_options = b'8\001' _globals['_SPECIFICATION_PROPERTIESENTRY']._options = None _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_options = b'8\001' - _globals['_OPERATOR']._serialized_start=350 - _globals['_OPERATOR']._serialized_end=427 - _globals['_SPECIFICATION']._serialized_start=430 - _globals['_SPECIFICATION']._serialized_end=1078 - _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_start=818 - _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_end=921 - _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_start=923 - _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_end=1027 - _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_start=1029 - _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_end=1078 - _globals['_PINSPECIFICATION']._serialized_start=1081 - _globals['_PINSPECIFICATION']._serialized_end=1215 - _globals['_OPERATORINPUT']._serialized_start=1217 - _globals['_OPERATORINPUT']._serialized_end=1306 - _globals['_UPDATEREQUEST']._serialized_start=1309 - _globals['_UPDATEREQUEST']._serialized_end=2498 - _globals['_ARRAYUPDATEREQUEST']._serialized_start=2501 - _globals['_ARRAYUPDATEREQUEST']._serialized_end=2675 - _globals['_UPDATECONFIGREQUEST']._serialized_start=2678 - _globals['_UPDATECONFIGREQUEST']._serialized_end=2818 - _globals['_OPERATOREVALUATIONREQUEST']._serialized_start=2821 - _globals['_OPERATOREVALUATIONREQUEST']._serialized_end=3003 - _globals['_CREATEOPERATORREQUEST']._serialized_start=3005 - _globals['_CREATEOPERATORREQUEST']._serialized_end=3108 - _globals['_OPERATORRESPONSE']._serialized_start=3111 - _globals['_OPERATORRESPONSE']._serialized_end=4055 - _globals['_ARRAYOPERATORRESPONSE']._serialized_start=4057 - _globals['_ARRAYOPERATORRESPONSE']._serialized_end=4125 - _globals['_LISTRESPONSE']._serialized_start=4128 - _globals['_LISTRESPONSE']._serialized_end=4285 - _globals['_GETSTATUSREQUEST']._serialized_start=4287 - _globals['_GETSTATUSREQUEST']._serialized_end=4358 - _globals['_GETSTATUSRESPONSE']._serialized_start=4360 - _globals['_GETSTATUSRESPONSE']._serialized_end=4395 - _globals['_LISTALLOPERATORSREQUEST']._serialized_start=4397 - _globals['_LISTALLOPERATORSREQUEST']._serialized_end=4422 - _globals['_LISTALLOPERATORSRESPONSE']._serialized_start=4424 - _globals['_LISTALLOPERATORSRESPONSE']._serialized_end=4465 - _globals['_OPERATORSERVICE']._serialized_start=4468 - _globals['_OPERATORSERVICE']._serialized_end=5541 + _globals['_OPERATOR']._serialized_start=358 + _globals['_OPERATOR']._serialized_end=435 + _globals['_SPECIFICATION']._serialized_start=438 + _globals['_SPECIFICATION']._serialized_end=1086 + _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_start=826 + _globals['_SPECIFICATION_MAPINPUTPINSPECENTRY']._serialized_end=929 + _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_start=931 + _globals['_SPECIFICATION_MAPOUTPUTPINSPECENTRY']._serialized_end=1035 + _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_start=1037 + _globals['_SPECIFICATION_PROPERTIESENTRY']._serialized_end=1086 + _globals['_PINSPECIFICATION']._serialized_start=1089 + _globals['_PINSPECIFICATION']._serialized_end=1223 + _globals['_OPERATORINPUT']._serialized_start=1225 + _globals['_OPERATORINPUT']._serialized_end=1314 + _globals['_UPDATEREQUEST']._serialized_start=1317 + _globals['_UPDATEREQUEST']._serialized_end=2506 + _globals['_ARRAYUPDATEREQUEST']._serialized_start=2509 + _globals['_ARRAYUPDATEREQUEST']._serialized_end=2683 + _globals['_UPDATECONFIGREQUEST']._serialized_start=2686 + _globals['_UPDATECONFIGREQUEST']._serialized_end=2826 + _globals['_OPERATOREVALUATIONREQUEST']._serialized_start=2829 + _globals['_OPERATOREVALUATIONREQUEST']._serialized_end=3011 + _globals['_CREATEOPERATORREQUEST']._serialized_start=3013 + _globals['_CREATEOPERATORREQUEST']._serialized_end=3116 + _globals['_OPERATORRESPONSE']._serialized_start=3119 + _globals['_OPERATORRESPONSE']._serialized_end=4063 + _globals['_ARRAYOPERATORRESPONSE']._serialized_start=4065 + _globals['_ARRAYOPERATORRESPONSE']._serialized_end=4133 + _globals['_LISTRESPONSE']._serialized_start=4136 + _globals['_LISTRESPONSE']._serialized_end=4293 + _globals['_GETSTATUSREQUEST']._serialized_start=4295 + _globals['_GETSTATUSREQUEST']._serialized_end=4366 + _globals['_GETSTATUSRESPONSE']._serialized_start=4368 + _globals['_GETSTATUSRESPONSE']._serialized_end=4403 + _globals['_LISTALLOPERATORSREQUEST']._serialized_start=4405 + _globals['_LISTALLOPERATORSREQUEST']._serialized_end=4430 + _globals['_LISTALLOPERATORSRESPONSE']._serialized_start=4432 + _globals['_LISTALLOPERATORSRESPONSE']._serialized_end=4473 + _globals['_OPERATORSERVICE']._serialized_start=4476 + _globals['_OPERATORSERVICE']._serialized_end=5549 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/scoping_pb2.py b/src/ansys/grpc/dpf/scoping_pb2.py index 6d121623fe..0630e9b4cf 100644 --- a/src/ansys/grpc/dpf/scoping_pb2.py +++ b/src/ansys/grpc/dpf/scoping_pb2.py @@ -13,9 +13,10 @@ import ansys.grpc.dpf.base_pb2 as base__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rscoping.proto\x12\x18\x61nsys.api.dpf.scoping.v0\x1a\nbase.proto\">\n\x07Scoping\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xc1\x01\n\rUpdateRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x33\n\x08location\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.LocationH\x00\x12\x35\n\x08index_id\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.IndexIdH\x00\x42\x10\n\x0eupdate_request\"U\n\x10UpdateIdsRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"$\n\x07IndexId\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x02 \x01(\x05\"v\n\x0c\x43ountRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"C\n\x13GetLocationResponse\x12,\n\x03loc\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\"o\n\nGetRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x0c\n\x02id\x18\x02 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x03 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"<\n\x0bGetResponse\x12\x0c\n\x02id\x18\x01 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\x32\xb1\x05\n\x0eScopingService\x12I\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a!.ansys.api.dpf.scoping.v0.Scoping\x12O\n\x06Update\x12\'.ansys.api.dpf.scoping.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\tUpdateIds\x12*.ansys.api.dpf.scoping.v0.UpdateIdsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12S\n\x04List\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a&.ansys.api.dpf.scoping.v0.ListResponse0\x01\x12U\n\x05\x43ount\x12&.ansys.api.dpf.scoping.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12_\n\x0bGetLocation\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a-.ansys.api.dpf.scoping.v0.GetLocationResponse\x12R\n\x03Get\x12$.ansys.api.dpf.scoping.v0.GetRequest\x1a%.ansys.api.dpf.scoping.v0.GetResponse\x12I\n\x06\x44\x65lete\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Scoping.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\rscoping.proto\x12\x18\x61nsys.api.dpf.scoping.v0\x1a\nbase.proto\x1a\x18\x63ollection_message.proto\">\n\x07Scoping\x12\x33\n\x02id\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.base.v0.EntityIdentifier\"\xc1\x01\n\rUpdateRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x33\n\x08location\x18\x03 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.LocationH\x00\x12\x35\n\x08index_id\x18\x04 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.IndexIdH\x00\x42\x10\n\x0eupdate_request\"U\n\x10UpdateIdsRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\r\n\x05\x61rray\x18\x02 \x01(\x0c\"$\n\x07IndexId\x12\n\n\x02id\x18\x01 \x01(\x05\x12\r\n\x05index\x18\x02 \x01(\x05\"v\n\x0c\x43ountRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x32\n\x06\x65ntity\x18\x02 \x01(\x0e\x32\".ansys.api.dpf.base.v0.CountEntity\"C\n\x13GetLocationResponse\x12,\n\x03loc\x18\x01 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\"o\n\nGetRequest\x12\x32\n\x07scoping\x18\x01 \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping\x12\x0c\n\x02id\x18\x02 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x03 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"<\n\x0bGetResponse\x12\x0c\n\x02id\x18\x01 \x01(\x05H\x00\x12\x0f\n\x05index\x18\x02 \x01(\x05H\x00\x42\x0e\n\x0ctype_request\"\x1d\n\x0cListResponse\x12\r\n\x05\x61rray\x18\x01 \x01(\x0c\"\x7f\n\x14SingleScopingAllData\x12\x34\n\x03ids\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.Collection\x12\x31\n\x08location\x18\x02 \x01(\x0b\x32\x1f.ansys.api.dpf.base.v0.Location\"K\n\x07\x41llData\x12@\n\x08scopings\x18\x01 \x03(\x0b\x32..ansys.api.dpf.scoping.v0.SingleScopingAllData\"M\n\x16\x43reateWithDataResponse\x12\x33\n\x08scopings\x18\x01 \x03(\x0b\x32!.ansys.api.dpf.scoping.v0.Scoping2\x9c\x06\n\x0eScopingService\x12I\n\x06\x43reate\x12\x1c.ansys.api.dpf.base.v0.Empty\x1a!.ansys.api.dpf.scoping.v0.Scoping\x12i\n\x0e\x43reateWithData\x12!.ansys.api.dpf.scoping.v0.AllData\x1a\x30.ansys.api.dpf.scoping.v0.CreateWithDataResponse(\x01\x30\x01\x12O\n\x06Update\x12\'.ansys.api.dpf.scoping.v0.UpdateRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12W\n\tUpdateIds\x12*.ansys.api.dpf.scoping.v0.UpdateIdsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12S\n\x04List\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a&.ansys.api.dpf.scoping.v0.ListResponse0\x01\x12U\n\x05\x43ount\x12&.ansys.api.dpf.scoping.v0.CountRequest\x1a$.ansys.api.dpf.base.v0.CountResponse\x12_\n\x0bGetLocation\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a-.ansys.api.dpf.scoping.v0.GetLocationResponse\x12R\n\x03Get\x12$.ansys.api.dpf.scoping.v0.GetRequest\x1a%.ansys.api.dpf.scoping.v0.GetResponse\x12I\n\x06\x44\x65lete\x12!.ansys.api.dpf.scoping.v0.Scoping\x1a\x1c.ansys.api.dpf.base.v0.EmptyB\x1b\xaa\x02\x18\x41nsys.Api.Dpf.Scoping.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -23,24 +24,30 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\030Ansys.Api.Dpf.Scoping.V0' - _globals['_SCOPING']._serialized_start=55 - _globals['_SCOPING']._serialized_end=117 - _globals['_UPDATEREQUEST']._serialized_start=120 - _globals['_UPDATEREQUEST']._serialized_end=313 - _globals['_UPDATEIDSREQUEST']._serialized_start=315 - _globals['_UPDATEIDSREQUEST']._serialized_end=400 - _globals['_INDEXID']._serialized_start=402 - _globals['_INDEXID']._serialized_end=438 - _globals['_COUNTREQUEST']._serialized_start=440 - _globals['_COUNTREQUEST']._serialized_end=558 - _globals['_GETLOCATIONRESPONSE']._serialized_start=560 - _globals['_GETLOCATIONRESPONSE']._serialized_end=627 - _globals['_GETREQUEST']._serialized_start=629 - _globals['_GETREQUEST']._serialized_end=740 - _globals['_GETRESPONSE']._serialized_start=742 - _globals['_GETRESPONSE']._serialized_end=802 - _globals['_LISTRESPONSE']._serialized_start=804 - _globals['_LISTRESPONSE']._serialized_end=833 - _globals['_SCOPINGSERVICE']._serialized_start=836 - _globals['_SCOPINGSERVICE']._serialized_end=1525 + _globals['_SCOPING']._serialized_start=81 + _globals['_SCOPING']._serialized_end=143 + _globals['_UPDATEREQUEST']._serialized_start=146 + _globals['_UPDATEREQUEST']._serialized_end=339 + _globals['_UPDATEIDSREQUEST']._serialized_start=341 + _globals['_UPDATEIDSREQUEST']._serialized_end=426 + _globals['_INDEXID']._serialized_start=428 + _globals['_INDEXID']._serialized_end=464 + _globals['_COUNTREQUEST']._serialized_start=466 + _globals['_COUNTREQUEST']._serialized_end=584 + _globals['_GETLOCATIONRESPONSE']._serialized_start=586 + _globals['_GETLOCATIONRESPONSE']._serialized_end=653 + _globals['_GETREQUEST']._serialized_start=655 + _globals['_GETREQUEST']._serialized_end=766 + _globals['_GETRESPONSE']._serialized_start=768 + _globals['_GETRESPONSE']._serialized_end=828 + _globals['_LISTRESPONSE']._serialized_start=830 + _globals['_LISTRESPONSE']._serialized_end=859 + _globals['_SINGLESCOPINGALLDATA']._serialized_start=861 + _globals['_SINGLESCOPINGALLDATA']._serialized_end=988 + _globals['_ALLDATA']._serialized_start=990 + _globals['_ALLDATA']._serialized_end=1065 + _globals['_CREATEWITHDATARESPONSE']._serialized_start=1067 + _globals['_CREATEWITHDATARESPONSE']._serialized_end=1144 + _globals['_SCOPINGSERVICE']._serialized_start=1147 + _globals['_SCOPINGSERVICE']._serialized_end=1943 # @@protoc_insertion_point(module_scope) diff --git a/src/ansys/grpc/dpf/scoping_pb2_grpc.py b/src/ansys/grpc/dpf/scoping_pb2_grpc.py index 99c80746e2..4abb93f046 100644 --- a/src/ansys/grpc/dpf/scoping_pb2_grpc.py +++ b/src/ansys/grpc/dpf/scoping_pb2_grpc.py @@ -20,6 +20,11 @@ def __init__(self, channel): request_serializer=base__pb2.Empty.SerializeToString, response_deserializer=scoping__pb2.Scoping.FromString, ) + self.CreateWithData = channel.stream_stream( + '/ansys.api.dpf.scoping.v0.ScopingService/CreateWithData', + request_serializer=scoping__pb2.AllData.SerializeToString, + response_deserializer=scoping__pb2.CreateWithDataResponse.FromString, + ) self.Update = channel.unary_unary( '/ansys.api.dpf.scoping.v0.ScopingService/Update', request_serializer=scoping__pb2.UpdateRequest.SerializeToString, @@ -66,6 +71,12 @@ def Create(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def CreateWithData(self, request_iterator, context): + """Missing associated documentation comment in .proto file.""" + context.set_code(grpc.StatusCode.UNIMPLEMENTED) + context.set_details('Method not implemented!') + raise NotImplementedError('Method not implemented!') + def Update(self, request, context): """Missing associated documentation comment in .proto file.""" context.set_code(grpc.StatusCode.UNIMPLEMENTED) @@ -120,6 +131,11 @@ def add_ScopingServiceServicer_to_server(servicer, server): request_deserializer=base__pb2.Empty.FromString, response_serializer=scoping__pb2.Scoping.SerializeToString, ), + 'CreateWithData': grpc.stream_stream_rpc_method_handler( + servicer.CreateWithData, + request_deserializer=scoping__pb2.AllData.FromString, + response_serializer=scoping__pb2.CreateWithDataResponse.SerializeToString, + ), 'Update': grpc.unary_unary_rpc_method_handler( servicer.Update, request_deserializer=scoping__pb2.UpdateRequest.FromString, @@ -182,6 +198,23 @@ def Create(request, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod + def CreateWithData(request_iterator, + target, + options=(), + channel_credentials=None, + call_credentials=None, + insecure=False, + compression=None, + wait_for_ready=None, + timeout=None, + metadata=None): + return grpc.experimental.stream_stream(request_iterator, target, '/ansys.api.dpf.scoping.v0.ScopingService/CreateWithData', + scoping__pb2.AllData.SerializeToString, + scoping__pb2.CreateWithDataResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + @staticmethod def Update(request, target, diff --git a/src/ansys/grpc/dpf/workflow_pb2.py b/src/ansys/grpc/dpf/workflow_pb2.py index 1046423220..a11d7bb9cc 100644 --- a/src/ansys/grpc/dpf/workflow_pb2.py +++ b/src/ansys/grpc/dpf/workflow_pb2.py @@ -12,7 +12,7 @@ _sym_db = _symbol_database.Default() -import ansys.grpc.dpf.collection_pb2 as collection__pb2 +import ansys.grpc.dpf.collection_message_pb2 as collection__message__pb2 import ansys.grpc.dpf.field_pb2 as field__pb2 import ansys.grpc.dpf.scoping_pb2 as scoping__pb2 import ansys.grpc.dpf.base_pb2 as base__pb2 @@ -29,7 +29,7 @@ import ansys.grpc.dpf.label_space_pb2 as label__space__pb2 -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.proto\x12\x19\x61nsys.api.dpf.workflow.v0\x1a\x10\x63ollection.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x1cgeneric_data_container.proto\x1a\x11label_space.proto\":\n#WorkflowFromInternalRegistryRequest\x12\x13\n\x0bregistry_id\x18\x01 \x01(\x05\"\xf2\x08\n\x17UpdateConnectionRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12_\n\x16generic_data_container\x18\x15 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\xc1\x01\n\x1c\x41rrayUpdateConnectionRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12+\n\x05\x61rray\x18\x03 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\x12)\n\x04type\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\x8a\x01\n\x0eOperatorNaming\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12;\n\x08operator\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x12\n\x08old_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nidentifier\"\x88\x02\n\x15UpdatePinNamesRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12@\n\rinputs_naming\x18\x02 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x41\n\x0eoutputs_naming\x18\x03 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x17\n\x0finputs_to_erase\x18\x04 \x03(\t\x12\x18\n\x10outputs_to_erase\x18\x05 \x03(\t\"\xbf\x01\n\x19WorkflowEvaluationRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xb0\x07\n\x10WorkflowResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"D\n\x15\x41rrayWorkflowResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"\x8a\x01\n\x13\x41\x64\x64OperatorsRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12:\n\toperators\x18\x02 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"\x89\x01\n\x1fRecordInInternalRegistryRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x12\n\nidentifier\x18\x02 \x01(\t\x12\x19\n\x11transferOwnership\x18\x03 \x01(\x08\".\n RecordInInternalRegistryResponse\x12\n\n\x02id\x18\x01 \x01(\x05\"$\n\x0f\x45xposedPinNames\x12\x11\n\tpin_names\x18\x01 \x03(\t\"\xb1\x01\n\x0cListResponse\x12\x16\n\x0eoperator_names\x18\x01 \x03(\t\x12\x43\n\x0finput_pin_names\x18\x02 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\x12\x44\n\x10output_pin_names\x18\x03 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\"\xa0\x01\n\x12GetOperatorRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x16\n\x0coperator_num\x18\x02 \x01(\x05H\x00\x12\x14\n\ninput_name\x18\x03 \x01(\tH\x00\x12\x15\n\x0boutput_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nop_request\"^\n\x13GetOperatorResponse\x12\x34\n\x03ops\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x11\n\tpin_index\x18\x02 \x03(\x05\"D\n\x19InputToOutputChainRequest\x12\x13\n\x0boutput_name\x18\x01 \x01(\t\x12\x12\n\ninput_name\x18\x02 \x01(\t\"\xdc\x01\n\x0e\x43onnectRequest\x12=\n\x08right_wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12<\n\x07left_wf\x18\x02 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12M\n\x0finput_to_output\x18\x03 \x03(\x0b\x32\x34.ansys.api.dpf.workflow.v0.InputToOutputChainRequest\"\x1c\n\nTextStream\x12\x0e\n\x06stream\x18\x01 \x01(\t\"\x8b\x01\n\rCreateRequest\x12-\n\x05\x65mpty\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.EmptyH\x00\x12\x43\n\x0bremote_copy\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.workflow.v0.RemoteCopyRequestH\x00\x42\x06\n\x04type\"]\n\x11RemoteCopyRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t2\x91\x0e\n\x0fWorkflowService\x12_\n\x06\x43reate\x12(.ansys.api.dpf.workflow.v0.CreateRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x0eLoadFromStream\x12%.ansys.api.dpf.workflow.v0.TextStream\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x86\x01\n\x17GetFromInternalRegistry\x12>.ansys.api.dpf.workflow.v0.WorkflowFromInternalRegistryRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x10UpdateConnection\x12\x32.ansys.api.dpf.workflow.v0.UpdateConnectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0eUpdatePinNames\x12\x30.ansys.api.dpf.workflow.v0.UpdatePinNamesRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\x0c\x41\x64\x64Operators\x12..ansys.api.dpf.workflow.v0.AddOperatorsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12h\n\x03Get\x12\x34.ansys.api.dpf.workflow.v0.WorkflowEvaluationRequest\x1a+.ansys.api.dpf.workflow.v0.WorkflowResponse\x12\x93\x01\n\x18RecordInInternalRegistry\x12:.ansys.api.dpf.workflow.v0.RecordInInternalRegistryRequest\x1a;.ansys.api.dpf.workflow.v0.RecordInInternalRegistryResponse\x12\\\n\x04List\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\'.ansys.api.dpf.workflow.v0.ListResponse\x12R\n\x07\x43onnect\x12).ansys.api.dpf.workflow.v0.ConnectRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12^\n\x11\x44iscoverOperators\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x63\n\rWriteToStream\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a%.ansys.api.dpf.workflow.v0.TextStream\x12l\n\x0bGetOperator\x12-.ansys.api.dpf.workflow.v0.GetOperatorRequest\x1a..ansys.api.dpf.workflow.v0.GetOperatorResponse\x12S\n\x06\x44\x65lete\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x11LoadFromBigStream\x12\x1c.ansys.api.dpf.base.v0.Array\x1a+.ansys.api.dpf.workflow_message.v0.Workflow(\x01\x12s\n\x18UpdateConnectionStreamed\x12\x37.ansys.api.dpf.workflow.v0.ArrayUpdateConnectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12w\n\x0bGetStreamed\x12\x34.ansys.api.dpf.workflow.v0.WorkflowEvaluationRequest\x1a\x30.ansys.api.dpf.workflow.v0.ArrayWorkflowResponse0\x01\x42\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Workflow.V0b\x06proto3') +DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0eworkflow.proto\x12\x19\x61nsys.api.dpf.workflow.v0\x1a\x18\x63ollection_message.proto\x1a\x0b\x66ield.proto\x1a\rscoping.proto\x1a\nbase.proto\x1a\x12\x64\x61ta_sources.proto\x1a\x13meshed_region.proto\x1a\x17time_freq_support.proto\x1a\x11result_info.proto\x1a\x0eoperator.proto\x1a\x14\x63yclic_support.proto\x1a\x16workflow_message.proto\x1a\x15\x64pf_any_message.proto\x1a\x0f\x64\x61ta_tree.proto\x1a\x1cgeneric_data_container.proto\x1a\x11label_space.proto\":\n#WorkflowFromInternalRegistryRequest\x12\x13\n\x0bregistry_id\x18\x01 \x01(\x05\"\xf2\x08\n\x17UpdateConnectionRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\n \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12<\n\x04mesh\x18\x0b \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12\x30\n\x04vint\x18\x0c \x01(\x0b\x32 .ansys.api.dpf.base.v0.IntVectorH\x00\x12\x36\n\x07vdouble\x18\r \x01(\x0b\x32#.ansys.api.dpf.base.v0.DoubleVectorH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12P\n\x11time_freq_support\x18\x0f \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12?\n\x08workflow\x18\x10 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12?\n\x0blabel_space\x18\x14 \x01(\x0b\x32(.ansys.api.dpf.label_space.v0.LabelSpaceH\x00\x12_\n\x16generic_data_container\x18\x15 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x12:\n\x06\x61s_any\x18\x13 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12?\n\x07inputop\x18\x11 \x01(\x0b\x32,.ansys.api.dpf.dpf_operator.v0.OperatorInputH\x00\x42\x07\n\x05input\"\xc1\x01\n\x1c\x41rrayUpdateConnectionRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12+\n\x05\x61rray\x18\x03 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\x12)\n\x04type\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\x8a\x01\n\x0eOperatorNaming\x12\x0b\n\x03pin\x18\x02 \x01(\x05\x12\x0c\n\x04name\x18\x03 \x01(\t\x12;\n\x08operator\x18\x01 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x12\n\x08old_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nidentifier\"\x88\x02\n\x15UpdatePinNamesRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12@\n\rinputs_naming\x18\x02 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x41\n\x0eoutputs_naming\x18\x03 \x03(\x0b\x32).ansys.api.dpf.workflow.v0.OperatorNaming\x12\x17\n\x0finputs_to_erase\x18\x04 \x03(\t\x12\x18\n\x10outputs_to_erase\x18\x05 \x03(\t\"\xbf\x01\n\x19WorkflowEvaluationRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x10\n\x08pin_name\x18\x02 \x01(\t\x12)\n\x04type\x18\x03 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\x12,\n\x07subtype\x18\x04 \x01(\x0e\x32\x1b.ansys.api.dpf.base.v0.Type\"\xb0\x07\n\x10WorkflowResponse\x12\r\n\x03str\x18\x03 \x01(\tH\x00\x12\r\n\x03int\x18\x04 \x01(\x05H\x00\x12\x10\n\x06\x64ouble\x18\x05 \x01(\x01H\x00\x12\x0e\n\x04\x62ool\x18\x06 \x01(\x08H\x00\x12.\n\x05\x66ield\x18\x07 \x01(\x0b\x32\x1d.ansys.api.dpf.field.v0.FieldH\x00\x12=\n\ncollection\x18\x08 \x01(\x0b\x32\'.ansys.api.dpf.collection.v0.CollectionH\x00\x12\x34\n\x07scoping\x18\t \x01(\x0b\x32!.ansys.api.dpf.scoping.v0.ScopingH\x00\x12<\n\x04mesh\x18\n \x01(\x0b\x32,.ansys.api.dpf.meshed_region.v0.MeshedRegionH\x00\x12?\n\x0bresult_info\x18\x0b \x01(\x0b\x32(.ansys.api.dpf.result_info.v0.ResultInfoH\x00\x12P\n\x11time_freq_support\x18\x0c \x01(\x0b\x32\x33.ansys.api.dpf.time_freq_support.v0.TimeFreqSupportH\x00\x12\x42\n\x0c\x64\x61ta_sources\x18\r \x01(\x0b\x32*.ansys.api.dpf.data_sources.v0.DataSourcesH\x00\x12\x45\n\x0b\x63yc_support\x18\x0e \x01(\x0b\x32..ansys.api.dpf.cyclic_support.v0.CyclicSupportH\x00\x12?\n\x08workflow\x18\x0f \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.WorkflowH\x00\x12\x37\n\x03\x61ny\x18\x10 \x01(\x0b\x32(.ansys.api.dpf.dpf_any_message.v0.DpfAnyH\x00\x12;\n\x08operator\x18\x11 \x01(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.OperatorH\x00\x12\x39\n\tdata_tree\x18\x12 \x01(\x0b\x32$.ansys.api.dpf.data_tree.v0.DataTreeH\x00\x12_\n\x16generic_data_container\x18\x13 \x01(\x0b\x32=.ansys.api.dpf.generic_data_container.v0.GenericDataContainerH\x00\x42\x08\n\x06output\"D\n\x15\x41rrayWorkflowResponse\x12+\n\x05\x61rray\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.Array\"\x8a\x01\n\x13\x41\x64\x64OperatorsRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12:\n\toperators\x18\x02 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\"\x89\x01\n\x1fRecordInInternalRegistryRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x12\n\nidentifier\x18\x02 \x01(\t\x12\x19\n\x11transferOwnership\x18\x03 \x01(\x08\".\n RecordInInternalRegistryResponse\x12\n\n\x02id\x18\x01 \x01(\x05\"$\n\x0f\x45xposedPinNames\x12\x11\n\tpin_names\x18\x01 \x03(\t\"\xb1\x01\n\x0cListResponse\x12\x16\n\x0eoperator_names\x18\x01 \x03(\t\x12\x43\n\x0finput_pin_names\x18\x02 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\x12\x44\n\x10output_pin_names\x18\x03 \x01(\x0b\x32*.ansys.api.dpf.workflow.v0.ExposedPinNames\"\xa0\x01\n\x12GetOperatorRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x16\n\x0coperator_num\x18\x02 \x01(\x05H\x00\x12\x14\n\ninput_name\x18\x03 \x01(\tH\x00\x12\x15\n\x0boutput_name\x18\x04 \x01(\tH\x00\x42\x0c\n\nop_request\"^\n\x13GetOperatorResponse\x12\x34\n\x03ops\x18\x01 \x03(\x0b\x32\'.ansys.api.dpf.dpf_operator.v0.Operator\x12\x11\n\tpin_index\x18\x02 \x03(\x05\"D\n\x19InputToOutputChainRequest\x12\x13\n\x0boutput_name\x18\x01 \x01(\t\x12\x12\n\ninput_name\x18\x02 \x01(\t\"\xdc\x01\n\x0e\x43onnectRequest\x12=\n\x08right_wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12<\n\x07left_wf\x18\x02 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12M\n\x0finput_to_output\x18\x03 \x03(\x0b\x32\x34.ansys.api.dpf.workflow.v0.InputToOutputChainRequest\"\x1c\n\nTextStream\x12\x0e\n\x06stream\x18\x01 \x01(\t\"\x8b\x01\n\rCreateRequest\x12-\n\x05\x65mpty\x18\x01 \x01(\x0b\x32\x1c.ansys.api.dpf.base.v0.EmptyH\x00\x12\x43\n\x0bremote_copy\x18\x02 \x01(\x0b\x32,.ansys.api.dpf.workflow.v0.RemoteCopyRequestH\x00\x42\x06\n\x04type\"]\n\x11RemoteCopyRequest\x12\x37\n\x02wf\x18\x01 \x01(\x0b\x32+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x0f\n\x07\x61\x64\x64ress\x18\x02 \x01(\t2\x91\x0e\n\x0fWorkflowService\x12_\n\x06\x43reate\x12(.ansys.api.dpf.workflow.v0.CreateRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x0eLoadFromStream\x12%.ansys.api.dpf.workflow.v0.TextStream\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x86\x01\n\x17GetFromInternalRegistry\x12>.ansys.api.dpf.workflow.v0.WorkflowFromInternalRegistryRequest\x1a+.ansys.api.dpf.workflow_message.v0.Workflow\x12\x64\n\x10UpdateConnection\x12\x32.ansys.api.dpf.workflow.v0.UpdateConnectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x0eUpdatePinNames\x12\x30.ansys.api.dpf.workflow.v0.UpdatePinNamesRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\\\n\x0c\x41\x64\x64Operators\x12..ansys.api.dpf.workflow.v0.AddOperatorsRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12h\n\x03Get\x12\x34.ansys.api.dpf.workflow.v0.WorkflowEvaluationRequest\x1a+.ansys.api.dpf.workflow.v0.WorkflowResponse\x12\x93\x01\n\x18RecordInInternalRegistry\x12:.ansys.api.dpf.workflow.v0.RecordInInternalRegistryRequest\x1a;.ansys.api.dpf.workflow.v0.RecordInInternalRegistryResponse\x12\\\n\x04List\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\'.ansys.api.dpf.workflow.v0.ListResponse\x12R\n\x07\x43onnect\x12).ansys.api.dpf.workflow.v0.ConnectRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12^\n\x11\x44iscoverOperators\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12\x63\n\rWriteToStream\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a%.ansys.api.dpf.workflow.v0.TextStream\x12l\n\x0bGetOperator\x12-.ansys.api.dpf.workflow.v0.GetOperatorRequest\x1a..ansys.api.dpf.workflow.v0.GetOperatorResponse\x12S\n\x06\x44\x65lete\x12+.ansys.api.dpf.workflow_message.v0.Workflow\x1a\x1c.ansys.api.dpf.base.v0.Empty\x12`\n\x11LoadFromBigStream\x12\x1c.ansys.api.dpf.base.v0.Array\x1a+.ansys.api.dpf.workflow_message.v0.Workflow(\x01\x12s\n\x18UpdateConnectionStreamed\x12\x37.ansys.api.dpf.workflow.v0.ArrayUpdateConnectionRequest\x1a\x1c.ansys.api.dpf.base.v0.Empty(\x01\x12w\n\x0bGetStreamed\x12\x34.ansys.api.dpf.workflow.v0.WorkflowEvaluationRequest\x1a\x30.ansys.api.dpf.workflow.v0.ArrayWorkflowResponse0\x01\x42\x1c\xaa\x02\x19\x41nsys.Api.Dpf.Workflow.V0b\x06proto3') _globals = globals() _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals) @@ -37,46 +37,46 @@ if _descriptor._USE_C_DESCRIPTORS == False: _globals['DESCRIPTOR']._options = None _globals['DESCRIPTOR']._serialized_options = b'\252\002\031Ansys.Api.Dpf.Workflow.V0' - _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_start=339 - _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_end=397 - _globals['_UPDATECONNECTIONREQUEST']._serialized_start=400 - _globals['_UPDATECONNECTIONREQUEST']._serialized_end=1538 - _globals['_ARRAYUPDATECONNECTIONREQUEST']._serialized_start=1541 - _globals['_ARRAYUPDATECONNECTIONREQUEST']._serialized_end=1734 - _globals['_OPERATORNAMING']._serialized_start=1737 - _globals['_OPERATORNAMING']._serialized_end=1875 - _globals['_UPDATEPINNAMESREQUEST']._serialized_start=1878 - _globals['_UPDATEPINNAMESREQUEST']._serialized_end=2142 - _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_start=2145 - _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_end=2336 - _globals['_WORKFLOWRESPONSE']._serialized_start=2339 - _globals['_WORKFLOWRESPONSE']._serialized_end=3283 - _globals['_ARRAYWORKFLOWRESPONSE']._serialized_start=3285 - _globals['_ARRAYWORKFLOWRESPONSE']._serialized_end=3353 - _globals['_ADDOPERATORSREQUEST']._serialized_start=3356 - _globals['_ADDOPERATORSREQUEST']._serialized_end=3494 - _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_start=3497 - _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_end=3634 - _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_start=3636 - _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_end=3682 - _globals['_EXPOSEDPINNAMES']._serialized_start=3684 - _globals['_EXPOSEDPINNAMES']._serialized_end=3720 - _globals['_LISTRESPONSE']._serialized_start=3723 - _globals['_LISTRESPONSE']._serialized_end=3900 - _globals['_GETOPERATORREQUEST']._serialized_start=3903 - _globals['_GETOPERATORREQUEST']._serialized_end=4063 - _globals['_GETOPERATORRESPONSE']._serialized_start=4065 - _globals['_GETOPERATORRESPONSE']._serialized_end=4159 - _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_start=4161 - _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_end=4229 - _globals['_CONNECTREQUEST']._serialized_start=4232 - _globals['_CONNECTREQUEST']._serialized_end=4452 - _globals['_TEXTSTREAM']._serialized_start=4454 - _globals['_TEXTSTREAM']._serialized_end=4482 - _globals['_CREATEREQUEST']._serialized_start=4485 - _globals['_CREATEREQUEST']._serialized_end=4624 - _globals['_REMOTECOPYREQUEST']._serialized_start=4626 - _globals['_REMOTECOPYREQUEST']._serialized_end=4719 - _globals['_WORKFLOWSERVICE']._serialized_start=4722 - _globals['_WORKFLOWSERVICE']._serialized_end=6531 + _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_start=347 + _globals['_WORKFLOWFROMINTERNALREGISTRYREQUEST']._serialized_end=405 + _globals['_UPDATECONNECTIONREQUEST']._serialized_start=408 + _globals['_UPDATECONNECTIONREQUEST']._serialized_end=1546 + _globals['_ARRAYUPDATECONNECTIONREQUEST']._serialized_start=1549 + _globals['_ARRAYUPDATECONNECTIONREQUEST']._serialized_end=1742 + _globals['_OPERATORNAMING']._serialized_start=1745 + _globals['_OPERATORNAMING']._serialized_end=1883 + _globals['_UPDATEPINNAMESREQUEST']._serialized_start=1886 + _globals['_UPDATEPINNAMESREQUEST']._serialized_end=2150 + _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_start=2153 + _globals['_WORKFLOWEVALUATIONREQUEST']._serialized_end=2344 + _globals['_WORKFLOWRESPONSE']._serialized_start=2347 + _globals['_WORKFLOWRESPONSE']._serialized_end=3291 + _globals['_ARRAYWORKFLOWRESPONSE']._serialized_start=3293 + _globals['_ARRAYWORKFLOWRESPONSE']._serialized_end=3361 + _globals['_ADDOPERATORSREQUEST']._serialized_start=3364 + _globals['_ADDOPERATORSREQUEST']._serialized_end=3502 + _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_start=3505 + _globals['_RECORDININTERNALREGISTRYREQUEST']._serialized_end=3642 + _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_start=3644 + _globals['_RECORDININTERNALREGISTRYRESPONSE']._serialized_end=3690 + _globals['_EXPOSEDPINNAMES']._serialized_start=3692 + _globals['_EXPOSEDPINNAMES']._serialized_end=3728 + _globals['_LISTRESPONSE']._serialized_start=3731 + _globals['_LISTRESPONSE']._serialized_end=3908 + _globals['_GETOPERATORREQUEST']._serialized_start=3911 + _globals['_GETOPERATORREQUEST']._serialized_end=4071 + _globals['_GETOPERATORRESPONSE']._serialized_start=4073 + _globals['_GETOPERATORRESPONSE']._serialized_end=4167 + _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_start=4169 + _globals['_INPUTTOOUTPUTCHAINREQUEST']._serialized_end=4237 + _globals['_CONNECTREQUEST']._serialized_start=4240 + _globals['_CONNECTREQUEST']._serialized_end=4460 + _globals['_TEXTSTREAM']._serialized_start=4462 + _globals['_TEXTSTREAM']._serialized_end=4490 + _globals['_CREATEREQUEST']._serialized_start=4493 + _globals['_CREATEREQUEST']._serialized_end=4632 + _globals['_REMOTECOPYREQUEST']._serialized_start=4634 + _globals['_REMOTECOPYREQUEST']._serialized_end=4727 + _globals['_WORKFLOWSERVICE']._serialized_start=4730 + _globals['_WORKFLOWSERVICE']._serialized_end=6539 # @@protoc_insertion_point(module_scope) diff --git a/tests/conftest.py b/tests/conftest.py index 9c83b3ad2c..634396aee9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -26,20 +26,20 @@ pytest as a session fixture """ -import os import functools +import os from pathlib import Path +import warnings import psutil import pytest -import ansys.dpf.core.server_types from ansys.dpf import core from ansys.dpf.core import examples -from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols -from ansys.dpf.core.check_version import meets_version, get_server_version +from ansys.dpf.core.check_version import get_server_version, meets_version +from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig +import ansys.dpf.core.server_types from ansys.dpf.gate.load_api import _try_use_gatebin -import warnings ACCEPTABLE_FAILURE_RATE = 0 diff --git a/tests/entry/conftest.py b/tests/entry/conftest.py index 236c6c09b0..01e1a0bf70 100644 --- a/tests/entry/conftest.py +++ b/tests/entry/conftest.py @@ -28,18 +28,18 @@ pytest as a session fixture """ +import functools import os from pathlib import Path -import functools + import pytest os.environ["ANSYS_DPF_SERVER_CONTEXT"] = "ENTRY" # MANDATORY -import ansys.dpf.core.server_types from ansys.dpf import core -from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols -from ansys.dpf.core.check_version import meets_version, get_server_version - +from ansys.dpf.core.check_version import get_server_version, meets_version +from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig +import ansys.dpf.core.server_types core.set_default_server_context(core.AvailableServerContexts.entry) # MANDATORY diff --git a/tests/entry/test_entry.py b/tests/entry/test_entry.py index af7f78b184..7ab00f28ff 100644 --- a/tests/entry/test_entry.py +++ b/tests/entry/test_entry.py @@ -23,11 +23,11 @@ import os import pytest -import conftest import ansys.dpf.core as dpf from ansys.dpf.core import examples from ansys.dpf.core.core import errors +import conftest from conftest import running_docker diff --git a/tests/operators/test_coordinate_system.py b/tests/operators/test_coordinate_system.py index f8947b04ec..00261741a9 100644 --- a/tests/operators/test_coordinate_system.py +++ b/tests/operators/test_coordinate_system.py @@ -21,10 +21,11 @@ # SOFTWARE. # Tests the result.coordinate_system operator +import numpy as np + import ansys.dpf.core as dpf from ansys.dpf.core import examples import conftest -import numpy as np def test_operator_coordinate_system_rst(server_type): diff --git a/tests/operators/test_operator_elemental_mass.py b/tests/operators/test_operator_elemental_mass.py index e33940d6dc..14e51aef99 100644 --- a/tests/operators/test_operator_elemental_mass.py +++ b/tests/operators/test_operator_elemental_mass.py @@ -20,9 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import conftest import pytest + import ansys.dpf.core as dpf +import conftest @pytest.mark.skipif( diff --git a/tests/operators/test_operator_mesh_plan_clip.py b/tests/operators/test_operator_mesh_plan_clip.py index 9e634ee9b2..bf8917448d 100644 --- a/tests/operators/test_operator_mesh_plan_clip.py +++ b/tests/operators/test_operator_mesh_plan_clip.py @@ -20,9 +20,10 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import pytest + import ansys.dpf.core as dpf import conftest -import pytest @pytest.mark.skipif( diff --git a/tests/slow/test_remoteworkflow.py b/tests/slow/test_remoteworkflow.py index 31b9bcb58c..357cddf6c8 100644 --- a/tests/slow/test_remoteworkflow.py +++ b/tests/slow/test_remoteworkflow.py @@ -24,9 +24,8 @@ import pytest from ansys.dpf import core -from ansys.dpf.core import examples -from ansys.dpf.core import operators as ops -from ansys.dpf.core.check_version import meets_version, get_server_version +from ansys.dpf.core import examples, operators as ops +from ansys.dpf.core.check_version import get_server_version, meets_version from conftest import local_servers SERVER_VERSION_HIGHER_THAN_3_0 = meets_version(get_server_version(core._global_server()), "3.0") diff --git a/tests/slow/test_slow.py b/tests/slow/test_slow.py index 3be3525dfa..4ac8975ee5 100644 --- a/tests/slow/test_slow.py +++ b/tests/slow/test_slow.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import pytest import numpy as np +import pytest from ansys.dpf import core as dpf from ansys.dpf.core import examples diff --git a/tests/test_animation.py b/tests/test_animation.py index a5662ced49..4c95f8c71f 100644 --- a/tests/test_animation.py +++ b/tests/test_animation.py @@ -26,10 +26,7 @@ import pytest from ansys.dpf import core as dpf -from ansys.dpf.core import misc -from ansys.dpf.core import examples -from ansys.dpf.core import animation - +from ansys.dpf.core import animation, examples, misc if misc.module_exists("pyvista"): HAS_PYVISTA = True diff --git a/tests/test_animator.py b/tests/test_animator.py index 4986546ab6..402e4f6617 100644 --- a/tests/test_animator.py +++ b/tests/test_animator.py @@ -26,8 +26,7 @@ import pytest from ansys.dpf import core as dpf -from ansys.dpf.core import misc, Workflow -from ansys.dpf.core import examples +from ansys.dpf.core import Workflow, examples, misc if misc.module_exists("pyvista"): HAS_PYVISTA = True diff --git a/tests/test_any.py b/tests/test_any.py index 85965e843b..28a29a5631 100644 --- a/tests/test_any.py +++ b/tests/test_any.py @@ -22,8 +22,8 @@ import pytest -import conftest from ansys.dpf import core as dpf +import conftest @conftest.raises_for_servers_version_under("7.0") diff --git a/tests/test_cff.py b/tests/test_cff.py index 70ebc18edf..5c0c4fdb03 100644 --- a/tests/test_cff.py +++ b/tests/test_cff.py @@ -21,8 +21,9 @@ # SOFTWARE. import pytest -import conftest + from ansys.dpf import core as dpf +import conftest @pytest.mark.skipif( diff --git a/tests/test_checkversion.py b/tests/test_checkversion.py index 5df50ce4ab..4596a0b665 100644 --- a/tests/test_checkversion.py +++ b/tests/test_checkversion.py @@ -22,9 +22,7 @@ import pytest -from ansys.dpf.core import check_version -from ansys.dpf.core import errors as dpf_errors - +from ansys.dpf.core import check_version, errors as dpf_errors from ansys.dpf.gate.load_api import _find_outdated_ansys_version diff --git a/tests/test_codegeneration.py b/tests/test_codegeneration.py index 8c90344f8a..e0543ae8f0 100644 --- a/tests/test_codegeneration.py +++ b/tests/test_codegeneration.py @@ -21,17 +21,17 @@ # SOFTWARE. # -*- coding: utf-8 -*- -import os import copy -import tempfile +import os from pathlib import Path +import tempfile -import ansys.grpc.dpf import numpy as np -import ansys.dpf.core.operators as op from ansys.dpf import core from ansys.dpf.core import examples +import ansys.dpf.core.operators as op +import ansys.grpc.dpf def test_workflowwithgeneratedcode(allkindofcomplexity): diff --git a/tests/test_collection.py b/tests/test_collection.py index 1a87fd2950..799d567321 100644 --- a/tests/test_collection.py +++ b/tests/test_collection.py @@ -22,26 +22,27 @@ # -*- coding: utf-8 -*- -import conftest +from dataclasses import dataclass, field +import random -import pytest import numpy as np +import pytest + from ansys.dpf.core import ( CustomTypeField, CustomTypeFieldsCollection, + GenericDataContainer, GenericDataContainersCollection, - StringFieldsCollection, StringField, - GenericDataContainer, - operators, + StringFieldsCollection, Workflow, fields_factory, + operators, ) from ansys.dpf.core.collection import Collection -from ansys.dpf.core.time_freq_support import TimeFreqSupport from ansys.dpf.core.generic_support import GenericSupport -import random -from dataclasses import dataclass, field +from ansys.dpf.core.time_freq_support import TimeFreqSupport +import conftest @conftest.raises_for_servers_version_under("8.1") diff --git a/tests/test_custom_type_field.py b/tests/test_custom_type_field.py index 2cd0d68ba0..c7b3a126a6 100644 --- a/tests/test_custom_type_field.py +++ b/tests/test_custom_type_field.py @@ -22,10 +22,9 @@ import numpy as np -import conftest - from ansys import dpf from ansys.dpf import core +import conftest @conftest.raises_for_servers_version_under("5.0") diff --git a/tests/test_cyclic_support.py b/tests/test_cyclic_support.py index 31ca521870..25afdc7fcb 100644 --- a/tests/test_cyclic_support.py +++ b/tests/test_cyclic_support.py @@ -22,13 +22,13 @@ import gc import weakref -import numpy as np -import conftest +import numpy as np import pytest from ansys import dpf from ansys.dpf import core as dpf +import conftest def test_cyc_support_from_model(cyclic_lin_rst): diff --git a/tests/test_data_tree.py b/tests/test_data_tree.py index b3226ca153..15215cd482 100644 --- a/tests/test_data_tree.py +++ b/tests/test_data_tree.py @@ -20,11 +20,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf import core as dpf import os +from pathlib import Path + import pytest + +from ansys.dpf import core as dpf import conftest -from pathlib import Path @conftest.raises_for_servers_version_under("4.0") diff --git a/tests/test_datasources.py b/tests/test_datasources.py index 1c06c110d5..162b55cd41 100644 --- a/tests/test_datasources.py +++ b/tests/test_datasources.py @@ -20,11 +20,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import weakref + import pytest from ansys import dpf import conftest -import weakref skip_always = pytest.mark.skipif(True, reason="Investigate why this is failing") diff --git a/tests/test_examples.py b/tests/test_examples.py index 19fa84c9d7..5fd5a91461 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -27,9 +27,7 @@ import pytest from ansys.dpf import core as dpf -from ansys.dpf.core import Model -from ansys.dpf.core import DataSources -from ansys.dpf.core import examples +from ansys.dpf.core import DataSources, Model, examples def test_download_all_kinds_of_complexity_modal(): diff --git a/tests/test_faces.py b/tests/test_faces.py index a6ea86429e..208ad1627d 100644 --- a/tests/test_faces.py +++ b/tests/test_faces.py @@ -21,10 +21,11 @@ # SOFTWARE. import pytest -import conftest + from ansys.dpf import core as dpf -from ansys.dpf.core.elements import element_types from ansys.dpf.core import mesh_scoping_factory +from ansys.dpf.core.elements import element_types +import conftest @pytest.fixture() diff --git a/tests/test_factories.py b/tests/test_factories.py index 7cad6be157..7b1d84a050 100644 --- a/tests/test_factories.py +++ b/tests/test_factories.py @@ -23,14 +23,16 @@ import numpy as np import pytest -from ansys.dpf.core import Model -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import fields_container_factory -from ansys.dpf.core import fields_factory -from ansys.dpf.core import mesh_scoping_factory -from ansys.dpf.core import server -from ansys.dpf.core import server_factory -from ansys.dpf.core import time_freq_scoping_factory +from ansys.dpf.core import ( + Model, + errors as dpf_errors, + fields_container_factory, + fields_factory, + mesh_scoping_factory, + server, + server_factory, + time_freq_scoping_factory, +) from ansys.dpf.core.common import locations diff --git a/tests/test_field.py b/tests/test_field.py index a25b768313..fa77deec0b 100644 --- a/tests/test_field.py +++ b/tests/test_field.py @@ -20,18 +20,19 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import numpy as np -import pytest import copy import gc + +import numpy as np +import pytest + from ansys import dpf -import conftest from ansys.dpf import core -from ansys.dpf.core import FieldDefinition -from ansys.dpf.core import operators as ops -from ansys.dpf.core.common import locations, shell_layers -from conftest import running_docker, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0 +from ansys.dpf.core import FieldDefinition, operators as ops from ansys.dpf.core.check_version import server_meet_version +from ansys.dpf.core.common import locations, shell_layers +import conftest +from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0, running_docker @pytest.fixture() diff --git a/tests/test_fieldscontainer.py b/tests/test_fieldscontainer.py index 0fd8434030..325fdb4da3 100644 --- a/tests/test_fieldscontainer.py +++ b/tests/test_fieldscontainer.py @@ -20,24 +20,28 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import os import weakref import numpy as np import pytest -import os -import conftest -from ansys.dpf.core.check_version import server_meet_version from ansys.dpf import core as dpf -from ansys.dpf.core import FieldsContainer, Field, TimeFreqSupport -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import examples -from ansys.dpf.core import fields_factory -from ansys.dpf.core import operators as ops +from ansys.dpf.core import ( + Field, + FieldsContainer, + TimeFreqSupport, + errors as dpf_errors, + examples, + fields_factory, + operators as ops, +) +from ansys.dpf.core.check_version import server_meet_version from ansys.dpf.core.custom_fields_container import ( - ElShapeFieldsContainer, BodyFieldsContainer, + ElShapeFieldsContainer, ) +import conftest @pytest.fixture() diff --git a/tests/test_generic_data_container.py b/tests/test_generic_data_container.py index d9de81feeb..4aae6fb233 100644 --- a/tests/test_generic_data_container.py +++ b/tests/test_generic_data_container.py @@ -21,15 +21,15 @@ # SOFTWARE. import numpy as np +import pytest from ansys.dpf import core as dpf +import conftest from conftest import ( SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_8_0, raises_for_servers_version_under, ) -import pytest -import conftest @conftest.raises_for_servers_version_under("7.0") diff --git a/tests/test_genericsupport.py b/tests/test_genericsupport.py index 4b98379568..1e287d175f 100644 --- a/tests/test_genericsupport.py +++ b/tests/test_genericsupport.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import conftest from ansys.dpf import core as dpf +import conftest @conftest.raises_for_servers_version_under("5.0") diff --git a/tests/test_geometry.py b/tests/test_geometry.py index 3153bf62f2..d7d5dffd28 100644 --- a/tests/test_geometry.py +++ b/tests/test_geometry.py @@ -24,22 +24,22 @@ import pytest from ansys.dpf.core.geometry import ( - Points, Line, Plane, - normalize_vector, - get_plane_local_axis, - get_local_coords_from_global, + Points, get_global_coords_from_local, + get_local_coords_from_global, + get_plane_local_axis, + normalize_vector, ) from ansys.dpf.core.geometry_factory import ( - create_points, create_line_from_points, create_line_from_vector, create_plane_from_center_and_normal, - create_plane_from_points, create_plane_from_lines, create_plane_from_point_and_line, + create_plane_from_points, + create_points, get_center_from_coords, ) diff --git a/tests/test_hdf5.py b/tests/test_hdf5.py index b42cfa8e40..ce3e9e2806 100644 --- a/tests/test_hdf5.py +++ b/tests/test_hdf5.py @@ -22,7 +22,6 @@ from ansys.dpf import core - # try: # core.BaseService(load_operators=False)._load_hdf5_operators() # hdf5_loaded = True diff --git a/tests/test_incremental.py b/tests/test_incremental.py index db49c51294..25e25f47bb 100644 --- a/tests/test_incremental.py +++ b/tests/test_incremental.py @@ -20,10 +20,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf import core -from ansys.dpf.core import common import numpy as np import pytest + +from ansys.dpf import core +from ansys.dpf.core import common import conftest diff --git a/tests/test_launcher.py b/tests/test_launcher.py index ad5a6e9fc2..f8569cd54d 100644 --- a/tests/test_launcher.py +++ b/tests/test_launcher.py @@ -20,19 +20,20 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import io import os from pathlib import Path - -import pytest -import psutil import subprocess import sys -import io + +import psutil +import pytest + from ansys.dpf import core from conftest import ( SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0, - configsserver_type, config_namesserver_type, + configsserver_type, running_docker, ) @@ -217,9 +218,10 @@ def test_launch_server_full_path(self, server_config): @pytest.mark.skipif(running_docker, reason="Not made to work on docker") def test_start_local_failed_executable(remote_config_server_type): - from ansys.dpf.core.misc import get_ansys_path from pathlib import Path + from ansys.dpf.core.misc import get_ansys_path + with pytest.raises(FileNotFoundError): path = Path(get_ansys_path()).parent.absolute() core.start_local_server(ansys_path=str(path), config=remote_config_server_type) diff --git a/tests/test_launcher_remote.py b/tests/test_launcher_remote.py index a05d7b3205..31b8734913 100644 --- a/tests/test_launcher_remote.py +++ b/tests/test_launcher_remote.py @@ -23,12 +23,12 @@ import sys from unittest.mock import create_autospec -import ansys.platform.instancemanagement as pypim import grpc import pytest from ansys.dpf.core import server_types from ansys.dpf.core.server_factory import ServerFactory +import ansys.platform.instancemanagement as pypim from conftest import running_docker @@ -38,7 +38,7 @@ def test_start_remote(monkeypatch): # Start a local DPF server and create a mock PyPIM pretending it is starting it from ansys.dpf import core - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) local_server = core.start_local_server(as_global=False, config=conf) diff --git a/tests/test_local_server.py b/tests/test_local_server.py index 2acb6741a9..48a5e8a52d 100644 --- a/tests/test_local_server.py +++ b/tests/test_local_server.py @@ -22,8 +22,8 @@ import numpy as np -from ansys.dpf.core import operators as ops from ansys import dpf +from ansys.dpf.core import operators as ops def test_add_operator_server_field(local_server): diff --git a/tests/test_lsdyna.py b/tests/test_lsdyna.py index 6de8729f8d..4e746aae3b 100644 --- a/tests/test_lsdyna.py +++ b/tests/test_lsdyna.py @@ -22,9 +22,10 @@ import numpy as np import pytest -import conftest + from ansys.dpf import core as dpf from ansys.dpf.core.check_version import server_meet_version +import conftest @pytest.mark.skipif( diff --git a/tests/test_mesh_info.py b/tests/test_mesh_info.py index 5c11532179..8b449d7901 100644 --- a/tests/test_mesh_info.py +++ b/tests/test_mesh_info.py @@ -20,13 +20,14 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import ansys.dpf.core.generic_data_container +import pytest + from ansys.dpf import core as dpf +from ansys.dpf.core import examples +import ansys.dpf.core.generic_data_container from conftest import ( SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0, ) -import pytest -from ansys.dpf.core import examples @pytest.mark.skipif( diff --git a/tests/test_meshescontainer.py b/tests/test_meshescontainer.py index 8ce6112244..7fd2d69d69 100644 --- a/tests/test_meshescontainer.py +++ b/tests/test_meshescontainer.py @@ -26,9 +26,9 @@ import pytest -import conftest from ansys import dpf from ansys.dpf.core import MeshesContainer +import conftest # TO DO: add server type diff --git a/tests/test_meshregion.py b/tests/test_meshregion.py index a47dff7ac8..d4f2574efe 100644 --- a/tests/test_meshregion.py +++ b/tests/test_meshregion.py @@ -25,8 +25,8 @@ import vtk from ansys import dpf -import conftest from ansys.dpf.core.check_version import server_meet_version +import conftest @pytest.fixture() diff --git a/tests/test_model.py b/tests/test_model.py index 54567769ce..b6122ffd30 100644 --- a/tests/test_model.py +++ b/tests/test_model.py @@ -27,9 +27,9 @@ from ansys import dpf from ansys.dpf.core import examples, misc +from ansys.dpf.core.check_version import server_meet_version from ansys.dpf.core.errors import ServerTypeError from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0 -from ansys.dpf.core.check_version import server_meet_version NO_PLOTTING = True diff --git a/tests/test_multi_server.py b/tests/test_multi_server.py index 53e5ee21e0..5778822941 100644 --- a/tests/test_multi_server.py +++ b/tests/test_multi_server.py @@ -22,11 +22,11 @@ import numpy as np import pytest -import conftest from ansys.dpf import core as dpf -from ansys.dpf.core import examples, server_types, server -from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols +from ansys.dpf.core import examples, server, server_types +from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig +import conftest if conftest.SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_6_0: dpf.set_default_server_context(dpf.AvailableServerContexts.entry) diff --git a/tests/test_operator.py b/tests/test_operator.py index 381ec03a88..bee55564dd 100644 --- a/tests/test_operator.py +++ b/tests/test_operator.py @@ -20,21 +20,20 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import copy import gc import os +from pathlib import Path import shutil import types import weakref -from pathlib import Path import numpy import numpy as np import pytest -import copy from ansys import dpf -from ansys.dpf.core import errors -from ansys.dpf.core import operators as ops +from ansys.dpf.core import errors, operators as ops from ansys.dpf.core.common import derived_class_name_to_type, record_derived_class from ansys.dpf.core.custom_container_base import CustomContainerBase from ansys.dpf.core.misc import get_ansys_path diff --git a/tests/test_parallel.py b/tests/test_parallel.py index d8e4b53efa..441045016e 100644 --- a/tests/test_parallel.py +++ b/tests/test_parallel.py @@ -26,8 +26,9 @@ """ import pytest -from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0 + from ansys.dpf import core as dpf +from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0 @pytest.mark.skipif( diff --git a/tests/test_pathsupport.py b/tests/test_pathsupport.py index bde98c0f1b..11d67992cd 100644 --- a/tests/test_pathsupport.py +++ b/tests/test_pathsupport.py @@ -21,13 +21,14 @@ # SOFTWARE. # Tests specific to pathlib.Path support as path argument instead of str -import pytest import functools import os -from conftest import running_docker +from pathlib import Path + +import pytest from ansys import dpf -from pathlib import Path +from conftest import running_docker skip_always = pytest.mark.skipif(True, reason="Investigate why this is failing") diff --git a/tests/test_plotter.py b/tests/test_plotter.py index 8129a87744..ce39cc3173 100644 --- a/tests/test_plotter.py +++ b/tests/test_plotter.py @@ -26,17 +26,15 @@ from ansys import dpf from ansys.dpf import core -from ansys.dpf.core import Model, Operator -from ansys.dpf.core import errors as dpf_errors -from ansys.dpf.core import misc +from ansys.dpf.core import Model, Operator, element_types, errors as dpf_errors, misc from ansys.dpf.core.plotter import plot_chart -from conftest import running_docker, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 -from ansys.dpf.core import element_types +from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0, running_docker if misc.module_exists("pyvista"): HAS_PYVISTA = True - from ansys.dpf.core.plotter import DpfPlotter, Plotter from pyvista.plotting.renderer import CameraPosition # noqa: F401 + + from ansys.dpf.core.plotter import DpfPlotter, Plotter else: HAS_PYVISTA = False diff --git a/tests/test_plugins.py b/tests/test_plugins.py index 7ba5bbadec..506e552039 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -24,9 +24,9 @@ import pytest -from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 from ansys.dpf import core as dpf from ansys.dpf.core import examples +from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_5_0 @pytest.fixture() diff --git a/tests/test_property_fields_container.py b/tests/test_property_fields_container.py index 104ede4bb8..5c8525b4aa 100644 --- a/tests/test_property_fields_container.py +++ b/tests/test_property_fields_container.py @@ -22,8 +22,8 @@ import pytest -from ansys.dpf.core.property_fields_container import _MockPropertyFieldsContainer, _LabelSpaceKV from ansys.dpf import core as dpf +from ansys.dpf.core.property_fields_container import _LabelSpaceKV, _MockPropertyFieldsContainer def test_property_fields_container(allkindofcomplexity, server_type): diff --git a/tests/test_propertyfield.py b/tests/test_propertyfield.py index c086802dae..031d1e9c69 100644 --- a/tests/test_propertyfield.py +++ b/tests/test_propertyfield.py @@ -20,15 +20,16 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import numpy as np -import pytest import copy -import conftest import gc +import numpy as np +import pytest + from ansys import dpf from ansys.dpf import core from ansys.dpf.core.common import locations, natures +import conftest @pytest.fixture() diff --git a/tests/test_python_plugins.py b/tests/test_python_plugins.py index 25d75b39d1..a13892612f 100644 --- a/tests/test_python_plugins.py +++ b/tests/test_python_plugins.py @@ -20,23 +20,25 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import pytest import os from pathlib import Path import platform + import numpy as np -from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0 +import pytest + from ansys.dpf import core as dpf -import conftest from ansys.dpf.core.custom_operator import update_virtual_environment_for_custom_operators from ansys.dpf.core.errors import DPFServerException from ansys.dpf.core.operator_specification import ( - CustomSpecification, - SpecificationProperties, CustomConfigOptionSpec, + CustomSpecification, PinSpecification, + SpecificationProperties, ) +import conftest from conftest import ( + SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0, SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_7_0, ) diff --git a/tests/test_remote_operator.py b/tests/test_remote_operator.py index f596e8aded..29b2f252f3 100644 --- a/tests/test_remote_operator.py +++ b/tests/test_remote_operator.py @@ -21,11 +21,12 @@ # SOFTWARE. import numpy as np -from conftest import local_servers -import conftest +import pytest + from ansys.dpf import core from ansys.dpf.core import operators as ops -import pytest +import conftest +from conftest import local_servers @pytest.mark.skipif( diff --git a/tests/test_remote_workflow.py b/tests/test_remote_workflow.py index 096d37aa10..3d893eec51 100644 --- a/tests/test_remote_workflow.py +++ b/tests/test_remote_workflow.py @@ -26,11 +26,10 @@ import pytest from ansys.dpf import core -from ansys.dpf.core import examples +from ansys.dpf.core import examples, operators as ops from ansys.dpf.core.errors import ServerTypeError -from ansys.dpf.core import operators as ops -from conftest import local_servers, running_docker import conftest +from conftest import local_servers, running_docker @pytest.mark.xfail(raises=ServerTypeError) diff --git a/tests/test_scoping.py b/tests/test_scoping.py index 62f646dd94..5903fb7abc 100644 --- a/tests/test_scoping.py +++ b/tests/test_scoping.py @@ -20,15 +20,15 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import copy + import numpy as np import pytest from ansys import dpf +from ansys.dpf.core import Scoping, errors as dpf_errors import conftest from conftest import SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_2_0 -import copy -from ansys.dpf.core import Scoping -from ansys.dpf.core import errors as dpf_errors def test_create_scoping(): diff --git a/tests/test_scopingscontainer.py b/tests/test_scopingscontainer.py index 558983faac..70c860ff8b 100644 --- a/tests/test_scopingscontainer.py +++ b/tests/test_scopingscontainer.py @@ -23,11 +23,11 @@ # -*- coding: utf-8 -*- import weakref -import pytest import numpy as np +import pytest -import conftest from ansys.dpf.core import Scoping, ScopingsContainer +import conftest @pytest.fixture() diff --git a/tests/test_server.py b/tests/test_server.py index b852f583f7..b58b90f2c3 100644 --- a/tests/test_server.py +++ b/tests/test_server.py @@ -20,28 +20,32 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -import time - -import pytest -import subprocess +import os import platform -import psutil +import subprocess import sys -import os +import time + import packaging.version +import psutil +import pytest from ansys import dpf -from ansys.dpf.core import errors, server_types -from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols -from ansys.dpf.core.server import set_server_configuration, _global_server -from ansys.dpf.core.server import start_local_server, connect_to_server -from ansys.dpf.core.server import shutdown_all_session_servers, has_local_server -from ansys.dpf.core.server import get_or_create_server -from ansys.dpf.core import server +from ansys.dpf.core import errors, server, server_types +from ansys.dpf.core.server import ( + _global_server, + connect_to_server, + get_or_create_server, + has_local_server, + set_server_configuration, + shutdown_all_session_servers, + start_local_server, +) +from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig from conftest import ( SERVERS_VERSION_GREATER_THAN_OR_EQUAL_TO_4_0, - running_docker, remove_none_available_config, + running_docker, ) server_configs, server_configs_names = remove_none_available_config( diff --git a/tests/test_service.py b/tests/test_service.py index c246aa2b38..69b9503e99 100644 --- a/tests/test_service.py +++ b/tests/test_service.py @@ -20,19 +20,18 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import datetime +from importlib import reload import os from pathlib import Path - -import pytest -import conftest import pkgutil -import datetime import platform -from importlib import reload + +import pytest from ansys import dpf -from ansys.dpf.core import path_utilities -from ansys.dpf.core import examples +from ansys.dpf.core import examples, path_utilities +import conftest from conftest import running_docker @@ -295,7 +294,7 @@ def test_dpf_join(server_type): reason="GrpcServer class is " "supported starting server version 4.0", ) def test_load_api_without_awp_root(restore_awp_root): - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig legacy_conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) loc_serv = dpf.core.start_local_server(config=legacy_conf, as_global=False) @@ -328,7 +327,7 @@ def test_load_api_without_awp_root(restore_awp_root): ) def test_load_api_with_awp_root(): # with awp_root - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False) serv_2 = dpf.core.start_local_server(config=conf, as_global=False) @@ -346,7 +345,7 @@ def test_load_api_with_awp_root(): reason="GrpcServer class is " "supported starting server version 4.0", ) def test_load_api_with_awp_root_2(): - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig legacy_conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) loc_serv = dpf.core.start_local_server(config=legacy_conf, as_global=False) @@ -373,7 +372,7 @@ def test_load_api_with_awp_root_2(): reason="GrpcServer class is " "supported starting server version 4.0", ) def test_load_api_without_awp_root_no_gatebin(restore_awp_root): - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig legacy_conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) loc_serv = dpf.core.start_local_server(config=legacy_conf, as_global=False) @@ -408,7 +407,7 @@ def test_load_api_without_awp_root_no_gatebin(restore_awp_root): ) def test_load_api_with_awp_root_no_gatebin(): # with awp_root - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=False) serv_2 = dpf.core.start_local_server(config=conf, as_global=False) @@ -430,7 +429,7 @@ def test_load_api_with_awp_root_no_gatebin(): reason="GrpcServer class is " "supported starting server version 4.0", ) def test_load_api_with_awp_root_2_no_gatebin(): - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig legacy_conf = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) loc_serv = dpf.core.start_local_server(config=legacy_conf, as_global=False) diff --git a/tests/test_session.py b/tests/test_session.py index 868f5500ac..40ad0ff945 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -21,10 +21,11 @@ # SOFTWARE. from pathlib import Path -import conftest import tempfile + from ansys.dpf import core from ansys.dpf.core import examples +import conftest def get_log_file(log_path, server): diff --git a/tests/test_stringfield.py b/tests/test_stringfield.py index b4b081bb75..2bff28325b 100644 --- a/tests/test_stringfield.py +++ b/tests/test_stringfield.py @@ -21,11 +21,11 @@ # SOFTWARE. import numpy as np -import conftest from ansys import dpf from ansys.dpf import core from ansys.dpf.core.common import locations +import conftest @conftest.raises_for_servers_version_under("5.0") diff --git a/tests/test_timefreqsupport.py b/tests/test_timefreqsupport.py index 75e2447dfd..a8862fd95d 100644 --- a/tests/test_timefreqsupport.py +++ b/tests/test_timefreqsupport.py @@ -20,14 +20,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +import weakref + import numpy as np import pytest -import weakref from ansys import dpf -from ansys.dpf.core import TimeFreqSupport, Model -from ansys.dpf.core import examples -from ansys.dpf.core import fields_factory +from ansys.dpf.core import Model, TimeFreqSupport, examples, fields_factory from ansys.dpf.core.common import locations import conftest @@ -319,8 +318,9 @@ def test_workflow_connect_get_output_time_freq_support(velocity_acceleration): @pytest.mark.skipif(True, reason="used to check memory leaks") def test_timefreqsupport_memory_leaks(): import gc + from ansys.dpf.core import start_local_server - from ansys.dpf.core.server_factory import ServerConfig, CommunicationProtocols + from ansys.dpf.core.server_factory import CommunicationProtocols, ServerConfig config = ServerConfig(protocol=CommunicationProtocols.gRPC, legacy=True) # config = ServerConfig(protocol=CommunicationProtocols.gRPC) diff --git a/tests/test_unit_systems.py b/tests/test_unit_systems.py index f62cc531b9..7f4b07e76f 100644 --- a/tests/test_unit_systems.py +++ b/tests/test_unit_systems.py @@ -21,9 +21,10 @@ # SOFTWARE. import pytest -import conftest + from ansys.dpf import core as dpf from ansys.dpf.core import errors as dpf_errors +import conftest @pytest.mark.skipif( diff --git a/tests/test_vtk_translate.py b/tests/test_vtk_translate.py index e7e70aa69a..cfb47d44e3 100644 --- a/tests/test_vtk_translate.py +++ b/tests/test_vtk_translate.py @@ -21,18 +21,19 @@ # SOFTWARE. import pytest -import conftest + import ansys.dpf.core as dpf from ansys.dpf.core import errors, misc from ansys.dpf.core.vtk_helper import ( - dpf_mesh_to_vtk, + append_field_to_grid, + append_fieldscontainer_to_grid, dpf_field_to_vtk, - dpf_meshes_to_vtk, dpf_fieldscontainer_to_vtk, + dpf_mesh_to_vtk, + dpf_meshes_to_vtk, dpf_property_field_to_vtk, - append_field_to_grid, - append_fieldscontainer_to_grid, ) +import conftest if misc.module_exists("pyvista"): HAS_PYVISTA = True diff --git a/tests/test_workflow.py b/tests/test_workflow.py index 58c4d480a0..1a89d98c6f 100644 --- a/tests/test_workflow.py +++ b/tests/test_workflow.py @@ -21,17 +21,17 @@ # SOFTWARE. from pathlib import Path +import platform import numpy import numpy as np import pytest -import platform +from ansys import dpf +from ansys.dpf.core import misc import ansys.dpf.core.operators as op from ansys.dpf.core.workflow_topology import WorkflowTopology import conftest -from ansys import dpf -from ansys.dpf.core import misc if misc.module_exists("graphviz"): HAS_GRAPHVIZ = True @@ -914,8 +914,8 @@ def test_create_on_other_server_and_connect_workflow(allkindofcomplexity, local_ def deep_copy_using_workflow(dpf_entity, server, stream_type=1): + from ansys.dpf.core.common import types, types_enum_to_types from ansys.dpf.core.operators.serialization import serializer_to_string, string_deserializer - from ansys.dpf.core.common import types_enum_to_types, types entity_server = dpf_entity._server if hasattr(dpf_entity, "_server") else None serializer_wf = dpf.core.Workflow(server=entity_server) diff --git a/tests/testfiles/pythonPlugins/all_types/dpf_types_op.py b/tests/testfiles/pythonPlugins/all_types/dpf_types_op.py index 14173dca17..1a47d4ea24 100644 --- a/tests/testfiles/pythonPlugins/all_types/dpf_types_op.py +++ b/tests/testfiles/pythonPlugins/all_types/dpf_types_op.py @@ -20,20 +20,20 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf.core.custom_operator import CustomOperatorBase from ansys.dpf.core import ( + data_sources, + data_tree, field, - scoping, fields_container, + generic_data_container, meshes_container, - scopings_container, property_field, - data_sources, + scoping, + scopings_container, types, workflow, - data_tree, - generic_data_container, ) +from ansys.dpf.core.custom_operator import CustomOperatorBase class ForwardFieldOperator(CustomOperatorBase): diff --git a/tests/testfiles/pythonPlugins/all_types/integral_types_op.py b/tests/testfiles/pythonPlugins/all_types/integral_types_op.py index 8dd2b9a392..53c6e5242e 100644 --- a/tests/testfiles/pythonPlugins/all_types/integral_types_op.py +++ b/tests/testfiles/pythonPlugins/all_types/integral_types_op.py @@ -20,13 +20,13 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from ansys.dpf.core import types from ansys.dpf.core.custom_operator import CustomOperatorBase from ansys.dpf.core.operator_specification import ( CustomSpecification, PinSpecification, SpecificationProperties, ) -from ansys.dpf.core import types class ForwardIntOperator(CustomOperatorBase): diff --git a/tests/testfiles/pythonPlugins/all_types/load_operators_func.py b/tests/testfiles/pythonPlugins/all_types/load_operators_func.py index e70c71f8b6..2c444b2afa 100644 --- a/tests/testfiles/pythonPlugins/all_types/load_operators_func.py +++ b/tests/testfiles/pythonPlugins/all_types/load_operators_func.py @@ -20,8 +20,8 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. +from all_types import dpf_types_op, integral_types_op from ansys.dpf.core.custom_operator import record_operator -from all_types import integral_types_op, dpf_types_op def load_operators(*args): diff --git a/tests/testfiles/pythonPlugins/operator_with_spec.py b/tests/testfiles/pythonPlugins/operator_with_spec.py index 761f4e7eb8..4743ff0ae4 100644 --- a/tests/testfiles/pythonPlugins/operator_with_spec.py +++ b/tests/testfiles/pythonPlugins/operator_with_spec.py @@ -20,12 +20,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator from ansys.dpf.core import Field +from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator from ansys.dpf.core.operator_specification import ( CustomSpecification, - SpecificationProperties, PinSpecification, + SpecificationProperties, ) diff --git a/tests/testfiles/pythonPlugins/syntax_error_plugin/load_operators_func.py b/tests/testfiles/pythonPlugins/syntax_error_plugin/load_operators_func.py index bb6e9e0dfa..49a6ad997e 100644 --- a/tests/testfiles/pythonPlugins/syntax_error_plugin/load_operators_func.py +++ b/tests/testfiles/pythonPlugins/syntax_error_plugin/load_operators_func.py @@ -20,8 +20,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -from ansys.dpf.core.custom_operator import record_operator -from ansys.dpf.core.custom_operator import CustomOperatorBase +from ansys.dpf.core.custom_operator import CustomOperatorBase, record_operator class SyntaxeError(CustomOperatorBase):