From 1fe70035cf16f2b7fedc3e8cca38401fec4e5a9c Mon Sep 17 00:00:00 2001 From: BryanFauble <17128019+BryanFauble@users.noreply.github.com> Date: Tue, 16 Jan 2024 15:58:52 -0700 Subject: [PATCH] Move permissions from models folder (#1046) --- docs/reference/permissions.md | 2 +- synapseclient/__init__.py | 2 +- synapseclient/client.py | 2 +- synapseclient/{ => core}/models/permission.py | 0 synapseclient/models/__init__.py | 4 ---- tests/unit/synapseclient/unit_test_get_permissions.py | 2 +- 6 files changed, 4 insertions(+), 8 deletions(-) rename synapseclient/{ => core}/models/permission.py (100%) delete mode 100644 synapseclient/models/__init__.py diff --git a/docs/reference/permissions.md b/docs/reference/permissions.md index 0c83f3dc8..781e27fec 100644 --- a/docs/reference/permissions.md +++ b/docs/reference/permissions.md @@ -1,4 +1,4 @@ -::: synapseclient.models.permission.Permissions +::: synapseclient.Permissions options: members: - from_dict diff --git a/synapseclient/__init__.py b/synapseclient/__init__.py index 372c2e05d..88999016d 100644 --- a/synapseclient/__init__.py +++ b/synapseclient/__init__.py @@ -29,7 +29,7 @@ ) from .team import Team, UserProfile, UserGroupHeader, TeamMember from .wiki import Wiki -from synapseclient.models.permission import Permissions +from .core.models.permission import Permissions # ref = importlib.resources.files(__name__).joinpath("synapsePythonClient") # with ref.open("r") as fp: diff --git a/synapseclient/client.py b/synapseclient/client.py index 227d86020..4c7b06a06 100644 --- a/synapseclient/client.py +++ b/synapseclient/client.py @@ -119,7 +119,7 @@ from synapseclient.core.dozer import doze from typing import Union, Dict, List, Optional, Tuple -from synapseclient.models.permission import Permissions +from synapseclient.core.models.permission import Permissions from opentelemetry import trace tracer = trace.get_tracer("synapseclient") diff --git a/synapseclient/models/permission.py b/synapseclient/core/models/permission.py similarity index 100% rename from synapseclient/models/permission.py rename to synapseclient/core/models/permission.py diff --git a/synapseclient/models/__init__.py b/synapseclient/models/__init__.py deleted file mode 100644 index eab45dee5..000000000 --- a/synapseclient/models/__init__.py +++ /dev/null @@ -1,4 +0,0 @@ -# These are all of the models that are used by the Synapse client. -from .permission import Permissions - -__all__ = ["Permissions"] diff --git a/tests/unit/synapseclient/unit_test_get_permissions.py b/tests/unit/synapseclient/unit_test_get_permissions.py index 52cd6ebd1..96e687347 100644 --- a/tests/unit/synapseclient/unit_test_get_permissions.py +++ b/tests/unit/synapseclient/unit_test_get_permissions.py @@ -5,7 +5,7 @@ import pytest -from synapseclient.models import Permissions +from synapseclient import Permissions from synapseclient.entity import Entity from synapseclient.evaluation import Evaluation from typing import Dict