Skip to content

Commit e461fe2

Browse files
authored
Merge pull request #59 from verda-cloud/datacrunch-shim
datacrunch package shim, tracking verda
2 parents 714bf31 + c4fceb1 commit e461fe2

25 files changed

Lines changed: 312 additions & 103 deletions

.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

.github/workflows/publish.yml

Lines changed: 0 additions & 41 deletions
This file was deleted.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
name: Publish datacrunch package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-24.04
10+
11+
environment:
12+
name: pypi
13+
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
version: "0.9.11"
25+
26+
- name: Set up Python
27+
run: uv python install
28+
29+
- name: Sync datacrunch version and dependency to verda
30+
run: |
31+
# read version from top-level project
32+
VERSION=$(uv version --short --package verda)
33+
echo "Syncing datacrunch to verda==$VERSION"
34+
35+
uv version --package datacrunch "$VERSION"
36+
uv add --package datacrunch "verda==$VERSION"
37+
38+
echo
39+
echo "Resulting pyproject.toml:"
40+
cat datacrunch_compat/pyproject.toml
41+
42+
- name: Build all packages
43+
run: uv build --all-packages
44+
45+
- name: Smoke test datacrunch (wheel)
46+
run: uv run --isolated --no-project --with dist/datacrunch-*.whl --with dist/verda-*.whl --with "responses==0.25.8" datacrunch_compat/tests/smoke_datacrunch.py
47+
48+
- name: Smoke test datacrunch (source distribution)
49+
run: uv run --isolated --no-project --with dist/datacrunch-*.tar.gz --with dist/verda-*.tar.gz --with "responses==0.25.8" datacrunch_compat/tests/smoke_datacrunch.py
50+
51+
# we don't use Trusted publishing for datacrunch package yet, thus we need secrets
52+
- name: Publish datacrunch
53+
env:
54+
UV_PUBLISH_USERNAME: ${{ secrets.PYPI_USERNAME }}
55+
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
56+
run: uv publish dist/datacrunch-*
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish verda package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
deploy:
9+
runs-on: ubuntu-24.04
10+
11+
environment:
12+
name: pypi
13+
14+
permissions:
15+
id-token: write
16+
contents: read
17+
18+
steps:
19+
- uses: actions/checkout@v5
20+
21+
- name: Install uv
22+
uses: astral-sh/setup-uv@v7
23+
with:
24+
version: "0.9.11"
25+
26+
- name: Set up Python
27+
run: uv python install
28+
29+
- name: Build verda
30+
run: uv build
31+
32+
- name: Smoke test verda (wheel)
33+
run: uv run --isolated --no-project --with dist/verda-*.whl --with "responses==0.25.8" tests/smoke_verda.py
34+
35+
- name: Smoke test verda (source distribution)
36+
run: uv run --isolated --no-project --with dist/verda-*.tar.gz --with "responses==0.25.8" tests/smoke_verda.py
37+
38+
# we use Trusted publishing for verda package, no keys necessary: https://docs.astral.sh/uv/guides/integration/github/#publishing-to-pypi
39+
- name: Publish verda package
40+
run: uv publish dist/verda-*

.github/workflows/unit_tests.yml

Lines changed: 7 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
@@ -39,3 +39,8 @@ jobs:
3939
uses: codecov/codecov-action@v1
4040
with:
4141
fail_ci_if_error: false
42+
43+
- name: Test datacrunch_compat with pytest
44+
working-directory: datacrunch_compat
45+
run: |
46+
uv run pytest

CHANGELOG.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,18 @@ 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
1118

12-
- `datacrunch` package is now `verda`, because the company [changed the name to Verda](https://verda.com/blog/datacrunch-is-changing-its-name-to-verda). Original `datacrunch` package does not go anywhere and would continue tracking `verda` releases.
19+
- `datacrunch` package is now `verda`, because [DataCrunch company changed its name to Verda](https://verda.com/blog/datacrunch-is-changing-its-name-to-verda). Original `datacrunch` package is deprecated, but it would continue tracking `verda` releases.
1320

1421
### Deprecated
1522

@@ -19,7 +26,7 @@ Was:
1926

2027
```shell
2128
uv add datacrunch
22-
pip3 install datacrunch
29+
pip install datacrunch
2330
```
2431

2532
```python
@@ -33,7 +40,7 @@ Now:
3340

3441
```shell
3542
uv add verda
36-
pip3 install verda
43+
pip install verda
3744
```
3845

3946
```python

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Verda Public API documentation [is available here](https://api.verda.com/v1/docs
2020

2121
```bash
2222
# via pip
23-
pip3 install verda
23+
pip install verda
2424

2525
# via uv
2626
uv add verda
@@ -117,7 +117,7 @@ Create a file in the root directory of the project:
117117

118118
```python
119119
# example.py
120-
from verda.verda import VerdaClient
120+
from verda import VerdaClient
121121

122122
CLIENT_SECRET = 'secret'
123123
CLIENT_ID = 'your-id'

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 is deprecated; use verda package instead: https://github.com/verda-cloud/sdk-python/blob/master/CHANGELOG.md#1170---2025-11-26',
51+
DeprecationWarning,
52+
stacklevel=2,
53+
)

0 commit comments

Comments
 (0)