Skip to content

Commit ab4e802

Browse files
authored
[Python] Move python directory (#3851)
## Changes Move `experimental/python` -> `python` ## Why The Python package is no longer experimental.
1 parent 8126230 commit ab4e802

File tree

234 files changed

+25
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

234 files changed

+25
-26
lines changed

.codegen.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"api_changelog": true,
44
"formatter": "go run golang.org/x/tools/cmd/goimports@latest -w $FILENAMES && go fmt ./...",
55
"version": {
6-
"experimental/python/README.md": "version $VERSION or above",
7-
"experimental/python/databricks/bundles/version.py": "__version__ = \"$VERSION\"",
8-
"experimental/python/pyproject.toml": "version = \"$VERSION\"",
9-
"experimental/python/uv.lock": "name = \"databricks-bundles\"\nversion = \"$VERSION\"",
6+
"python/README.md": "version $VERSION or above",
7+
"python/databricks/bundles/version.py": "__version__ = \"$VERSION\"",
8+
"python/pyproject.toml": "version = \"$VERSION\"",
9+
"python/uv.lock": "name = \"databricks-bundles\"\nversion = \"$VERSION\"",
1010
"libs/template/templates/experimental-jobs-as-code/library/versions.tmpl": "{{define \"latest_databricks_bundles_version\" -}}$VERSION{{- end}}",
1111
"libs/template/templates/default/library/versions.tmpl": "{{define \"latest_databricks_bundles_version\" -}}$VERSION{{- end}}"
1212
},

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ jobs:
214214
version: "0.6.5"
215215

216216
- name: Verify that python/codegen is up to date
217-
working-directory: experimental/python
217+
working-directory: python
218218
run: |-
219219
make codegen
220220
221221
if ! ( git diff --exit-code ); then
222-
echo "Generated Python code is not up-to-date. Please run 'pushd experimental/python && make codegen' and commit the changes."
222+
echo "Generated Python code is not up-to-date. Please run 'pushd python && make codegen' and commit the changes."
223223
224224
exit 1
225225
fi

.github/workflows/python_push.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ on:
44
pull_request:
55
types: [opened, synchronize]
66
paths:
7-
- experimental/python/**
7+
- python/**
88
merge_group:
99
types: [checks_requested]
1010
paths:
11-
- experimental/python/**
11+
- python/**
1212
push:
1313
# Always run on push to main. The build cache can only be reused
1414
# if it was saved by a run from the repository's default branch.
@@ -39,7 +39,7 @@ jobs:
3939
version: "0.6.5"
4040

4141
- name: Run tests
42-
working-directory: experimental/python
42+
working-directory: python
4343
run: make test
4444

4545
python_linters:
@@ -56,7 +56,7 @@ jobs:
5656
version: "0.6.5"
5757

5858
- name: Run lint
59-
working-directory: experimental/python
59+
working-directory: python
6060
run: make lint
6161

6262
python_docs:
@@ -73,5 +73,5 @@ jobs:
7373
version: "0.6.5"
7474

7575
- name: Run docs
76-
working-directory: experimental/python
76+
working-directory: python
7777
run: make docs

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ jobs:
183183
version: "0.6.5"
184184

185185
- name: Build wheel
186-
working-directory: experimental/python
186+
working-directory: python
187187
run: make build
188188

189189
- name: Publish package distributions to PyPI
190190
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
191191
with:
192-
packages-dir: experimental/python/dist
192+
packages-dir: python/dist

.wsignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
.codegen/_openapi_sha
44
.release_metadata.json
55
bundle/schema/jsonschema.json
6-
experimental/python/docs/images/databricks-logo.svg
6+
python/docs/images/databricks-logo.svg
77
**/*.dist-info/METADATA
88
**/*.dist-info/WHEEL
99

@@ -25,7 +25,7 @@ cmd/workspace/**/*.go
2525
cmd/account/**/*.go
2626

2727
# Extra whitespace in generated Python models
28-
experimental/python/databricks/bundles/*/_models/*.py
28+
python/databricks/bundles/*/_models/*.py
2929

3030
# Developed elsewhere:
3131
internal/genkit/tagging.py

acceptance/acceptance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,7 +1241,7 @@ func buildDatabricksBundlesWheel(t *testing.T, buildDir string) string {
12411241
// so we prepare here by keeping only one.
12421242
_ = prepareWheelBuildDirectory(t, buildDir)
12431243

1244-
RunCommand(t, []string{"uv", "build", "--no-cache", "-q", "--wheel", "--out-dir", buildDir}, "../experimental/python")
1244+
RunCommand(t, []string{"uv", "build", "--no-cache", "-q", "--wheel", "--out-dir", buildDir}, "../python")
12451245

12461246
latestWheel := prepareWheelBuildDirectory(t, buildDir)
12471247
if latestWheel == "" {

bundle/config/mutator/python/python_mutator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ func getOpts(b *bundle.Bundle, phase phase) (opts, error) {
120120
pythonEnabled := !reflect.DeepEqual(b.Config.Python, config.Python{})
121121

122122
if pydabsEnabled {
123-
return opts{}, errors.New("experimental/pydabs is deprecated, use experimental/python instead (https://docs.databricks.com/dev-tools/bundles/python)")
123+
return opts{}, errors.New("experimental/pydabs is deprecated, use python instead (https://docs.databricks.com/dev-tools/bundles/python)")
124124
}
125125

126126
if experimentalPythonEnabled && pythonEnabled {

bundle/config/mutator/python/python_mutator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ func TestGetOps_PyDABs(t *testing.T) {
394394
},
395395
}, PythonMutatorPhaseLoadResources)
396396

397-
assert.Error(t, err, "experimental/pydabs is deprecated, use experimental/python instead (https://docs.databricks.com/dev-tools/bundles/python)")
397+
assert.Error(t, err, "experimental/pydabs is deprecated, use python instead (https://docs.databricks.com/dev-tools/bundles/python)")
398398
}
399399

400400
func TestGetOps_empty(t *testing.T) {

libs/dyn/dynvar/ref.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
var (
1111
// !!! Should be in sync with _variable_regex in Python code.
1212
// !!!
13-
// !!! See experimental/python/databricks/bundles/core/_transform.py
13+
// !!! See python/databricks/bundles/core/_transform.py
1414
baseVarDef = `[a-zA-Z]+([-_]*[a-zA-Z0-9]+)*`
1515
re = regexp.MustCompile(fmt.Sprintf(`\$\{(%s(\.%s(\[[0-9]+\])*)*(\[[0-9]+\])*)\}`, baseVarDef, baseVarDef))
1616
)
File renamed without changes.

0 commit comments

Comments
 (0)