Skip to content

Commit

Permalink
Split up core in smaller sub modules (#821)
Browse files Browse the repository at this point in the history
* mv MathExpression

* mv SpatialSeries

* mv GenericSeries, SeriesParam

* mv TimeSeries

* added MathematicalExpression to __all__, sorted lines

* use abs imports in core module (e.g. from weldx import MathematicalExpression broke)

actually this is very strange, as the relative import triggers a behaviour to use relative import all over the place.

The weldx.util.util pkg imports an attr from asdf, but this import would be tried to resolve by Python (3.10) to the weldx internal "asdf" package.

* patch mod of "core" pkg
  • Loading branch information
marscher authored Nov 1, 2022
1 parent e6f7d6a commit cfac317
Show file tree
Hide file tree
Showing 7 changed files with 970 additions and 921 deletions.
17 changes: 9 additions & 8 deletions weldx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,25 @@

__all__ = (
"ArcSegment",
"Config",
"CoordinateSystemManager",
"Geometry",
"GmawProcess",
"DynamicBaseSegment",
"DynamicShapeSegment",
"DynamicTraceSegment",
"Geometry",
"GmawProcess",
"LineSegment",
"LinearHorizontalTraceSegment",
"LocalCoordinateSystem",
"MathematicalExpression",
"Profile",
"Q_",
"U_",
"Shape",
"SpatialData",
"Time",
"TimeSeries",
"Trace",
"U_",
"WeldxFile",
"asdf",
"core",
Expand All @@ -202,11 +208,6 @@
"transformations",
"util",
"welding",
"TimeSeries",
"DynamicTraceSegment",
"LinearHorizontalTraceSegment",
"Config",
"Time",
)

weldx.config.Config.load_installed_standards()
Expand Down
14 changes: 14 additions & 0 deletions weldx/core/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
"""Collection of common classes and functions."""
# isort:skip_file
from weldx.core.math_expression import MathematicalExpression
from weldx.core.generic_series import GenericSeries
from weldx.core.spatial_series import SpatialSeries
from weldx.core.time_series import TimeSeries

__all__ = ["MathematicalExpression", "GenericSeries", "SpatialSeries", "TimeSeries"]


from ..util import _patch_mod_all # noqa

_patch_mod_all("weldx.core")
del _patch_mod_all
Loading

0 comments on commit cfac317

Please sign in to comment.