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: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix imports from `datacrunch.*` modules

## [1.17.1] - 2025-11-27

### Changed
Expand Down
3 changes: 3 additions & 0 deletions datacrunch_compat/datacrunch/InferenceClient/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from verda.InferenceClient import InferenceClient, InferenceResponse

__all__ = ['InferenceClient', 'InferenceResponse']
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.InferenceClient.inference_client import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/authentication.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.authentication import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/balance.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.balance import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.constants import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/containers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.containers import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/exceptions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.exceptions import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.helpers import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/http_client.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.http_client import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/images.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.images import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/instance_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.instance_types import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/instances.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.instances import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/locations.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.locations import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/ssh_keys.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.ssh_keys import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/startup_scripts.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.startup_scripts import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/volume_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.volume_types import *
1 change: 1 addition & 0 deletions datacrunch_compat/datacrunch/volumes.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from verda.volumes import *
7 changes: 6 additions & 1 deletion datacrunch_compat/tests/smoke_datacrunch.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import datacrunch
import responses
from datacrunch import DataCrunchClient
from datacrunch.constants import Locations
from datacrunch.InferenceClient.inference_client import AsyncStatus

BASE_URL = 'https://example.com'

Expand All @@ -23,6 +24,10 @@ def main():
client = DataCrunchClient('id', 'secret', BASE_URL)
assert client.constants.base_url == BASE_URL

assert AsyncStatus.Initialized == 'Initialized'

assert Locations.FIN_03 == 'FIN-03'


if __name__ == '__main__':
main()
18 changes: 18 additions & 0 deletions datacrunch_compat/tests/test_datacrunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,21 @@ def test_datacrunch_constants_module():

assert constants.base_url == 'url'
assert constants.version == 'v1'


def test_datacrunch_constants_submodule():
# Test that old re-exports in datacrunch.constants still work

with pytest.warns(DeprecationWarning, match='datacrunch is deprecated'):
from datacrunch.constants import Locations

assert Locations.FIN_03 == 'FIN-03'


def test_datacrunch_inference_submodule():
# Test that old re-exports in datacrunch.InferenceClient.* still work

with pytest.warns(DeprecationWarning, match='datacrunch is deprecated'):
from datacrunch.InferenceClient.inference_client import AsyncStatus

assert AsyncStatus.Initialized == 'Initialized'
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ ignore = ["F401", "B006", "D100", "D105", "D107"]
[tool.ruff.lint.per-file-ignores]
"{tests,examples,datacrunch_compat/tests}/*" = ["D"]
"__init__.py" = ["D104"]
"datacrunch_compat/datacrunch/*.py" = ["F403"]

[tool.ruff.format]
quote-style = "single"
Expand Down