Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
databricks/sdk/__init__.py linguist-generated=true
databricks/sdk/errors/overrides.py linguist-generated=true
databricks/sdk/errors/platform.py linguist-generated=true
databricks/sdk/databricks/errors/overrides.py linguist-generated=true
databricks/sdk/databricks/errors/platform.py linguist-generated=true
databricks/sdk/service/apps.py linguist-generated=true
databricks/sdk/service/billing.py linguist-generated=true
databricks/sdk/service/catalog.py linguist-generated=true
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/external-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
pull_request_target:
types: [opened, reopened, synchronize]
branches:
- main
- dev/sdk-mod

jobs:
comment-on-pr:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ else
. .venv/bin/activate
endif
pip install '.[dev]'

install:
pip install .

Expand Down
12 changes: 6 additions & 6 deletions databricks/sdk/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Dict

from ..service.provisioning import Workspace
from .oauth import TokenSource
from .service.provisioning import Workspace


def add_workspace_id_header(cfg: "Config", headers: Dict[str, str]):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def runtime_native_auth(cfg: "Config") -> Optional[CredentialsProvider]:
# This import MUST be after the "DATABRICKS_RUNTIME_VERSION" check
# above, so that we are not throwing import errors when not in
# runtime and no config variables are set.
from databricks.sdk.runtime import (init_runtime_legacy_auth,
init_runtime_native_auth,
init_runtime_repl_auth)
from databricks.sdk.databricks.runtime import (init_runtime_legacy_auth,
init_runtime_native_auth,
init_runtime_repl_auth)

for init in [
init_runtime_native_auth,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from typing import Callable, Optional
from urllib import parse

from databricks.sdk import oauth
from databricks.sdk.oauth import Token
from databricks.sdk.databricks import oauth
from databricks.sdk.databricks.oauth import Token

URL_ENCODED_CONTENT_TYPE = "application/x-www-form-urlencoded"
JWT_BEARER_GRANT_TYPE = "urn:ietf:params:oauth:grant-type:jwt-bearer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
from dataclasses import dataclass
from typing import Any, Callable, Dict, List, Optional

from ..mixins import compute as compute_ext
from ..mixins import files as dbfs_ext
from ..service import compute, workspace
from .core import ApiClient, Config, DatabricksError
from .mixins import compute as compute_ext
from .mixins import files as dbfs_ext
from .service import compute, workspace

_LOG = logging.getLogger("databricks.sdk")

Expand Down Expand Up @@ -229,7 +229,7 @@ def __init__(self, config: "Config" = None):
@property
def widgets(self):
if self._widgets is None:
from ._widgets import widget_impl
from .._widgets import widget_impl

self._widgets = widget_impl()

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import requests

from databricks.sdk.errors import platform
from databricks.sdk.errors.base import DatabricksError
from databricks.sdk.databricks.errors import platform
from databricks.sdk.databricks.errors.base import DatabricksError

from .overrides import _ALL_OVERRIDES

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def displayHTML(html) -> None: # type: ignore

# We want to propagate the error in initialising dbutils because this is a core
# functionality of the sdk
from databricks.sdk.dbutils import RemoteDbUtils
from databricks.sdk.databricks.dbutils import RemoteDbUtils

from . import dbutils_stub

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import re
from typing import List, Optional, Tuple

from .version import __version__
from ..version import __version__

# Constants
RUNTIME_KEY = "runtime"
Expand Down
4 changes: 2 additions & 2 deletions databricks/sdk/mixins/compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from dataclasses import dataclass
from typing import Optional

from databricks.sdk.core import DatabricksError
from databricks.sdk.errors import OperationFailed
from databricks.sdk.databricks.core import DatabricksError
from databricks.sdk.databricks.errors import OperationFailed
from databricks.sdk.service import compute

_LOG = logging.getLogger("databricks.sdk")
Expand Down
15 changes: 8 additions & 7 deletions databricks/sdk/mixins/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,14 @@
import requests.adapters
from requests import RequestException

from .._base_client import _BaseClient, _RawResponse, _StreamingResponse
from .._property import _cached_property
from ..config import Config
from ..errors import AlreadyExists, NotFound
from ..errors.customizer import _RetryAfterCustomizer
from ..errors.mapper import _error_mapper
from ..retries import retried
from ..databricks._base_client import (_BaseClient, _RawResponse,
_StreamingResponse)
from ..databricks._property import _cached_property
from ..databricks.config import Config
from ..databricks.errors import AlreadyExists, NotFound
from ..databricks.errors.customizer import _RetryAfterCustomizer
from ..databricks.errors.mapper import _error_mapper
from ..databricks.retries import retried
from ..service import files
from ..service._internal import _escape_multi_segment_path_parameter
from ..service.files import DownloadResponse
Expand Down
2 changes: 1 addition & 1 deletion databricks/sdk/mixins/workspace.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from typing import Any, BinaryIO, Iterator, Optional, Union

from ..core import DatabricksError
from ..databricks.core import DatabricksError
from ..service.workspace import (ExportFormat, ImportFormat, Language,
ObjectInfo, ObjectType, WorkspaceAPI)

Expand Down
2 changes: 1 addition & 1 deletion databricks/sdk/service/apps.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/catalog.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/compute.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/dashboards.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/jobs.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/ml.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/pipelines.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/provisioning.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/serving.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/sql.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion databricks/sdk/service/vectorsearch.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion docs/gen-client-docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from typing import Optional, Any, get_args

from databricks.sdk import AccountClient, WorkspaceClient
from databricks.sdk.core import credentials_strategy
from databricks.sdk.databricks.core import credentials_strategy

__dir__ = os.path.dirname(__file__)
__examples__ = Path(f'{__dir__}/../examples').absolute()
Expand Down
2 changes: 1 addition & 1 deletion tests/clock.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from databricks.sdk.clock import Clock
from databricks.sdk.databricks.clock import Clock


class FakeClock(Clock):
Expand Down
4 changes: 2 additions & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import pytest as pytest
from pyfakefs.fake_filesystem_unittest import Patcher

from databricks.sdk.core import Config
from databricks.sdk.credentials_provider import credentials_strategy
from databricks.sdk.databricks.core import Config
from databricks.sdk.databricks.credentials_provider import credentials_strategy

from .integration.conftest import restorable_env # type: ignore

Expand Down
Loading
Loading