Skip to content

Commit

Permalink
Adjust isort configuration to resolve import issues (#374)
Browse files Browse the repository at this point in the history
  • Loading branch information
ninad-kamat authored Feb 9, 2023
1 parent 85e1c76 commit c18a98f
Show file tree
Hide file tree
Showing 14 changed files with 60 additions and 30 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"

[project]
name = "ansys-meshing-prime"
version = "0.3.0.dev1"
version = "0.3.0.dev2"
description = "PyPrimeMesh provides a python client to Ansys Prime Server. Ansys Prime Server delivers core Ansys meshing technology."
readme = "README.md"
requires-python = ">=3.7,<4"
Expand Down
29 changes: 15 additions & 14 deletions src/ansys/meshing/prime/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
'''PyPrimeMesh Client library
'''
from ansys.meshing.prime.autogen.primeconfig import *
# isort: skip_file
from ansys.meshing.prime.core.model import Model
from ansys.meshing.prime.core.part import Part
from ansys.meshing.prime.core.fileio import FileIO
from ansys.meshing.prime.core.surfer import Surfer
from ansys.meshing.prime.autogen.surfacesearch import SurfaceSearch
from ansys.meshing.prime.autogen.volumesearch import VolumeSearch
from ansys.meshing.prime.core.wrappercontrol import WrapperControl
from ansys.meshing.prime.core.controldata import ControlData
from ansys.meshing.prime.core.wrapper import Wrapper
from ansys.meshing.prime.core.surfaceutilities import SurfaceUtilities
from ansys.meshing.prime.core.sizecontrol import SizeControl
from ansys.meshing.prime.core.volumecontrol import VolumeControl

from ansys.meshing.prime.autogen.surfaceutilitystructs import *
from ansys.meshing.prime.autogen.wrapperstructs import *
from ansys.meshing.prime.autogen.scaffolder import Scaffolder
Expand Down Expand Up @@ -35,8 +48,6 @@
from ansys.meshing.prime.autogen.prismcontrol import PrismControl
from ansys.meshing.prime.autogen.connectstructs import *
from ansys.meshing.prime.autogen.surfaceutilitystructs import *
from ansys.meshing.prime.autogen.surfacesearch import SurfaceSearch
from ansys.meshing.prime.autogen.volumesearch import VolumeSearch
from ansys.meshing.prime.autogen.transformstructs import *
from ansys.meshing.prime.autogen.deletetoolstructs import *
from ansys.meshing.prime.autogen.splittoolstructs import *
Expand All @@ -47,19 +58,9 @@
from ansys.meshing.prime.autogen.volumemeshtoolstructs import *
from ansys.meshing.prime.autogen.topoutilitystructs import *

from ansys.meshing.prime.core.model import Model
from ansys.meshing.prime.core.part import Part
from ansys.meshing.prime.core.fileio import FileIO
from ansys.meshing.prime.core.surfer import Surfer
from ansys.meshing.prime.core.wrappercontrol import WrapperControl
from ansys.meshing.prime.core.controldata import ControlData
from ansys.meshing.prime.core.wrapper import Wrapper
from ansys.meshing.prime.core.surfaceutilities import SurfaceUtilities
from ansys.meshing.prime.core.sizecontrol import SizeControl
from ansys.meshing.prime.core.volumecontrol import VolumeControl
from ansys.meshing.prime.internals.error_handling import PrimeRuntimeError, PrimeRuntimeWarning
from ansys.meshing.prime.internals.client import Client
from ansys.meshing.prime.internals.launcher import *
from ansys.meshing.prime.internals.error_handling import PrimeRuntimeError, PrimeRuntimeWarning
from ansys.meshing.prime.internals.config import (
is_optimizing_numpy_arrays,
enable_optimizing_numpy_arrays,
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/controldata.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from typing import Iterable, List

from ansys.meshing.prime.autogen.commonstructs import DeleteResults
# isort: split
from ansys.meshing.prime.autogen.controldata import ControlData as _ControlData

# isort: split
from ansys.meshing.prime.autogen.commonstructs import DeleteResults
from ansys.meshing.prime.autogen.primeconfig import ErrorCode
from ansys.meshing.prime.autogen.prismcontrol import PrismControl
from ansys.meshing.prime.core.periodiccontrol import PeriodicControl
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/fileio.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from typing import List

import ansys.meshing.prime.internals.utils as utils
# isort: split
from ansys.meshing.prime.autogen.fileio import FileIO as _FileIO

# isort: split
import ansys.meshing.prime.internals.utils as utils
from ansys.meshing.prime.autogen.fileiostructs import (
ExportBoundaryFittedSplineParams,
ExportFluentCaseParams,
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/model.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
from typing import Iterable, List

# isort: split
from ansys.meshing.prime.autogen.model import Model as _Model

# isort: split
import ansys.meshing.prime.internals.json_utils as json
from ansys.meshing.prime.autogen.commonstructs import DeleteResults
from ansys.meshing.prime.autogen.materialpointmanager import MaterialPointManager
from ansys.meshing.prime.autogen.model import Model as _Model
from ansys.meshing.prime.autogen.modelstructs import (
GlobalSizingParams,
MergePartsParams,
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/part.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from typing import Any

from ansys.meshing.prime.autogen.commonstructs import SetNameResults as SetNameResults
# isort: split
from ansys.meshing.prime.autogen.part import Part as _Part

# isort: split
from ansys.meshing.prime.autogen.commonstructs import SetNameResults as SetNameResults
from ansys.meshing.prime.autogen.partstructs import PartSummaryParams


Expand Down
6 changes: 3 additions & 3 deletions src/ansys/meshing/prime/core/periodiccontrol.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Copyright 2023 ANSYS, Inc.
# Unauthorized use, distribution, or duplication is prohibited.
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.periodiccontrol import (
PeriodicControl as _PeriodicControl,
)

# isort: split
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.periodiccontrolstructs import PeriodicControlParams


Expand Down
4 changes: 3 additions & 1 deletion src/ansys/meshing/prime/core/sizecontrol.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.sizecontrol import SizeControl as _SizeControl

# isort: split
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.sizecontrolstructs import SizeControlSummaryParams


Expand Down
2 changes: 2 additions & 0 deletions src/ansys/meshing/prime/core/surfaceutilities.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
from ansys.meshing.prime.autogen.surfaceutilities import (
SurfaceUtilities as _SurfaceUtilities,
)

# isort: split
from ansys.meshing.prime.autogen.surfaceutilitystructs import (
AddThicknessParams as AddParams,
)
Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/surfer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
from typing import Iterable

from ansys.meshing.prime.autogen.coreobject import CoreObject
# isort: split
from ansys.meshing.prime.autogen.surfer import Surfer as _Surfer

# isort: split
from ansys.meshing.prime.autogen.coreobject import CoreObject
from ansys.meshing.prime.autogen.surferstructs import (
LocalSurferParams,
LocalSurferResults,
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/meshing/prime/core/volumecontrol.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.volumecontrol import VolumeControl as _VolumeControl

# isort: split
from ansys.meshing.prime.autogen.commonstructs import SetNameResults
from ansys.meshing.prime.autogen.volumecontrolstructs import VolumeControlParams


Expand Down
5 changes: 4 additions & 1 deletion src/ansys/meshing/prime/core/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

import numpy as np

# isort: split
from ansys.meshing.prime.autogen.wrapper import Wrapper as _Wrapper

# isort: split
from ansys.meshing.prime.autogen.connect import Connect
from ansys.meshing.prime.autogen.connectstructs import IntersectParams
from ansys.meshing.prime.autogen.controlstructs import (
Expand All @@ -11,7 +15,6 @@
from ansys.meshing.prime.autogen.partstructs import NamePatternParams
from ansys.meshing.prime.autogen.surfaceutilities import SurfaceUtilities
from ansys.meshing.prime.autogen.surfaceutilitystructs import ResolveIntersectionsParams
from ansys.meshing.prime.autogen.wrapper import Wrapper as _Wrapper
from ansys.meshing.prime.autogen.wrapperstructs import WrapParams as WrapParams
from ansys.meshing.prime.autogen.wrapperstructs import (
WrapperCloseGapsParams,
Expand Down
4 changes: 3 additions & 1 deletion src/ansys/meshing/prime/core/wrappercontrol.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from ansys.meshing.prime.autogen.commonstructs import SetNameResults as SetNameResults
from ansys.meshing.prime.autogen.wrappercontrol import WrapperControl as _WrapperControl

# isort: split
from ansys.meshing.prime.autogen.commonstructs import SetNameResults as SetNameResults
from ansys.meshing.prime.internals.comm_manager import CommunicationManager


Expand Down
9 changes: 6 additions & 3 deletions src/ansys/meshing/prime/params/primestructs.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
from ansys.meshing.prime.autogen.primeconfig import * # isort:skip
from ansys.meshing.prime.autogen.commontypes import * # isort:skip
from ansys.meshing.prime.autogen.commonstructs import * # isort:skip
# isort: off
from ansys.meshing.prime.autogen.primeconfig import *
from ansys.meshing.prime.autogen.commontypes import *
from ansys.meshing.prime.autogen.commonstructs import *

# isort: on
from ansys.meshing.prime.autogen.automeshstructs import *
from ansys.meshing.prime.autogen.collapsetoolstructs import *
from ansys.meshing.prime.autogen.connectstructs import *
Expand Down

0 comments on commit c18a98f

Please sign in to comment.