Skip to content

Commit 222d7bb

Browse files
committed
Add method breakouts to package imports
1 parent d5b0675 commit 222d7bb

File tree

7 files changed

+37
-12
lines changed

7 files changed

+37
-12
lines changed

taurus/entity/attribute/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
"""Attribute objects."""
2+
# flake8: noqa
3+
from .condition import Condition
4+
from .parameter import Parameter
5+
from .property import Property
6+
from .property_and_conditions import PropertyAndConditions

taurus/entity/bounds/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,6 @@
11
"""Bounds on a value."""
2+
# flake8: noqa
3+
from .categorical_bounds import CategoricalBounds
4+
from .composition_bounds import CompositionBounds
5+
from .integer_bounds import IntegerBounds
6+
from .real_bounds import RealBounds

taurus/entity/object/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
"""Run and Spec Objects"""
12
# flake8: noqa
23
from .material_run import MaterialRun
34
from .measurement_run import MeasurementRun

taurus/entity/template/__init__.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
# flake8: noqa
1+
"""Attribute and Object Templates"""
2+
# flake8: noqa
3+
from .property_template import PropertyTemplate
4+
from .condition_template import ConditionTemplate
5+
from .parameter_template import ParameterTemplate
6+
from .material_template import MaterialTemplate
7+
from .measurement_template import MeasurementTemplate
8+
from .process_template import ProcessTemplate

taurus/entity/value/__init__.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1-
# flake8: noqa
1+
"""Value objects"""
2+
# flake8: noqa
3+
from .nominal_real import NominalReal
4+
from .normal_real import NormalReal
5+
from .uniform_real import UniformReal
6+
from .nominal_integer import NominalInteger
7+
from .uniform_integer import UniformInteger
8+
from .discrete_categorical import DiscreteCategorical
9+
from .nominal_categorical import NominalCategorical
10+
from .empirical_formula import EmpiricalFormula
11+
from .nominal_composition import NominalComposition

taurus/util/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
# flake8: noqa
2-
from .impl import *
2+
from .impl import set_uuids, substitute_links, substitute_objects, flatten, recursive_foreach, \
3+
recursive_flatmap, writable_sort_order

taurus/util/impl.py

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,6 @@
77
from taurus.entity.link_by_uid import LinkByUID
88
from toolz import concatv
99

10-
from taurus.entity.object import MeasurementSpec, ProcessSpec, MaterialSpec, IngredientSpec, \
11-
MeasurementRun, IngredientRun, MaterialRun, ProcessRun
12-
from taurus.entity.template.condition_template import ConditionTemplate
13-
from taurus.entity.template.material_template import MaterialTemplate
14-
from taurus.entity.template.measurement_template import MeasurementTemplate
15-
from taurus.entity.template.parameter_template import ParameterTemplate
16-
from taurus.entity.template.process_template import ProcessTemplate
17-
from taurus.entity.template.property_template import PropertyTemplate
18-
1910

2011
def set_uuids(obj, name="auto"):
2112
"""
@@ -248,6 +239,11 @@ def recursive_flatmap(obj, func, seen=None, unidirectional=True):
248239

249240
def writable_sort_order(key: Union[BaseEntity, str]) -> int:
250241
"""Sort order for flattening such that the objects can be read back and re-nested."""
242+
from taurus.entity.object import MeasurementSpec, ProcessSpec, MaterialSpec, IngredientSpec, \
243+
MeasurementRun, IngredientRun, MaterialRun, ProcessRun
244+
from taurus.entity.template import ConditionTemplate, MaterialTemplate, MeasurementTemplate, \
245+
ParameterTemplate, ProcessTemplate, PropertyTemplate
246+
251247
if isinstance(key, BaseEntity):
252248
typ = key.typ
253249
elif isinstance(key, str):

0 commit comments

Comments
 (0)