Skip to content

Commit

Permalink
switch to uv
Browse files Browse the repository at this point in the history
  • Loading branch information
dwreeves committed Jan 7, 2025
1 parent e79146e commit dd96a82
Show file tree
Hide file tree
Showing 6 changed files with 1,228 additions and 2,701 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@ jobs:
--health-retries 5
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Install Poetry
uses: snok/install-poetry@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.10.4
3.12
2,665 changes: 0 additions & 2,665 deletions poetry.lock

This file was deleted.

45 changes: 18 additions & 27 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,32 +1,23 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
[project]
name = "dbt_linreg"
description = ""
version = "0.2.3"
requires-python = "~=3.12"
description = "dbt_pca dbt package"
version = "0.3.0"
readme = "README.md"
authors = ["Daniel Reeves"]

[tool.poetry.dependencies]
python = "^3.10"

click = "*"
dbt-core = "*"
dbt-duckdb = "*"
duckdb = "*"
numpy = "*"
pandas = "*"
pre-commit = "*"
pytest = "*"
pytest-cov = "*"
rich_click = "*"
ruff = "*"
statsmodels = "*"
tabulate = "*"
dbt-postgres = "^1.6.6"
pyyaml = "*"
dbt-clickhouse = "^1.8.7"
dependencies = [
"dbt-core>=1.9.0",
"dbt-duckdb",
"dbt-postgres",
"duckdb>=1.1.3",
"pandas>=2.2.3",
"pre-commit>=4.0.1",
"pyyaml>=6.0.2",
"rich-click>=1.8.5",
"ruff>=0.8.4",
"statsmodels>=0.14.4",
"tabulate>=0.9.0",
]

[tool.ruff]
line-length = 120
Expand Down
11 changes: 6 additions & 5 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ function dbt {
}

function setup {
poetry install
poetry run pre-commit install
uv sync
uvx pre-commit install
}

function test {
Expand All @@ -42,19 +42,20 @@ function test {
rm -f dbt.duckdb
fi

poetry run python scripts.py gen-test-cases
uv run scripts.py gen-test-cases
dbt deps --target "${target}"
dbt seed --target "${target}"
dbt run --target "${target}" --selector "${target}-selector"
dbt test --target "${target}" --selector "${target}-selector" --store-failures
}

function lint {
poetry run pre-commit run -a
uv run pre-commit run -a
}

function docs:deploy {
mkdocs gh-deploy -f docs/mkdocs.yml
# shellcheck disable=SC2046
uv run $(xargs -I{} echo --with {} < docs/requirements.txt) mkdocs gh-deploy -f docs/mkdocs.yml
}

function help {
Expand Down
Loading

0 comments on commit dd96a82

Please sign in to comment.