Skip to content

Commit

Permalink
use uv in tox
Browse files Browse the repository at this point in the history
  • Loading branch information
alangenfeld committed Feb 16, 2024
1 parent ad928cb commit 58a02c6
Show file tree
Hide file tree
Showing 113 changed files with 268 additions and 111 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def build_dagster_ui_components_steps() -> List[CommandStep]:
CommandStepBuilder(":typescript: dagster-ui-components")
.run(
"cd js_modules/dagster-ui/packages/ui-components",
"pip install -U uv",
f"tox -vv -e {AvailablePythonVersion.to_tox_factor(AvailablePythonVersion.get_default())}",
)
.on_test_image(AvailablePythonVersion.get_default())
Expand Down Expand Up @@ -57,6 +58,7 @@ def build_dagster_ui_core_steps() -> List[CommandStep]:
CommandStepBuilder(":typescript: dagster-ui-core")
.run(
"cd js_modules/dagster-ui",
"pip install -U uv",
f"tox -vv -e {AvailablePythonVersion.to_tox_factor(AvailablePythonVersion.get_default())}",
)
.on_test_image(AvailablePythonVersion.get_default())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ def build_docs_steps() -> List[BuildkiteStep]:
CommandStepBuilder("docs apidoc build")
.run(
"cd docs",
"pip install -U uv",
"make apidoc-build",
# "echo '--- Checking git diff (ignoring whitespace) after docs build...'",
# "git diff --ignore-all-space --stat",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ def build_tox_step(
commands = [
*(extra_commands_pre or []),
f"cd {root_dir}",
"pip install -U uv",
f"echo -e {shlex.quote(buildkite_section_header)}",
tox_command,
*(extra_commands_post or []),
Expand Down
3 changes: 2 additions & 1 deletion docs/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ passenv = CI_* COVERALLS_REPO_TOKEN AWS_SECRET_ACCESS_KEY AWS_ACCESS_KEY_ID BUIL
usedevelop = False
allowlist_externals =
make
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
uv
install_command = uv pip install {opts} {packages}

[testenv:sphinx]
deps =
Expand Down
3 changes: 2 additions & 1 deletion examples/assets_dbt_python/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -19,6 +19,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/assets_dynamic_partitions/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -13,6 +13,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/assets_modern_data_stack/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -20,6 +20,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
4 changes: 2 additions & 2 deletions examples/assets_pandas_pyspark/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -13,9 +13,9 @@ deps =
-e ../../python_modules/libraries/dagster-spark
-e ../../python_modules/libraries/dagster-pyspark
-e .[test]
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
4 changes: 2 additions & 2 deletions examples/assets_pandas_type_metadata/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-graphql
-e ../../python_modules/dagster[test]
-e ../../python_modules/libraries/dagster-pandera/
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/assets_smoke_test/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -17,6 +17,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -vv
3 changes: 2 additions & 1 deletion examples/deploy_docker/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ skipsdist = True
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE* DEPLOY_DOCKER_WEBSERVER_HOST
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
3 changes: 2 additions & 1 deletion examples/deploy_ecs/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ skipsdist = True
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE* DEPLOY_DOCKER_WEBSERVER_HOST
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
-e ../../python_modules/dagster-test
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -s -vv {posargs}
3 changes: 2 additions & 1 deletion examples/deploy_k8s/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = True
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -15,6 +15,7 @@ deps =
-e ../../python_modules/libraries/dagster-celery-k8s
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
3 changes: 2 additions & 1 deletion examples/development_to_production/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = True
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -15,6 +15,7 @@ deps =
-e ../../python_modules/libraries/dagster-snowflake-pandas/
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
2 changes: 1 addition & 1 deletion examples/docs_snippets/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"seaborn",
"scikit-learn",
"slack_sdk",
"syrupy<4", # 3.7 compatible,
"syrupy",
"dbt-duckdb",
"xgboost",
"dagster-webserver[test]",
Expand Down
5 changes: 3 additions & 2 deletions examples/docs_snippets/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN POSTGRES_TEST_DB_HOST BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
-e ../../python_modules/dagster-graphql
-e ../../python_modules/dagster-webserver
-e ../../python_modules/dagster-webserver[test]
-e ../../python_modules/libraries/dagstermill[test]
-e ../../python_modules/libraries/dagster-airbyte
-e ../../python_modules/libraries/dagster-airflow
Expand Down Expand Up @@ -40,6 +40,7 @@ deps =
-e .[full]
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv {posargs}
3 changes: 2 additions & 1 deletion examples/experimental/assets_yaml_dsl/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../../python_modules/dagster[test]
-e ../../../python_modules/dagster-pipes
Expand All @@ -13,6 +13,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/feature_graph_backed_assets/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -13,6 +13,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/project_fully_featured/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE* SNOWFLAKE_ACCOUNT SNOWFLAKE_USER SNOWFLAKE_PASSWORD
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -20,6 +20,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/quickstart_aws/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -15,6 +15,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/quickstart_etl/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -14,6 +14,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/quickstart_gcp/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -17,6 +17,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/quickstart_snowflake/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = true
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
; note: "source" does not work at this time due to dagster-cloud source access
deps =
source: -e ../../python_modules/dagster[test]
Expand All @@ -18,6 +18,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
source: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
3 changes: 2 additions & 1 deletion examples/with_airflow/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -14,6 +14,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
airflow db init
Expand Down
3 changes: 2 additions & 1 deletion examples/with_great_expectations/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ skipsdist = true
[testenv]
download = True
passenv = CI_* COVERALLS_REPO_TOKEN BUILDKITE*
install_command = python -m pip install {opts} {packages} --config-settings editable_mode=compat
install_command = uv pip install {opts} {packages}
deps =
-e ../../python_modules/dagster[test]
-e ../../python_modules/dagster-pipes
Expand All @@ -15,6 +15,7 @@ deps =
-e .
allowlist_externals =
/bin/bash
uv
commands =
!windows: /bin/bash -c '! pip list --exclude-editable | grep -e dagster'
pytest -c ../../pyproject.toml -vv
Loading

0 comments on commit 58a02c6

Please sign in to comment.