Skip to content
Draft
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
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Please describe the changes made and why they were made. Link to any relevant is

## Checklist

* [ ] Ran `uv tool ruff format --config pyproject.toml`
* [ ] Ran `uv tool run ruff format --config pyproject.toml`
* [ ] If this is a bug fix:
* [ ] Updated integration tests with bug repro
* [ ] Linked to bug report ticket
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ project2/*
.DS_Store

# raw package hub output (because big)
src/dbt_autofix/packages/scripts/output/*
src/dbt_autofix/packages/scripts/output/*
# profiles.yml temporarily added by unit tests
tests/integration_tests/package_upgrades/dbt_utils_package_lookup_map_2/profiles.yml
40 changes: 40 additions & 0 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,43 @@ def test_pre_commit_installation(session):
"non_existent_file",
"--verbose",
)


@nox.session(python=["3.10", "3.11", "3.12", "3.13"], venv_backend="uv")
def test_core_1_10_installation(session):
"""Test that dbt-autofix can be installed with dbt-core"""
session.run_install(
"uv",
"sync",
"--all-packages",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run_install(
"uv",
"add",
"dbt-core==1.10.6",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run("dbt-autofix", "--help")


@nox.session(python=["3.10", "3.11", "3.12", "3.13"], venv_backend="uv")
def test_core_1_12_installation(session):
"""Test that dbt-autofix can be installed with dbt-core"""
session.run_install(
"uv",
"sync",
"--all-packages",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run_install(
"uv",
"add",
"dbt-core==1.11.2",
f"--python={session.virtualenv.location}",
env={"UV_PROJECT_ENVIRONMENT": session.virtualenv.location},
)
session.run("dbt-autofix", "--help")
10 changes: 3 additions & 7 deletions packages/dbt_fusion_package_tools/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ requires-python = ">=3.10"
dependencies = [
"gitpython>=3.1.45",
"mashumaro>=3.9,<3.15", # matches dbt-core
"pyyaml>=6.0.2",
"pyyaml>=6.0.2", # need 6.0.2 for python 3.13 support
"dbt-protos>=1.0.410",
"requests>=2.32.5",
"requests<3.0.0", # matches dbt-common
"rich>=14.0.0",
"click>=8.2.0,<9.0", # matches dbt-core
]

dynamic = ["version"]
Expand All @@ -28,8 +29,3 @@ build-backend = "pdm.backend"
[tool.pdm.version]
source = "scm"
version_format = "pdm_build:format_version"

[project.optional-dependencies]
docs = [
"pydocstyle>=6.3.0",
]
33 changes: 14 additions & 19 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ description = "CLI to autofix deprecations in dbt projects"
readme = "README.md"
requires-python = ">=3.10"
dependencies = [
"pyyaml>=6.0.2",
"pyyaml>=6.0.2", # need 6.0.2 for python 3.13 support
"typer>=0.16.0",
"yamllint>=1.37.0",
"rich>=13.7.0",
"click>=8.2.0,<9.0.0",
"ruamel-yaml>=0.18.10,<0.18.15",
"httpx>=0.27.0",
"dbt-common>=1.27,<2",
"dbt-extractor>=0.5.0,<=0.6",
"dbt-fusion-package-tools",
]
Expand Down Expand Up @@ -40,9 +39,6 @@ test = [
"pre-commit>=4.2.0",
"nox",
]
docs = [
"pydocstyle>=6.3.0",
]

[tool.pdm.build]
# Include pre_commit_hooks/ directory in distribution
Expand All @@ -65,9 +61,17 @@ indent-width = 4
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F", "I", "RUF", "PL", "TID", "T20"]
ignore = []

select = ["E4", "E7", "E9", "F", "I", "RUF", "PL", "TID", "T20", "D"]
# Ignore some doc warnings
# D100: Missing docstring in public module
# D101: Missing docstring in public class
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D107", "D202"]

[tool.pyright]
include = [
Expand All @@ -93,20 +97,11 @@ pythonpath = [
]
addopts = "--ignore-glob=**/dbt_packages/**"

[tool.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"
# D100: Missing docstring in public module
# D101: Missing docstring in public class
# D102: Missing docstring in public method
# D103: Missing docstring in public function
# D104: Missing docstring in public package
# D105: Missing docstring in magic method
# D107: Missing docstring in __init__
# D202: No blank lines allowed after function docstring
add-ignore = ["D100", "D101", "D102", "D103", "D104", "D105", "D107", "D202"]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true
explicit = true
Loading
Loading