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
8 changes: 4 additions & 4 deletions .codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"api_changelog": true,
"formatter": "go run golang.org/x/tools/cmd/goimports@latest -w $FILENAMES && go fmt ./...",
"version": {
"experimental/python/README.md": "version $VERSION or above",
"experimental/python/databricks/bundles/version.py": "__version__ = \"$VERSION\"",
"experimental/python/pyproject.toml": "version = \"$VERSION\"",
"experimental/python/uv.lock": "name = \"databricks-bundles\"\nversion = \"$VERSION\"",
"python/README.md": "version $VERSION or above",
"python/databricks/bundles/version.py": "__version__ = \"$VERSION\"",
"python/pyproject.toml": "version = \"$VERSION\"",
"python/uv.lock": "name = \"databricks-bundles\"\nversion = \"$VERSION\"",
"libs/template/templates/experimental-jobs-as-code/library/versions.tmpl": "{{define \"latest_databricks_bundles_version\" -}}$VERSION{{- end}}",
"libs/template/templates/default/library/versions.tmpl": "{{define \"latest_databricks_bundles_version\" -}}$VERSION{{- end}}"
},
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ jobs:
version: "0.6.5"

- name: Verify that python/codegen is up to date
working-directory: experimental/python
working-directory: python
run: |-
make codegen

if ! ( git diff --exit-code ); then
echo "Generated Python code is not up-to-date. Please run 'pushd experimental/python && make codegen' and commit the changes."
echo "Generated Python code is not up-to-date. Please run 'pushd python && make codegen' and commit the changes."

exit 1
fi
10 changes: 5 additions & 5 deletions .github/workflows/python_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ on:
pull_request:
types: [opened, synchronize]
paths:
- experimental/python/**
- python/**
merge_group:
types: [checks_requested]
paths:
- experimental/python/**
- python/**
push:
# Always run on push to main. The build cache can only be reused
# if it was saved by a run from the repository's default branch.
Expand Down Expand Up @@ -39,7 +39,7 @@ jobs:
version: "0.6.5"

- name: Run tests
working-directory: experimental/python
working-directory: python
run: make test

python_linters:
Expand All @@ -56,7 +56,7 @@ jobs:
version: "0.6.5"

- name: Run lint
working-directory: experimental/python
working-directory: python
run: make lint

python_docs:
Expand All @@ -73,5 +73,5 @@ jobs:
version: "0.6.5"

- name: Run docs
working-directory: experimental/python
working-directory: python
run: make docs
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,10 @@ jobs:
version: "0.6.5"

- name: Build wheel
working-directory: experimental/python
working-directory: python
run: make build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
with:
packages-dir: experimental/python/dist
packages-dir: python/dist
4 changes: 2 additions & 2 deletions .wsignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
.codegen/_openapi_sha
.release_metadata.json
bundle/schema/jsonschema.json
experimental/python/docs/images/databricks-logo.svg
python/docs/images/databricks-logo.svg
**/*.dist-info/METADATA
**/*.dist-info/WHEEL

Expand All @@ -25,7 +25,7 @@ cmd/workspace/**/*.go
cmd/account/**/*.go

# Extra whitespace in generated Python models
experimental/python/databricks/bundles/*/_models/*.py
python/databricks/bundles/*/_models/*.py

# Developed elsewhere:
internal/genkit/tagging.py
Expand Down
2 changes: 1 addition & 1 deletion acceptance/acceptance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ func buildDatabricksBundlesWheel(t *testing.T, buildDir string) string {
// so we prepare here by keeping only one.
_ = prepareWheelBuildDirectory(t, buildDir)

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

latestWheel := prepareWheelBuildDirectory(t, buildDir)
if latestWheel == "" {
Expand Down
2 changes: 1 addition & 1 deletion bundle/config/mutator/python/python_mutator.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ func getOpts(b *bundle.Bundle, phase phase) (opts, error) {
pythonEnabled := !reflect.DeepEqual(b.Config.Python, config.Python{})

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

if experimentalPythonEnabled && pythonEnabled {
Expand Down
2 changes: 1 addition & 1 deletion bundle/config/mutator/python/python_mutator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ func TestGetOps_PyDABs(t *testing.T) {
},
}, PythonMutatorPhaseLoadResources)

assert.Error(t, err, "experimental/pydabs is deprecated, use experimental/python instead (https://docs.databricks.com/dev-tools/bundles/python)")
assert.Error(t, err, "experimental/pydabs is deprecated, use python instead (https://docs.databricks.com/dev-tools/bundles/python)")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this error come from Python?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it's in golang code

}

func TestGetOps_empty(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion libs/dyn/dynvar/ref.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
var (
// !!! Should be in sync with _variable_regex in Python code.
// !!!
// !!! See experimental/python/databricks/bundles/core/_transform.py
// !!! See python/databricks/bundles/core/_transform.py
baseVarDef = `[a-zA-Z]+([-_]*[a-zA-Z0-9]+)*`
re = regexp.MustCompile(fmt.Sprintf(`\$\{(%s(\.%s(\[[0-9]+\])*)*(\[[0-9]+\])*)\}`, baseVarDef, baseVarDef))
)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion experimental/python/README.md → python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Python for Databricks Asset Bundles extends [Databricks Asset Bundles](https://d

Documentation is available at https://docs.databricks.com/dev-tools/cli/databricks-cli.html.

Reference documentation is available at https://databricks.github.io/cli/experimental/python/
Reference documentation is available at https://databricks.github.io/cli/python/

## Getting started

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,9 @@ def _parse_bool(value) -> Optional[bool]:

def _load_spec() -> dict:
path = (
Path(__file__).parent # ./experimental/python/codegen/codegen
/ ".." # ./experimental/python/codegen
/ ".." # ./experimental/python/
/ ".." # ./experimental
Path(__file__).parent # ./python/codegen/codegen
/ ".." # ./python/codegen
/ ".." # ./python/
/ ".." # ./
/ "./bundle/schema/jsonschema.json"
)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def _read_conf(input: dict) -> tuple[_Conf, Diagnostics]:
return (
_Conf(),
Diagnostics.create_error(
"'experimental/pydabs' is not supported by 'databricks-bundles', use 'experimental/python' instead",
"'experimental/pydabs' is not supported by 'databricks-bundles', use 'python' instead",
detail="",
location=None,
path=("experimental", "pydabs"),
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion tools/post-generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ fi
go tool -modfile=tools/go.mod yamlfmt .github/workflows/tagging.yml

# Generate PyDABs code.
make -C experimental/python codegen
make -C python codegen