diff --git a/example/send_receive.py b/example/send_receive.py index 682149ac..59d3fc03 100644 --- a/example/send_receive.py +++ b/example/send_receive.py @@ -1,4 +1,5 @@ from devtools import debug + from specklepy.api import operations from specklepy.api.wrapper import StreamWrapper diff --git a/example/units_none.py b/example/units_none.py index fbe1bb3f..a1617aed 100644 --- a/example/units_none.py +++ b/example/units_none.py @@ -1,7 +1,8 @@ from devtools import debug + from specklepy.api import operations -from specklepy.objects.geometry import Base -from specklepy.objects.units import Units +from specklepy.objects_v2.geometry import Base +from specklepy.objects_v2.units import Units dct = { "id": "1234abcd", diff --git a/example/using_speckle_base.py b/example/using_speckle_base.py index d3d003f1..753fbed0 100644 --- a/example/using_speckle_base.py +++ b/example/using_speckle_base.py @@ -2,6 +2,7 @@ # the speckle.objects module exposes all speckle provided classes from devtools import debug + from specklepy.api import operations from specklepy.objects import Base diff --git a/src/speckle_automate/automation_context.py b/src/speckle_automate/automation_context.py index 7bdac2cc..7476dbd3 100644 --- a/src/speckle_automate/automation_context.py +++ b/src/speckle_automate/automation_context.py @@ -7,13 +7,6 @@ import httpx from gql import gql -from specklepy.api import operations -from specklepy.api.client import SpeckleClient -from specklepy.core.api.models import Branch -from specklepy.logging.exceptions import SpeckleException -from specklepy.objects.base import Base -from specklepy.transports.memory import MemoryTransport -from specklepy.transports.server import ServerTransport from speckle_automate.schema import ( AutomateBase, @@ -23,6 +16,13 @@ ObjectResultLevel, ResultCase, ) +from specklepy.api import operations +from specklepy.api.client import SpeckleClient +from specklepy.core.api.models import Branch +from specklepy.logging.exceptions import SpeckleException +from specklepy.objects.base import Base +from specklepy.transports.memory import MemoryTransport +from specklepy.transports.server import ServerTransport @dataclass diff --git a/src/speckle_automate/fixtures.py b/src/speckle_automate/fixtures.py index b5282c16..5e92974e 100644 --- a/src/speckle_automate/fixtures.py +++ b/src/speckle_automate/fixtures.py @@ -7,9 +7,9 @@ from gql import gql from pydantic import Field from pydantic_settings import BaseSettings, SettingsConfigDict -from specklepy.api.client import SpeckleClient from speckle_automate.schema import AutomationRunData, TestAutomationRunData +from specklepy.api.client import SpeckleClient class TestAutomationEnvironment(BaseSettings): diff --git a/src/specklepy/api/resources/current/active_user_resource.py b/src/specklepy/api/resources/current/active_user_resource.py index dbef3ae8..0e67a1a2 100644 --- a/src/specklepy/api/resources/current/active_user_resource.py +++ b/src/specklepy/api/resources/current/active_user_resource.py @@ -2,6 +2,7 @@ from typing import List, Optional, overload from deprecated import deprecated + from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput from specklepy.core.api.models import ( PendingStreamCollaborator, diff --git a/src/specklepy/api/resources/current/other_user_resource.py b/src/specklepy/api/resources/current/other_user_resource.py index dec00d13..9b96f990 100644 --- a/src/specklepy/api/resources/current/other_user_resource.py +++ b/src/specklepy/api/resources/current/other_user_resource.py @@ -2,6 +2,7 @@ from typing import List, Optional, Union from deprecated import deprecated + from specklepy.core.api.models import ( ActivityCollection, LimitedUser, diff --git a/src/specklepy/api/resources/current/project_invite_resource.py b/src/specklepy/api/resources/current/project_invite_resource.py index a1eb52c4..9181085f 100644 --- a/src/specklepy/api/resources/current/project_invite_resource.py +++ b/src/specklepy/api/resources/current/project_invite_resource.py @@ -1,6 +1,7 @@ from typing import Any, Optional, Tuple from gql import Client + from specklepy.core.api.credentials import Account from specklepy.core.api.inputs.project_inputs import ( ProjectInviteCreateInput, diff --git a/src/specklepy/api/resources/current/subscription_resource.py b/src/specklepy/api/resources/current/subscription_resource.py index 1220cc4d..51f84366 100644 --- a/src/specklepy/api/resources/current/subscription_resource.py +++ b/src/specklepy/api/resources/current/subscription_resource.py @@ -1,6 +1,8 @@ from typing import Callable, Optional, Sequence from pydantic import BaseModel +from typing_extensions import TypeVar + from specklepy.core.api.models import ( ProjectModelsUpdatedMessage, ProjectUpdatedMessage, @@ -9,7 +11,6 @@ ) from specklepy.core.api.resources import SubscriptionResource as CoreResource from specklepy.logging import metrics -from typing_extensions import TypeVar TEventArgs = TypeVar("TEventArgs", bound=BaseModel) diff --git a/src/specklepy/api/resources/deprecated/active_user.py b/src/specklepy/api/resources/deprecated/active_user.py index 316ed23f..1fc40394 100644 --- a/src/specklepy/api/resources/deprecated/active_user.py +++ b/src/specklepy/api/resources/deprecated/active_user.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.api.resources import ActiveUserResource from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION diff --git a/src/specklepy/api/resources/deprecated/branch.py b/src/specklepy/api/resources/deprecated/branch.py index 821ee218..a96ff138 100644 --- a/src/specklepy/api/resources/deprecated/branch.py +++ b/src/specklepy/api/resources/deprecated/branch.py @@ -1,6 +1,7 @@ from typing import Optional, Union from deprecated import deprecated + from specklepy.api.models import Branch from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, diff --git a/src/specklepy/api/resources/deprecated/commit.py b/src/specklepy/api/resources/deprecated/commit.py index 1518ca99..91ebee44 100644 --- a/src/specklepy/api/resources/deprecated/commit.py +++ b/src/specklepy/api/resources/deprecated/commit.py @@ -1,6 +1,7 @@ from typing import List, Optional, Union from deprecated import deprecated + from specklepy.api.models import Commit from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, diff --git a/src/specklepy/api/resources/deprecated/object.py b/src/specklepy/api/resources/deprecated/object.py index 194167e8..573e6f5a 100644 --- a/src/specklepy/api/resources/deprecated/object.py +++ b/src/specklepy/api/resources/deprecated/object.py @@ -1,6 +1,7 @@ from typing import Dict, List from deprecated import deprecated + from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, FE1_DEPRECATION_VERSION, diff --git a/src/specklepy/api/resources/deprecated/other_user.py b/src/specklepy/api/resources/deprecated/other_user.py index eece6dbe..2bdc575a 100644 --- a/src/specklepy/api/resources/deprecated/other_user.py +++ b/src/specklepy/api/resources/deprecated/other_user.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.api.resources import OtherUserResource from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION diff --git a/src/specklepy/api/resources/deprecated/server.py b/src/specklepy/api/resources/deprecated/server.py index b74c6a8f..7ddb805e 100644 --- a/src/specklepy/api/resources/deprecated/server.py +++ b/src/specklepy/api/resources/deprecated/server.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.api.resources import ServerResource from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION diff --git a/src/specklepy/api/resources/deprecated/stream.py b/src/specklepy/api/resources/deprecated/stream.py index b6f8fec2..688290a6 100644 --- a/src/specklepy/api/resources/deprecated/stream.py +++ b/src/specklepy/api/resources/deprecated/stream.py @@ -2,6 +2,7 @@ from typing import List, Optional from deprecated import deprecated + from specklepy.api.models import PendingStreamCollaborator, Stream from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, diff --git a/src/specklepy/api/resources/deprecated/subscriptions.py b/src/specklepy/api/resources/deprecated/subscriptions.py index ebb402f3..3530e744 100644 --- a/src/specklepy/api/resources/deprecated/subscriptions.py +++ b/src/specklepy/api/resources/deprecated/subscriptions.py @@ -2,6 +2,7 @@ from deprecated import deprecated from graphql import DocumentNode + from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, FE1_DEPRECATION_VERSION, diff --git a/src/specklepy/api/resources/deprecated/user.py b/src/specklepy/api/resources/deprecated/user.py index d3f35e38..6d45033c 100644 --- a/src/specklepy/api/resources/deprecated/user.py +++ b/src/specklepy/api/resources/deprecated/user.py @@ -2,6 +2,7 @@ from typing import List, Optional, Union from deprecated import deprecated + from specklepy.api.models import PendingStreamCollaborator, User from specklepy.core.api.resources.deprecated.user import Resource as CoreResource from specklepy.logging import metrics diff --git a/src/specklepy/core/api/resources/current/active_user_resource.py b/src/specklepy/core/api/resources/current/active_user_resource.py index a73a0da4..633818c7 100644 --- a/src/specklepy/core/api/resources/current/active_user_resource.py +++ b/src/specklepy/core/api/resources/current/active_user_resource.py @@ -3,6 +3,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput from specklepy.core.api.models import ( ActivityCollection, diff --git a/src/specklepy/core/api/resources/current/model_resource.py b/src/specklepy/core/api/resources/current/model_resource.py index 93e49cda..c9f59c06 100644 --- a/src/specklepy/core/api/resources/current/model_resource.py +++ b/src/specklepy/core/api/resources/current/model_resource.py @@ -1,6 +1,7 @@ from typing import Optional from gql import gql + from specklepy.core.api.inputs.model_inputs import ( CreateModelInput, DeleteModelInput, diff --git a/src/specklepy/core/api/resources/current/other_user_resource.py b/src/specklepy/core/api/resources/current/other_user_resource.py index 00eb5451..065ed7bc 100644 --- a/src/specklepy/core/api/resources/current/other_user_resource.py +++ b/src/specklepy/core/api/resources/current/other_user_resource.py @@ -3,6 +3,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.models import ( ActivityCollection, LimitedUser, diff --git a/src/specklepy/core/api/resources/current/project_invite_resource.py b/src/specklepy/core/api/resources/current/project_invite_resource.py index 5c6e692a..6ea5a3ca 100644 --- a/src/specklepy/core/api/resources/current/project_invite_resource.py +++ b/src/specklepy/core/api/resources/current/project_invite_resource.py @@ -1,6 +1,7 @@ from typing import Any, Optional, Tuple from gql import Client, gql + from specklepy.core.api.credentials import Account from specklepy.core.api.inputs.project_inputs import ( ProjectInviteCreateInput, diff --git a/src/specklepy/core/api/resources/current/project_resource.py b/src/specklepy/core/api/resources/current/project_resource.py index db7d0253..3c42f479 100644 --- a/src/specklepy/core/api/resources/current/project_resource.py +++ b/src/specklepy/core/api/resources/current/project_resource.py @@ -1,6 +1,7 @@ from typing import Optional from gql import gql + from specklepy.core.api.inputs.project_inputs import ( ProjectCreateInput, ProjectModelsFilter, diff --git a/src/specklepy/core/api/resources/current/server_resource.py b/src/specklepy/core/api/resources/current/server_resource.py index 060ae6c2..07ffb1bc 100644 --- a/src/specklepy/core/api/resources/current/server_resource.py +++ b/src/specklepy/core/api/resources/current/server_resource.py @@ -3,6 +3,7 @@ import requests from gql import gql + from specklepy.core.api.models import ServerInfo from specklepy.core.api.resource import ResourceBase from specklepy.logging.exceptions import GraphQLException diff --git a/src/specklepy/core/api/resources/current/subscription_resource.py b/src/specklepy/core/api/resources/current/subscription_resource.py index be792b80..da80b1d7 100644 --- a/src/specklepy/core/api/resources/current/subscription_resource.py +++ b/src/specklepy/core/api/resources/current/subscription_resource.py @@ -4,6 +4,8 @@ from gql import gql from graphql import DocumentNode from pydantic import BaseModel +from typing_extensions import TypeVar + from specklepy.core.api.models import ( ProjectModelsUpdatedMessage, ProjectUpdatedMessage, @@ -13,7 +15,6 @@ from specklepy.core.api.resource import ResourceBase from specklepy.core.api.responses import DataResponse from specklepy.logging.exceptions import SpeckleException -from typing_extensions import TypeVar NAME = "subscribe" diff --git a/src/specklepy/core/api/resources/current/version_resource.py b/src/specklepy/core/api/resources/current/version_resource.py index b7bc3292..8b3738b4 100644 --- a/src/specklepy/core/api/resources/current/version_resource.py +++ b/src/specklepy/core/api/resources/current/version_resource.py @@ -1,6 +1,7 @@ from typing import Optional from gql import gql + from specklepy.core.api.inputs.model_inputs import ModelVersionsFilter from specklepy.core.api.inputs.version_inputs import ( CreateVersionInput, diff --git a/src/specklepy/core/api/resources/deprecated/active_user.py b/src/specklepy/core/api/resources/deprecated/active_user.py index 9f33cf76..411c06d1 100644 --- a/src/specklepy/core/api/resources/deprecated/active_user.py +++ b/src/specklepy/core/api/resources/deprecated/active_user.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION from specklepy.core.api.resources import ActiveUserResource diff --git a/src/specklepy/core/api/resources/deprecated/branch.py b/src/specklepy/core/api/resources/deprecated/branch.py index e2f86ed8..7967a4ab 100644 --- a/src/specklepy/core/api/resources/deprecated/branch.py +++ b/src/specklepy/core/api/resources/deprecated/branch.py @@ -2,6 +2,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, FE1_DEPRECATION_VERSION, diff --git a/src/specklepy/core/api/resources/deprecated/commit.py b/src/specklepy/core/api/resources/deprecated/commit.py index 65769156..6b8b3a13 100644 --- a/src/specklepy/core/api/resources/deprecated/commit.py +++ b/src/specklepy/core/api/resources/deprecated/commit.py @@ -2,6 +2,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, FE1_DEPRECATION_VERSION, diff --git a/src/specklepy/core/api/resources/deprecated/object.py b/src/specklepy/core/api/resources/deprecated/object.py index 8c8e0593..1d3369ea 100644 --- a/src/specklepy/core/api/resources/deprecated/object.py +++ b/src/specklepy/core/api/resources/deprecated/object.py @@ -1,6 +1,7 @@ from typing import Dict, List from gql import gql + from specklepy.core.api.resource import ResourceBase from specklepy.objects.base import Base diff --git a/src/specklepy/core/api/resources/deprecated/other_user.py b/src/specklepy/core/api/resources/deprecated/other_user.py index 67f36572..9f63043b 100644 --- a/src/specklepy/core/api/resources/deprecated/other_user.py +++ b/src/specklepy/core/api/resources/deprecated/other_user.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION from specklepy.core.api.resources import OtherUserResource diff --git a/src/specklepy/core/api/resources/deprecated/server.py b/src/specklepy/core/api/resources/deprecated/server.py index dd6f40f9..4abf4ad8 100644 --- a/src/specklepy/core/api/resources/deprecated/server.py +++ b/src/specklepy/core/api/resources/deprecated/server.py @@ -1,4 +1,5 @@ from deprecated import deprecated + from specklepy.core.api.models.deprecated import FE1_DEPRECATION_VERSION from specklepy.core.api.resources import ServerResource diff --git a/src/specklepy/core/api/resources/deprecated/stream.py b/src/specklepy/core/api/resources/deprecated/stream.py index dc5bc644..38795733 100644 --- a/src/specklepy/core/api/resources/deprecated/stream.py +++ b/src/specklepy/core/api/resources/deprecated/stream.py @@ -3,6 +3,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.models import ( ActivityCollection, PendingStreamCollaborator, diff --git a/src/specklepy/core/api/resources/deprecated/subscriptions.py b/src/specklepy/core/api/resources/deprecated/subscriptions.py index 07210501..f9826f51 100644 --- a/src/specklepy/core/api/resources/deprecated/subscriptions.py +++ b/src/specklepy/core/api/resources/deprecated/subscriptions.py @@ -4,6 +4,7 @@ from deprecated import deprecated from gql import gql from graphql import DocumentNode + from specklepy.core.api.models.deprecated import ( FE1_DEPRECATION_REASON, FE1_DEPRECATION_VERSION, diff --git a/src/specklepy/core/api/resources/deprecated/user.py b/src/specklepy/core/api/resources/deprecated/user.py index 2de39d44..b9ecd1e0 100644 --- a/src/specklepy/core/api/resources/deprecated/user.py +++ b/src/specklepy/core/api/resources/deprecated/user.py @@ -3,6 +3,7 @@ from deprecated import deprecated from gql import gql + from specklepy.core.api.models import ( ActivityCollection, PendingStreamCollaborator, diff --git a/src/specklepy/objects/base.py b/src/specklepy/objects/base.py index 2c7959ad..3f493570 100644 --- a/src/specklepy/objects/base.py +++ b/src/specklepy/objects/base.py @@ -17,9 +17,10 @@ ) from warnings import warn +from stringcase import pascalcase + from specklepy.logging.exceptions import SpeckleException from specklepy.transports.memory import MemoryTransport -from stringcase import pascalcase PRIMITIVES = (int, float, str, bool) diff --git a/src/specklepy/objects/tests/line_test.py b/src/specklepy/objects/tests/line_test.py index 9ceb2c55..fefd5966 100644 --- a/src/specklepy/objects/tests/line_test.py +++ b/src/specklepy/objects/tests/line_test.py @@ -1,4 +1,5 @@ from devtools import debug + from specklepy.core.api.operations import deserialize, serialize from specklepy.objects.geometry import Line, Point from specklepy.objects.models.units import Units diff --git a/src/specklepy/objects/tests/mesh_test.py b/src/specklepy/objects/tests/mesh_test.py index 27a2d6c5..43a0bbf2 100644 --- a/src/specklepy/objects/tests/mesh_test.py +++ b/src/specklepy/objects/tests/mesh_test.py @@ -1,4 +1,5 @@ from devtools import debug + from specklepy.core.api.operations import deserialize, serialize from specklepy.objects.geometry import Mesh diff --git a/src/specklepy/objects/tests/point_test.py b/src/specklepy/objects/tests/point_test.py index a3abb521..95cf6bae 100644 --- a/src/specklepy/objects/tests/point_test.py +++ b/src/specklepy/objects/tests/point_test.py @@ -1,4 +1,5 @@ from devtools import debug + from specklepy.core.api.operations import deserialize, serialize from specklepy.objects.geometry import Point from specklepy.objects.models.units import Units diff --git a/src/specklepy/objects/tests/polyline_test.py b/src/specklepy/objects/tests/polyline_test.py index 761ffedc..dabded09 100644 --- a/src/specklepy/objects/tests/polyline_test.py +++ b/src/specklepy/objects/tests/polyline_test.py @@ -1,4 +1,5 @@ from devtools import debug + from specklepy.core.api.operations import deserialize, serialize from specklepy.objects.geometry import Polyline from specklepy.objects.models.units import Units diff --git a/src/specklepy/objects_v2/graph_traversal/commit_object_builder.py b/src/specklepy/objects_v2/graph_traversal/commit_object_builder.py index 6c9e8e54..2d6fe1ec 100644 --- a/src/specklepy/objects_v2/graph_traversal/commit_object_builder.py +++ b/src/specklepy/objects_v2/graph_traversal/commit_object_builder.py @@ -2,6 +2,7 @@ from typing import Any, Collection, Dict, Generic, Iterable, Optional, Tuple, TypeVar from attrs import define + from specklepy.objects.base import Base ROOT: str = "__Root" diff --git a/src/specklepy/objects_v2/graph_traversal/traversal.py b/src/specklepy/objects_v2/graph_traversal/traversal.py index a3f33eee..e60e7f7b 100644 --- a/src/specklepy/objects_v2/graph_traversal/traversal.py +++ b/src/specklepy/objects_v2/graph_traversal/traversal.py @@ -1,9 +1,10 @@ from typing import Any, Callable, Collection, Iterable, Iterator, List, Optional, Set from attrs import define -from specklepy.objects.base import Base from typing_extensions import Protocol, final +from specklepy.objects.base import Base + class ITraversalRule(Protocol): def get_members_to_traverse(self, o: Base) -> Set[str]: diff --git a/tests/conftest.py b/tests/conftest.py index 8fb36322..1dd7799f 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ import random import pytest + from specklepy.objects.base import Base diff --git a/tests/integration/client/current/test_active_user_resource.py b/tests/integration/client/current/test_active_user_resource.py index e70479bc..042adb43 100644 --- a/tests/integration/client/current/test_active_user_resource.py +++ b/tests/integration/client/current/test_active_user_resource.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.inputs.project_inputs import ProjectCreateInput from specklepy.core.api.inputs.user_inputs import UserProjectsFilter, UserUpdateInput diff --git a/tests/integration/client/current/test_model_resource.py b/tests/integration/client/current/test_model_resource.py index 6d8931eb..0c3f0aee 100644 --- a/tests/integration/client/current/test_model_resource.py +++ b/tests/integration/client/current/test_model_resource.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.inputs.model_inputs import ( CreateModelInput, diff --git a/tests/integration/client/current/test_other_user_resource.py b/tests/integration/client/current/test_other_user_resource.py index 530c9dd4..97fe451d 100644 --- a/tests/integration/client/current/test_other_user_resource.py +++ b/tests/integration/client/current/test_other_user_resource.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.models import User diff --git a/tests/integration/client/current/test_project_invite_resource.py b/tests/integration/client/current/test_project_invite_resource.py index f293e963..e77d3141 100644 --- a/tests/integration/client/current/test_project_invite_resource.py +++ b/tests/integration/client/current/test_project_invite_resource.py @@ -1,6 +1,7 @@ from typing import Optional import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.inputs.project_inputs import ( ProjectCreateInput, diff --git a/tests/integration/client/current/test_project_resource.py b/tests/integration/client/current/test_project_resource.py index 50e81040..05e25d5c 100644 --- a/tests/integration/client/current/test_project_resource.py +++ b/tests/integration/client/current/test_project_resource.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.enums import ProjectVisibility from specklepy.core.api.inputs.project_inputs import ( diff --git a/tests/integration/client/current/test_subscription_resource.py b/tests/integration/client/current/test_subscription_resource.py index e3adfeb3..cf2d5a1d 100644 --- a/tests/integration/client/current/test_subscription_resource.py +++ b/tests/integration/client/current/test_subscription_resource.py @@ -2,6 +2,7 @@ from typing import Dict, Optional import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.enums import ( ProjectModelsUpdatedMessageType, @@ -23,7 +24,6 @@ UserProjectsUpdatedMessage, Version, ) - from tests.integration.conftest import create_client, create_version WAIT_PERIOD = 0.4 # time in seconds diff --git a/tests/integration/client/current/test_version_resource.py b/tests/integration/client/current/test_version_resource.py index d9e8402f..498808f7 100644 --- a/tests/integration/client/current/test_version_resource.py +++ b/tests/integration/client/current/test_version_resource.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.core.api.inputs.model_inputs import CreateModelInput, ModelVersionsFilter from specklepy.core.api.inputs.project_inputs import ProjectCreateInput @@ -16,7 +17,6 @@ Version, ) from specklepy.logging.exceptions import GraphQLException - from tests.integration.conftest import create_version diff --git a/tests/integration/client/deprecated/test_active_user.py b/tests/integration/client/deprecated/test_active_user.py index 98e14120..89f2c831 100644 --- a/tests/integration/client/deprecated/test_active_user.py +++ b/tests/integration/client/deprecated/test_active_user.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.api.models import Activity, ActivityCollection, User from specklepy.logging.exceptions import GraphQLException diff --git a/tests/integration/client/deprecated/test_branch.py b/tests/integration/client/deprecated/test_branch.py index ecef640c..27bf8ba4 100644 --- a/tests/integration/client/deprecated/test_branch.py +++ b/tests/integration/client/deprecated/test_branch.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api import operations from specklepy.api.models import Branch, Commit, Stream from specklepy.transports.server import ServerTransport diff --git a/tests/integration/client/deprecated/test_commit.py b/tests/integration/client/deprecated/test_commit.py index 15ed216f..9ce3c815 100644 --- a/tests/integration/client/deprecated/test_commit.py +++ b/tests/integration/client/deprecated/test_commit.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api import operations from specklepy.api.models import Commit, Stream from specklepy.transports.server.server import ServerTransport diff --git a/tests/integration/client/deprecated/test_objects.py b/tests/integration/client/deprecated/test_objects.py index 1018b717..f921ee66 100644 --- a/tests/integration/client/deprecated/test_objects.py +++ b/tests/integration/client/deprecated/test_objects.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.models import Stream from specklepy.objects import Base from specklepy.objects.encoding import ObjectArray diff --git a/tests/integration/client/deprecated/test_other_user.py b/tests/integration/client/deprecated/test_other_user.py index b1dc5cb4..4e88a10a 100644 --- a/tests/integration/client/deprecated/test_other_user.py +++ b/tests/integration/client/deprecated/test_other_user.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.api.models import Activity, ActivityCollection, LimitedUser diff --git a/tests/integration/client/deprecated/test_server.py b/tests/integration/client/deprecated/test_server.py index 6a71dfb9..37ac1ab7 100644 --- a/tests/integration/client/deprecated/test_server.py +++ b/tests/integration/client/deprecated/test_server.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.api.models import ServerInfo diff --git a/tests/integration/client/deprecated/test_stream.py b/tests/integration/client/deprecated/test_stream.py index 51b8a926..84ce5f7e 100644 --- a/tests/integration/client/deprecated/test_stream.py +++ b/tests/integration/client/deprecated/test_stream.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.api.models import ( Activity, diff --git a/tests/integration/client/deprecated/test_user.py b/tests/integration/client/deprecated/test_user.py index f47e6d33..150b01fe 100644 --- a/tests/integration/client/deprecated/test_user.py +++ b/tests/integration/client/deprecated/test_user.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.client import SpeckleClient from specklepy.api.models import Activity, ActivityCollection, User from specklepy.logging.exceptions import SpeckleException diff --git a/tests/integration/client/test_client_and_ops.py b/tests/integration/client/test_client_and_ops.py index 71b462ab..70d445a6 100644 --- a/tests/integration/client/test_client_and_ops.py +++ b/tests/integration/client/test_client_and_ops.py @@ -1,6 +1,7 @@ from tempfile import gettempdir import pytest + from specklepy.api import operations from specklepy.api.client import SpeckleClient from specklepy.api.credentials import Account, get_account_from_token diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 98f6326e..10a24360 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -5,6 +5,7 @@ import pytest import requests + from specklepy.api.client import SpeckleClient from specklepy.core.api import operations from specklepy.core.api.inputs.version_inputs import CreateVersionInput diff --git a/tests/integration/speckle_automate/test_automation_context.py b/tests/integration/speckle_automate/test_automation_context.py index 2c5695e5..b26c351c 100644 --- a/tests/integration/speckle_automate/test_automation_context.py +++ b/tests/integration/speckle_automate/test_automation_context.py @@ -6,6 +6,7 @@ import pytest from gql import gql + from speckle_automate import ( AutomationContext, AutomationRunData, diff --git a/tests/integration/test_serialization.py b/tests/integration/test_serialization.py index 1f286307..85bcd927 100644 --- a/tests/integration/test_serialization.py +++ b/tests/integration/test_serialization.py @@ -1,6 +1,7 @@ import json import pytest + from specklepy.api import operations from specklepy.objects import Base from specklepy.objects.fakemesh import FakeMesh diff --git a/tests/integration/test_wrapper.py b/tests/integration/test_wrapper.py index 7685ad0e..e08df074 100644 --- a/tests/integration/test_wrapper.py +++ b/tests/integration/test_wrapper.py @@ -6,6 +6,7 @@ from urllib.parse import unquote import pytest + from specklepy.api.wrapper import StreamWrapper from specklepy.core.helpers import speckle_path_provider from specklepy.logging.exceptions import SpeckleException diff --git a/tests/unit/test_account_server_migration.py b/tests/unit/test_account_server_migration.py index e233b221..a0af9c69 100644 --- a/tests/unit/test_account_server_migration.py +++ b/tests/unit/test_account_server_migration.py @@ -4,6 +4,7 @@ from urllib.parse import urlparse import pytest + from specklepy.core.api.credentials import Account, UserInfo, get_accounts_for_server from specklepy.core.api.models import ServerInfo, ServerMigration from specklepy.core.helpers import speckle_path_provider diff --git a/tests/unit/test_base.py b/tests/unit/test_base.py index 14495973..cf4af535 100644 --- a/tests/unit/test_base.py +++ b/tests/unit/test_base.py @@ -3,6 +3,7 @@ from typing import Dict, List, Optional, Union import pytest + from specklepy.api import operations from specklepy.logging.exceptions import SpeckleException, SpeckleInvalidUnitException from specklepy.objects_v2.base import Base diff --git a/tests/unit/test_geometry.py b/tests/unit/test_geometry.py index 75352446..ad3da59a 100644 --- a/tests/unit/test_geometry.py +++ b/tests/unit/test_geometry.py @@ -2,6 +2,7 @@ import json import pytest + from specklepy.api import operations from specklepy.logging.exceptions import SpeckleException from specklepy.objects.base import Base diff --git a/tests/unit/test_host_applications.py b/tests/unit/test_host_applications.py index 0845da90..de65bd30 100644 --- a/tests/unit/test_host_applications.py +++ b/tests/unit/test_host_applications.py @@ -1,4 +1,5 @@ import pytest + from specklepy.api.host_applications import ( _app_name_host_app_mapping, get_host_app_from_string, diff --git a/tests/unit/test_registering_base.py b/tests/unit/test_registering_base.py index 2cf9a5e8..65639b06 100644 --- a/tests/unit/test_registering_base.py +++ b/tests/unit/test_registering_base.py @@ -1,6 +1,7 @@ from typing import Type import pytest + from specklepy.objects_v2.base import Base from specklepy.objects_v2.structural import Concrete diff --git a/tests/unit/test_structural.py b/tests/unit/test_structural.py index 3f9152ab..0064a588 100644 --- a/tests/unit/test_structural.py +++ b/tests/unit/test_structural.py @@ -1,4 +1,5 @@ import pytest + from specklepy.objects_v2.geometry import Line, Mesh, Point, Vector from specklepy.objects_v2.structural.analysis import Model from specklepy.objects_v2.structural.geometry import ( diff --git a/tests/unit/test_transforms.py b/tests/unit/test_transforms.py index e1b20afb..ea85dd4c 100644 --- a/tests/unit/test_transforms.py +++ b/tests/unit/test_transforms.py @@ -1,6 +1,7 @@ from typing import List import pytest + from specklepy.api import operations from specklepy.objects_v2.geometry import Point, Vector from specklepy.objects_v2.other import Transform diff --git a/tests/unit/test_type_validation.py b/tests/unit/test_type_validation.py index 45a6ea55..4b845f7e 100644 --- a/tests/unit/test_type_validation.py +++ b/tests/unit/test_type_validation.py @@ -2,6 +2,7 @@ from typing import Any, Dict, List, Optional, Set, Tuple, Union import pytest + from specklepy.objects_v2.base import Base, _validate_type from specklepy.objects_v2.primitive import Interval diff --git a/tests/unit/test_unit_scaling.py b/tests/unit/test_unit_scaling.py index 6a4969f9..a7d414e4 100644 --- a/tests/unit/test_unit_scaling.py +++ b/tests/unit/test_unit_scaling.py @@ -1,4 +1,5 @@ import pytest + from specklepy.objects_v2.units import Units, get_scale_factor