Skip to content

Commit e2f3d95

Browse files
committed
datacrunch package shim, tracking verda
1 parent d7d6886 commit e2f3d95

File tree

14 files changed

+223
-41
lines changed

14 files changed

+223
-41
lines changed

.github/workflows/format.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- uses: actions/checkout@v5
1818

1919
- name: Install uv
20-
uses: astral-sh/setup-uv@v6
20+
uses: astral-sh/setup-uv@v7
2121
with:
22-
version: "0.9.5"
22+
version: "0.9.11"
2323

2424
- name: Install dependencies
2525
run: uv sync --dev

.github/workflows/lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ jobs:
1717
- uses: actions/checkout@v5
1818

1919
- name: Install uv
20-
uses: astral-sh/setup-uv@v6
20+
uses: astral-sh/setup-uv@v7
2121
with:
22-
version: "0.9.5"
22+
version: "0.9.11"
2323

2424
- name: Install dependencies
2525
run: uv sync --dev
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Publish datacrunch package
2+
3+
on:
4+
workflow_run:
5+
workflows: ["Publish verda package"]
6+
types:
7+
- completed
8+
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-24.04
12+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
13+
14+
environment:
15+
name: pypi
16+
17+
permissions:
18+
id-token: write
19+
contents: read
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v5
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v7
27+
with:
28+
version: "0.9.11"
29+
30+
- name: Sync datacrunch version and dependency to verda
31+
working-directory: datacrunch_compat
32+
run: |
33+
# read version from top-level project
34+
VERSION=$(uv version --short --project ..)
35+
echo "Syncing datacrunch to verda==$VERSION"
36+
37+
uv version "$VERSION"
38+
uv add "verda==$VERSION"
39+
40+
echo
41+
echo "Resulting pyproject.toml:"
42+
cat pyproject.toml
43+
44+
- name: Set up Python
45+
working-directory: datacrunch_compat
46+
run: uv python install
47+
48+
- name: Build
49+
working-directory: datacrunch_compat
50+
run: uv build
51+
52+
# check that basic features work and we didn't miss to include crucial files
53+
- name: Smoke test (wheel)
54+
working-directory: datacrunch_compat
55+
run: uv run --isolated --no-project --with dist/*.whl --with "responses==0.25.8" tests/smoke_datacrunch.py
56+
57+
- name: Smoke test (source distribution)
58+
working-directory: datacrunch_compat
59+
run: uv run --isolated --no-project --with dist/*.tar.gz --with "responses==0.25.8" tests/smoke_datacrunch.py
60+
61+
- name: Publish
62+
working-directory: datacrunch_compat
63+
env:
64+
UV_PUBLISH_USERNAME: ${{ secrets.PYPI_USERNAME }}
65+
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
66+
run: uv publish
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Publish verda to PyPI"
1+
name: Publish verda package
22

33
on:
44
release:

.github/workflows/unit_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ jobs:
2020
- uses: actions/checkout@v5
2121

2222
- name: Install uv
23-
uses: astral-sh/setup-uv@v6
23+
uses: astral-sh/setup-uv@v7
2424
with:
25-
version: "0.9.5"
25+
version: "0.9.11"
2626
python-version: ${{ matrix.python-version }}
2727

2828
- name: Set up Python

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased]
9+
10+
### Changed
11+
12+
- `datacrunch` package now imports `verda`, tracking its releases
13+
- Moved `DataCrunchClient` and `.datacrunch` sub-module into compatibility `datacrunch` package
14+
815
## [1.17.0] - 2025-11-26
916

1017
### Highlights

datacrunch_compat/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# datacrunch is now verda
2+
3+
This package has been [renamed](https://verda.com/blog/datacrunch-is-changing-its-name-to-verda). Use `pip install verda` or `uv add verda` instead.
4+
5+
New package: https://pypi.org/project/verda/
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Compatibility layer for deprecated `datacrunch` package
2+
3+
from verda import (
4+
InferenceClient,
5+
__version__,
6+
authentication,
7+
balance,
8+
constants,
9+
containers,
10+
exceptions,
11+
helpers,
12+
http_client,
13+
images,
14+
instance_types,
15+
instances,
16+
locations,
17+
ssh_keys,
18+
startup_scripts,
19+
volume_types,
20+
volumes,
21+
)
22+
from verda import VerdaClient as DataCrunchClient
23+
24+
# For old `from datacrunch import *``
25+
__all__ = [
26+
'DataCrunchClient',
27+
'InferenceClient',
28+
'__version__',
29+
'authentication',
30+
'balance',
31+
'constants',
32+
'containers',
33+
'datacrunch',
34+
'exceptions',
35+
'helpers',
36+
'http_client',
37+
'images',
38+
'instance_types',
39+
'instances',
40+
'locations',
41+
'ssh_keys',
42+
'startup_scripts',
43+
'volume_types',
44+
'volumes',
45+
]
46+
47+
import warnings
48+
49+
warnings.warn(
50+
'datacrunch import is deprecated; use verda instead.',
51+
DeprecationWarning,
52+
stacklevel=2,
53+
)

verda/datacrunch.py renamed to datacrunch_compat/datacrunch/datacrunch.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Frozen, minimal compatibility layer for old DataCrunch API
1+
# Compatibility layer for deprecated `datacrunch.datacrunch` package
22

3-
from verda import DataCrunchClient
3+
from verda import VerdaClient as DataCrunchClient
44
from verda._version import __version__
55
from verda.authentication.authentication import AuthenticationService
66
from verda.balance.balance import BalanceService
@@ -16,6 +16,7 @@
1616
from verda.volume_types.volume_types import VolumeTypesService
1717
from verda.volumes.volumes import VolumesService
1818

19+
# for `from datacrunch.datacrunch import *`
1920
__all__ = [
2021
'AuthenticationService',
2122
'BalanceService',
@@ -37,7 +38,7 @@
3738
import warnings
3839

3940
warnings.warn(
40-
'datacrunch.datacrunch is deprecated; use `from verda` instead.',
41+
'datacrunch import is deprecated; use verda instead.',
4142
DeprecationWarning,
4243
stacklevel=2,
4344
)

datacrunch_compat/pyproject.toml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
[project]
2+
name = "datacrunch"
3+
version = "0.0.0" # version set by .github/workflows/publish_datacrunch.yml before release
4+
description = "datacrunch is now verda"
5+
readme = "README.md"
6+
requires-python = ">=3.10"
7+
8+
authors = [{ name = "Verda Cloud Oy", email = "info@verda.com" }]
9+
10+
classifiers = [
11+
"Development Status :: 7 - Inactive",
12+
"Intended Audience :: Developers",
13+
"License :: OSI Approved :: MIT License",
14+
"Natural Language :: English",
15+
"Operating System :: OS Independent",
16+
"Programming Language :: Python :: 3",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
]
21+
22+
[project.urls]
23+
Homepage = "https://github.com/verda-cloud"
24+
Documentation = "https://datacrunch-python.readthedocs.io/"
25+
Repository = "https://github.com/verda-cloud/sdk-python"
26+
Changelog = "https://datacrunch-python.readthedocs.io/en/latest/changelog.html"
27+
28+
[build-system]
29+
requires = ["uv_build>=0.9.5,<0.10.0"]
30+
build-backend = "uv_build"
31+
32+
[tool.uv.build-backend]
33+
module-name = "datacrunch"
34+
module-root = ""
35+
36+
[dependency-groups]
37+
dev = [
38+
"pytest>=9.0.1",
39+
"pytest-responses>=0.5.1",
40+
"responses>=0.25.8",
41+
]

0 commit comments

Comments
 (0)