Skip to content
Open
Show file tree
Hide file tree
Changes from 12 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
13 changes: 12 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ jobs:
test:
strategy:
fail-fast: false
matrix:
dep-type:
- latest
- frozen
runs-on: ${{ inputs.os }}
steps:
- name: Checkout
Expand All @@ -27,9 +31,16 @@ jobs:
python-version: ${{ inputs.pyVersion }}

- name: Run tests
run: make dev install test
shell: bash
run: |
if [ "${{ matrix.dep-type }}" = "latest" ]; then
make dev-latest test PYTHON_VERSION=${{ inputs.pyVersion }}
else
make dev test PYTHON_VERSION=${{ inputs.pyVersion }}
fi

- name: Publish test coverage
if: ${{ matrix.dep-type == 'frozen' }}
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.venv
.venv*
*.
build
dist
Expand All @@ -10,4 +10,5 @@ __pycache__
databricks-sdk-py.iml
.databricks
.coverage
htmlcov
htmlcov
.python-version
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just making sure my usage of pyenv doesn't accidentally pollute the repo.

1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ exclude NEXT_CHANGELOG.md
exclude tagging.py
exclude .package.json
exclude .release_metadata.json
exclude requirements-dev-*.txt
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This ensures the requirements files are not unnecessarily bundled in the source wheel file.

Copy link
Contributor

@renaudhartert-db renaudhartert-db Jun 20, 2025

Choose a reason for hiding this comment

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

It's a shame we cannot add a comment in the manifest to make that clear


recursive-exclude docs *
recursive-exclude examples *
Expand Down
37 changes: 33 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,41 @@
dev:
python3 -m venv .venv
# Default Python version if not specified
# This is expected to have the form X.Y.
# The corresponding requirements file is requirements-dev-pyXY.txt.
PYTHON_VERSION ?= 3.13
PYTHON_VERSION_NO_DOTS = $(subst .,,$(PYTHON_VERSION))

# Generate requirements filename based on Python version
REQUIREMENTS_FILE = requirements-dev-py$(PYTHON_VERSION_NO_DOTS).txt

# A quick one-liner to update all environments using pyenv:
# for v in 3.8 3.9 3.10 3.11 3.12 3.13; do
# pyenv local $v
# make dev-env update-dev-dep-lockfile PYTHON_VERSION=$v
# done

dev-env:
python -m venv .venv$(PYTHON_VERSION_NO_DOTS)
Copy link
Contributor

@renaudhartert-db renaudhartert-db Jun 13, 2025

Choose a reason for hiding this comment

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

IIUC, the python version in that environment will be the one used to run that command, which might be different from the one specified in the environment name. Is that an issue?

ifeq ($(OS), Windows_NT)
.venv\Scripts\activate
.venv$(PYTHON_VERSION_NO_DOTS)\Scripts\activate
else
. .venv/bin/activate
. .venv$(PYTHON_VERSION_NO_DOTS)/bin/activate
endif

dev: dev-env
# Install all dependencies from the version-specific requirements file
# Regenerate this file with `make update-dev-dep-lockfile PYTHON_VERSION=X.Y`
pip install -r $(REQUIREMENTS_FILE)

dev-latest: dev-env
# Install all dependencies from the pyproject.toml file
pip install '.[dev]'

install-pip-tools:
pip install pip-tools

update-dev-dep-lockfile: install-pip-tools
pip-compile pyproject.toml --extra dev --output-file $(REQUIREMENTS_FILE)

install:
pip install .

Expand Down
276 changes: 276 additions & 0 deletions requirements-dev-py310.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,276 @@
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --extra=dev --output-file=requirements-dev-py310.txt pyproject.toml
#
annotated-types==0.7.0
# via pydantic
anyio==4.9.0
# via
# httpx
# openai
asttokens==3.0.0
# via stack-data
autoflake==2.3.1
# via databricks-sdk (pyproject.toml)
black==25.1.0
# via databricks-sdk (pyproject.toml)
build==1.2.2.post1
# via databricks-sdk (pyproject.toml)
cachetools==5.5.2
# via google-auth
certifi==2025.4.26
# via
# httpcore
# httpx
# requests
charset-normalizer==3.4.2
# via requests
click==8.2.1
# via black
comm==0.2.2
# via ipywidgets
coverage[toml]==7.9.0
# via pytest-cov
databricks-connect==16.1.6
# via databricks-sdk (pyproject.toml)
databricks-sdk==0.57.0
# via databricks-connect
decorator==5.2.1
# via ipython
distro==1.9.0
# via openai
exceptiongroup==1.3.0
# via
# anyio
# ipython
# pytest
execnet==2.1.1
# via pytest-xdist
executing==2.2.0
# via stack-data
google-auth==2.40.3
# via
# databricks-sdk
# databricks-sdk (pyproject.toml)
googleapis-common-protos==1.70.0
# via
# databricks-connect
# grpcio-status
grpcio==1.73.0
# via
# databricks-connect
# grpcio-status
grpcio-status==1.73.0
# via databricks-connect
h11==0.16.0
# via httpcore
httpcore==1.0.9
# via httpx
httpx==0.28.1
# via
# databricks-sdk (pyproject.toml)
# langsmith
# openai
idna==3.10
# via
# anyio
# httpx
# requests
iniconfig==2.1.0
# via pytest
ipython==8.37.0
# via
# databricks-sdk (pyproject.toml)
# ipywidgets
ipywidgets==8.1.7
# via databricks-sdk (pyproject.toml)
isort==6.0.1
# via databricks-sdk (pyproject.toml)
jedi==0.19.2
# via ipython
jiter==0.10.0
# via openai
jsonpatch==1.33
# via langchain-core
jsonpointer==3.0.0
# via jsonpatch
jupyterlab-widgets==3.0.15
# via ipywidgets
langchain-core==0.3.65
# via langchain-openai
langchain-openai==0.3.22 ; python_version > "3.7"
# via databricks-sdk (pyproject.toml)
langsmith==0.3.45
# via langchain-core
matplotlib-inline==0.1.7
# via ipython
mypy-extensions==1.1.0
# via black
numpy==1.26.4
# via
# databricks-connect
# pandas
openai==1.86.0
# via
# databricks-sdk (pyproject.toml)
# langchain-openai
orjson==3.10.18
# via langsmith
packaging==24.2
# via
# black
# build
# databricks-connect
# langchain-core
# langsmith
# pytest
# pytest-rerunfailures
pandas==2.3.0
# via databricks-connect
parso==0.8.4
# via jedi
pathspec==0.12.1
# via black
pexpect==4.9.0
# via ipython
platformdirs==4.3.8
# via black
pluggy==1.6.0
# via
# pytest
# pytest-cov
prompt-toolkit==3.0.51
# via ipython
protobuf==6.31.1
# via
# googleapis-common-protos
# grpcio-status
ptyprocess==0.7.0
# via pexpect
pure-eval==0.2.3
# via stack-data
py4j==0.10.9.7
# via databricks-connect
pyarrow==20.0.0
# via databricks-connect
pyasn1==0.6.1
# via
# pyasn1-modules
# rsa
pyasn1-modules==0.4.2
# via google-auth
pycodestyle==2.13.0
# via databricks-sdk (pyproject.toml)
pydantic==2.11.6
# via
# langchain-core
# langsmith
# openai
pydantic-core==2.33.2
# via pydantic
pyfakefs==5.8.0
# via databricks-sdk (pyproject.toml)
pyflakes==3.3.2
# via autoflake
pygments==2.19.1
# via
# ipython
# pytest
pyproject-hooks==1.2.0
# via build
pytest==8.4.0
# via
# databricks-sdk (pyproject.toml)
# pytest-cov
# pytest-mock
# pytest-rerunfailures
# pytest-xdist
pytest-cov==6.2.1
# via databricks-sdk (pyproject.toml)
pytest-mock==3.14.1
# via databricks-sdk (pyproject.toml)
pytest-rerunfailures==15.1
# via databricks-sdk (pyproject.toml)
pytest-xdist==3.7.0
# via databricks-sdk (pyproject.toml)
python-dateutil==2.9.0.post0
# via pandas
pytz==2025.2
# via pandas
pyyaml==6.0.2
# via langchain-core
regex==2024.11.6
# via tiktoken
requests==2.32.4
# via
# databricks-sdk
# databricks-sdk (pyproject.toml)
# langsmith
# requests-mock
# requests-toolbelt
# tiktoken
requests-mock==1.12.1
# via databricks-sdk (pyproject.toml)
requests-toolbelt==1.0.0
# via langsmith
rsa==4.9.1
# via google-auth
six==1.17.0
# via
# databricks-connect
# python-dateutil
sniffio==1.3.1
# via
# anyio
# openai
stack-data==0.6.3
# via ipython
tenacity==9.1.2
# via langchain-core
tiktoken==0.9.0
# via langchain-openai
tomli==2.2.1
# via
# autoflake
# black
# build
# coverage
# pytest
tqdm==4.67.1
# via openai
traitlets==5.14.3
# via
# comm
# ipython
# ipywidgets
# matplotlib-inline
typing-extensions==4.14.0
# via
# anyio
# black
# exceptiongroup
# ipython
# langchain-core
# openai
# pydantic
# pydantic-core
# typing-inspection
typing-inspection==0.4.1
# via pydantic
tzdata==2025.2
# via pandas
urllib3==2.4.0
# via requests
wcwidth==0.2.13
# via prompt-toolkit
wheel==0.45.1
# via databricks-sdk (pyproject.toml)
widgetsnbextension==4.0.14
# via ipywidgets
zstandard==0.23.0
# via langsmith

# The following packages are considered to be unsafe in a requirements file:
# setuptools
Loading
Loading