ansys-fluent-visualization 0.8.dev2__tar.gz → 0.10.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/PKG-INFO +7 -7
  2. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/README.rst +1 -1
  3. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/pyproject.toml +5 -5
  4. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/__init__.py +1 -1
  5. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/_config.py +8 -0
  6. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/matplotlib/matplot_objects.py +2 -1
  7. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/matplotlib/matplot_windows_manager.py +9 -7
  8. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/post_data_extractor.py +10 -6
  9. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/post_windows_manager.py +1 -0
  10. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/pyvista/pyvista_objects.py +1 -1
  11. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/pyvista/pyvista_windows_manager.py +3 -1
  12. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/LICENSE +0 -0
  13. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/contour.py +0 -0
  14. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/matplotlib/__init__.py +0 -0
  15. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/matplotlib/plotter_defns.py +0 -0
  16. {ansys_fluent_visualization-0.8.dev2 → ansys_fluent_visualization-0.10.0}/src/ansys/fluent/visualization/pyvista/__init__.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ansys-fluent-visualization
3
- Version: 0.8.dev2
3
+ Version: 0.10.0
4
4
  Summary: A python wrapper for ansys Fluent visualization
5
5
  Home-page: https://github.com/ansys/pyfluent-visualization
6
6
  License: MIT
@@ -8,21 +8,21 @@ Author: ANSYS, Inc.
8
8
  Author-email: ansys.support@ansys.com
9
9
  Maintainer: PyAnsys developers
10
10
  Maintainer-email: pyansys.maintainers@ansys.com
11
- Requires-Python: >=3.8,<4.0
11
+ Requires-Python: >=3.9,<4.0
12
12
  Classifier: Development Status :: 4 - Beta
13
13
  Classifier: License :: OSI Approved :: MIT License
14
14
  Classifier: Operating System :: OS Independent
15
15
  Classifier: Programming Language :: Python :: 3
16
- Classifier: Programming Language :: Python :: 3.8
17
16
  Classifier: Programming Language :: Python :: 3.9
18
17
  Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
- Requires-Dist: ansys-fluent-core (>=0.14.dev0,<1.0)
21
- Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.8"
19
+ Classifier: Programming Language :: Python :: 3.12
20
+ Requires-Dist: ansys-fluent-core (>=0.21.0,<0.22.0)
21
+ Requires-Dist: importlib-metadata (>=4.0,<5.0) ; python_version < "3.9"
22
22
  Requires-Dist: matplotlib (>=3.5.1)
23
- Requires-Dist: pyside6 (>=6.2.3)
24
23
  Requires-Dist: pyvista (>=0.39.0)
25
24
  Requires-Dist: pyvistaqt (>=0.7.0)
25
+ Requires-Dist: requests (==2.31.0)
26
26
  Requires-Dist: vtk (>=9.3.0.rc0)
27
27
  Project-URL: Documentation, https://visualization.fluent.docs.pyansys.com/
28
28
  Project-URL: Repository, https://github.com/ansys/pyfluent-visualization
@@ -82,7 +82,7 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
82
82
 
83
83
  Installation
84
84
  ------------
85
- The ``ansys-fluent-visualization`` package supports Python 3.8 through Python
85
+ The ``ansys-fluent-visualization`` package supports Python 3.9 through Python
86
86
  3.11 on Windows and Linux.
87
87
 
88
88
  If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
@@ -50,7 +50,7 @@ the project support team, email `pyansys.core@ansys.com <pyansys.core@ansys.com>
50
50
 
51
51
  Installation
52
52
  ------------
53
- The ``ansys-fluent-visualization`` package supports Python 3.8 through Python
53
+ The ``ansys-fluent-visualization`` package supports Python 3.9 through Python
54
54
  3.11 on Windows and Linux.
55
55
 
56
56
  If you are using Python 3.10, download and install the wheel file for the ``vtk`` package from
@@ -5,7 +5,7 @@ build-backend = "poetry.core.masonry.api"
5
5
  [tool.poetry]
6
6
  # Check https://python-poetry.org/docs/pyproject/ for all available sections
7
7
  name = "ansys-fluent-visualization"
8
- version = "0.8.dev2"
8
+ version = "0.10.0"
9
9
  description = "A python wrapper for ansys Fluent visualization"
10
10
  license = "MIT"
11
11
  authors = ["ANSYS, Inc. <ansys.support@ansys.com>"]
@@ -23,14 +23,14 @@ packages = [
23
23
  ]
24
24
 
25
25
  [tool.poetry.dependencies]
26
- python = ">=3.8,<4.0"
27
- importlib-metadata = {version = "^4.0", python = "<3.8"}
28
- ansys-fluent-core = "~=0.14.dev0"
26
+ python = ">=3.9,<4.0"
27
+ importlib-metadata = {version = "^4.0", python = "<3.9"}
28
+ ansys-fluent-core = "~=0.21.0"
29
29
  vtk = ">=9.3.0.rc0"
30
30
  pyvista = ">=0.39.0"
31
31
  pyvistaqt = ">=0.7.0"
32
- pyside6 = ">=6.2.3"
33
32
  matplotlib = ">=3.5.1"
33
+ requests = "==2.31.0"
34
34
 
35
35
  [tool.poetry.urls]
36
36
  "Documentation" = "https://visualization.fluent.docs.pyansys.com/"
@@ -5,7 +5,7 @@ try:
5
5
  except ModuleNotFoundError:
6
6
  import importlib_metadata
7
7
 
8
- _VERSION_INFO = "Build date: October 17, 2023 12:40 UTC ShaID: b7d3620"
8
+ _VERSION_INFO = "Build date: July 02, 2024 18:51 UTC ShaID: ae36f97"
9
9
  __version__ = importlib_metadata.version(__name__.replace(".", "-"))
10
10
 
11
11
 
@@ -25,6 +25,14 @@ def set_config(blocking: bool = False, set_view_on_display: str = None):
25
25
  If specified, then graphics will always be displayed in the specified view.
26
26
  Valid values are xy, xz, yx, yz, zx, zy and isometric.
27
27
  """
28
+ if set_view_on_display not in set_config.allowed_views:
29
+ raise ValueError(
30
+ f"'{set_view_on_display}' is not an allowed view.\n"
31
+ f"Allowed views are: {set_config.allowed_views}"
32
+ )
28
33
 
29
34
  _global_config["blocking"] = blocking
30
35
  _global_config["set_view_on_display"] = set_view_on_display
36
+
37
+
38
+ set_config.allowed_views = ["xy", "xz", "yx", "yz", "zx", "zy", "isometric"]
@@ -1,8 +1,9 @@
1
1
  """Module providing visualization objects for Matplotlib."""
2
+
2
3
  import sys
3
4
  from typing import Optional
4
5
 
5
- from ansys.fluent.core.meta import Command
6
+ from ansys.fluent.core.post_objects.meta import Command
6
7
  from ansys.fluent.core.post_objects.post_helper import PostAPIHelper
7
8
  from ansys.fluent.core.post_objects.post_object_definitions import (
8
9
  MonitorDefn,
@@ -1,15 +1,17 @@
1
1
  """Module for matplotlib windows management."""
2
+
2
3
  import itertools
3
4
  import multiprocessing as mp
4
5
  from typing import Dict, List, Optional, Union
5
6
 
6
7
  from ansys.fluent.core.fluent_connection import FluentConnection
8
+ from ansys.fluent.core.post_objects.check_in_notebook import in_notebook
7
9
  from ansys.fluent.core.post_objects.post_object_definitions import (
8
10
  MonitorDefn,
9
11
  PlotDefn,
10
12
  XYPlotDefn,
11
13
  )
12
- from ansys.fluent.core.utils.generic import AbstractSingletonMeta, in_notebook
14
+ from ansys.fluent.core.post_objects.singleton_meta import AbstractSingletonMeta
13
15
 
14
16
  from ansys.fluent.visualization import get_config
15
17
  from ansys.fluent.visualization.matplotlib.plotter_defns import Plotter, ProcessPlotter
@@ -141,9 +143,9 @@ class _XYPlot:
141
143
  try:
142
144
  self.plotter.set_properties(properties)
143
145
  except BrokenPipeError:
144
- self.plotter: Union[
145
- _ProcessPlotterHandle, Plotter
146
- ] = self._get_plotter()
146
+ self.plotter: Union[_ProcessPlotterHandle, Plotter] = (
147
+ self._get_plotter()
148
+ )
147
149
  self.plotter.set_properties(properties)
148
150
  self.plotter.plot(xy_data)
149
151
 
@@ -192,9 +194,9 @@ class _MonitorPlot:
192
194
  try:
193
195
  self.plotter.set_properties(properties)
194
196
  except BrokenPipeError:
195
- self.plotter: Union[
196
- _ProcessPlotterHandle, Plotter
197
- ] = self._get_plotter()
197
+ self.plotter: Union[_ProcessPlotterHandle, Plotter] = (
198
+ self._get_plotter()
199
+ )
198
200
  self.plotter.set_properties(properties)
199
201
  if xy_data:
200
202
  self.plotter.plot(xy_data)
@@ -153,9 +153,11 @@ class FieldDataExtractor:
153
153
  ("type", "scalar-field"),
154
154
  (
155
155
  "dataLocation",
156
- DataLocation.Nodes
157
- if node_values
158
- else DataLocation.Elements,
156
+ (
157
+ DataLocation.Nodes
158
+ if node_values
159
+ else DataLocation.Elements
160
+ ),
159
161
  ),
160
162
  ("boundaryValues", boundary_values),
161
163
  )
@@ -314,9 +316,11 @@ class XYPlotDataExtractor:
314
316
  surfaces_list_expanded = [
315
317
  expanded_surf_name
316
318
  for expanded_surf_name_list in itertools.starmap(
317
- lambda local_surface_name, id_list: [local_surface_name]
318
- if len(id_list) == 1
319
- else [f"{local_surface_name}:{id}" for id in id_list],
319
+ lambda local_surface_name, id_list: (
320
+ [local_surface_name]
321
+ if len(id_list) == 1
322
+ else [f"{local_surface_name}:{id}" for id in id_list]
323
+ ),
320
324
  [
321
325
  (
322
326
  local_surface_name,
@@ -2,6 +2,7 @@
2
2
 
3
3
  PostWindowManager is container for PostWindow.
4
4
  """
5
+
5
6
  from abc import ABCMeta, abstractmethod
6
7
  from typing import List, Optional, Union
7
8
 
@@ -3,7 +3,7 @@
3
3
  import sys
4
4
  from typing import Optional
5
5
 
6
- from ansys.fluent.core.meta import Command
6
+ from ansys.fluent.core.post_objects.meta import Command
7
7
  from ansys.fluent.core.post_objects.post_helper import PostAPIHelper
8
8
  from ansys.fluent.core.post_objects.post_object_definitions import (
9
9
  ContourDefn,
@@ -1,12 +1,14 @@
1
1
  """Module for pyVista windows management."""
2
+
2
3
  from enum import Enum
3
4
  import itertools
4
5
  import threading
5
6
  from typing import Dict, List, Optional, Union
6
7
 
7
8
  from ansys.fluent.core.fluent_connection import FluentConnection
9
+ from ansys.fluent.core.post_objects.check_in_notebook import in_notebook
8
10
  from ansys.fluent.core.post_objects.post_object_definitions import GraphicsDefn
9
- from ansys.fluent.core.utils.generic import AbstractSingletonMeta, in_notebook
11
+ from ansys.fluent.core.post_objects.singleton_meta import AbstractSingletonMeta
10
12
  import numpy as np
11
13
  import pyvista as pv
12
14
  from pyvistaqt import BackgroundPlotter