diff --git a/.changes/1.0.0-b1.md b/.changes/1.0.0-b1.md new file mode 100644 index 00000000..51535a9f --- /dev/null +++ b/.changes/1.0.0-b1.md @@ -0,0 +1 @@ +## dbt-adapter 1.0.0-b1 - February 27, 2024 diff --git a/.changes/1.8.0-a2.md b/.changes/1.8.0-a2.md new file mode 100644 index 00000000..03781092 --- /dev/null +++ b/.changes/1.8.0-a2.md @@ -0,0 +1 @@ +## dbt-adapter 1.8.0-a2 - February 28, 2024 diff --git a/.changes/1.8.0-b1.md b/.changes/1.8.0-b1.md new file mode 100644 index 00000000..f2416c3d --- /dev/null +++ b/.changes/1.8.0-b1.md @@ -0,0 +1 @@ +## dbt-adapter 1.8.0-b1 - March 01, 2024 diff --git a/.github/ISSUE_TEMPLATE/internal-epic.yml b/.github/ISSUE_TEMPLATE/internal-epic.yml index 504514a3..2f3bfaa7 100644 --- a/.github/ISSUE_TEMPLATE/internal-epic.yml +++ b/.github/ISSUE_TEMPLATE/internal-epic.yml @@ -59,6 +59,24 @@ body: validations: required: false + - type: textarea + attributes: + label: Documentation + description: | + Provide a list of relevant documentation. Is there a proof of concept? + Does this require and RFCs, ADRs, etc.? + If the documentation exists, link it; if it does not exist yet, reference it descriptively. + + Example: + - [ ] RFC for updating connection interface to accept new parameters + - [ ] POC: https://github.com/dbt-labs/dbt-adapters/pull/42 + value: | + ```[tasklist] + - [ ] Task + ``` + validations: + required: false + - type: textarea attributes: label: Consequences diff --git a/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml b/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml index 217e847b..ab3c4ffc 100644 --- a/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml +++ b/.github/ISSUE_TEMPLATE/internal-feature-implementation.yml @@ -54,7 +54,7 @@ body: - type: textarea attributes: - label: Suggested tests + label: Testing description: | Provide scenarios to test. Include both positive and negative tests if possible. Link to existing similar tests if appropriate. @@ -71,13 +71,24 @@ body: - type: textarea attributes: - label: Are there any security concerns with these changes? + label: Security description: | + Are there any security concerns with these changes? When in doubt, run it by the security team. placeholder: | Example: Logging sensitive data validations: - required: true + required: true + + - type: textarea + attributes: + label: Docs + description: | + Are there any docs the will need to be added or updated? + placeholder: | + Example: We need to document how to configure this new authentication method. + validations: + required: true - type: textarea attributes: diff --git a/.github/actions/build-hatch/action.yml b/.github/actions/build-hatch/action.yml index 9c635951..fe9825d4 100644 --- a/.github/actions/build-hatch/action.yml +++ b/.github/actions/build-hatch/action.yml @@ -11,9 +11,9 @@ inputs: working-dir: description: Where to run commands from, supports namespace packaging default: "./" - artifacts-dir: + archive-name: description: Where to upload the artifacts - default: "dist" + required: true runs: using: composite @@ -32,5 +32,6 @@ runs: - name: Upload artifacts uses: actions/upload-artifact@v3 with: - name: ${{ inputs.artifacts-dir}} + name: ${{ inputs.archive-name }} path: ${{ inputs.working-dir }}dist/ + retention-days: 3 diff --git a/.github/actions/publish-pypi/action.yml b/.github/actions/publish-pypi/action.yml index c97beceb..deffc6e3 100644 --- a/.github/actions/publish-pypi/action.yml +++ b/.github/actions/publish-pypi/action.yml @@ -2,7 +2,7 @@ name: Publish - PyPI description: Publish artifacts saved during build step to PyPI inputs: - artifacts-dir-name: + archive-name: description: Where to download the artifacts from required: true repository-url: @@ -16,8 +16,12 @@ runs: - name: Download artifacts uses: actions/download-artifact@v3 with: - name: ${{ inputs.artifacts-dir }} - path: . + name: ${{ inputs.archive-name }} + path: dist/ + + - name: "[DEBUG]" + run : ls -R + shell: bash - name: Publish artifacts to PyPI uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 747dbc2d..4fc2fcf8 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -30,6 +30,6 @@ resolves # ### Checklist - [ ] I have read [the contributing guide](https://github.com/dbt-labs/dbt-adapter/blob/main/CONTRIBUTING.md) and understand what's expected of me -- [ ] I have run this code in development and it appears to resolve the stated issue +- [ ] I have run this code in development, and it appears to resolve the stated issue - [ ] This PR includes tests, or tests are not required/relevant for this PR -- [ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX +- [ ] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc.) or this PR has already received feedback and approval from Product or DX diff --git a/.github/workflows/github-release.yml b/.github/workflows/github-release.yml new file mode 100644 index 00000000..edd25172 --- /dev/null +++ b/.github/workflows/github-release.yml @@ -0,0 +1,259 @@ +# **what?** +# Create a new release on GitHub and include any artifacts in the `/dist` directory of the GitHub artifacts store. +# +# Inputs: +# sha: The commit to attach to this release +# version_number: The release version number (i.e. 1.0.0b1, 1.2.3rc2, 1.0.0) +# changelog_path: Path to the changelog file for release notes +# test_run: Test run (Publish release as draft) +# +# **why?** +# Reusable and consistent GitHub release process. +# +# **when?** +# Call after a successful build. Build artifacts should be ready to release and live in a dist/ directory. +# +# This workflow expects the artifacts to already be built and living in the artifact store of the workflow. +# +# Validation Checks +# +# 1. If no release already exists for this commit and version, create the tag and release it to GitHub. +# 2. If a release already exists for this commit, skip creating the release but finish with a success. +# 3. If a release exists for this commit under a different tag, fail. +# 4. If the commit is already associated with a different release, fail. + +name: GitHub Release + +on: + workflow_call: + inputs: + sha: + description: The commit to attach to this release + required: true + type: string + version_number: + description: The release version number (i.e. 1.0.0b1) + required: true + type: string + changelog_path: + description: Path to the changelog file for release notes + required: true + type: string + test_run: + description: Test run (Publish release as draft) + required: true + type: boolean + archive_name: + description: artifact name to download + required: true + type: string + outputs: + tag: + description: The path to the changelog for this version + value: ${{ jobs.check-release-exists.outputs.tag }} + +permissions: + contents: write + +env: + REPO_LINK: ${{ github.server_url }}/${{ github.repository }} + NOTIFICATION_PREFIX: "[GitHub Release]" + +jobs: + log-inputs: + runs-on: ubuntu-latest + steps: + - name: "[DEBUG] Print Variables" + run: | + echo The last commit sha in the release: ${{ inputs.sha }} + echo The release version number: ${{ inputs.version_number }} + echo Expected Changelog path: ${{ inputs.changelog_path }} + echo Test run: ${{ inputs.test_run }} + echo Repo link: ${{ env.REPO_LINK }} + echo Notification prefix: ${{ env.NOTIFICATION_PREFIX }} + + check-release-exists: + runs-on: ubuntu-latest + outputs: + exists: ${{ steps.release_check.outputs.exists }} + draft_exists: ${{ steps.release_check.outputs.draft_exists }} + tag: ${{ steps.set_tag.outputs.tag }} + + steps: + - name: "Generate Release Tag" + id: set_tag + run: echo "tag=v${{ inputs.version_number }}" >> $GITHUB_OUTPUT + + # When the GitHub CLI doesn't find a release for the given tag, it will exit 1 with a + # message of "release not found". In our case, it's not an actual error, just a + # confirmation that the release does not already exists so we can go ahead and create it. + # The `|| true` makes it so the step does not exit with a non-zero exit code + # Also check if the release already exists is draft state. If it does, and we are not + # testing then we can publish that draft as is. If it's in draft and we are testing, skip the + # release. + - name: "Check If Release Exists For Tag ${{ steps.set_tag.outputs.tag }}" + id: release_check + run: | + output=$((gh release view ${{ steps.set_tag.outputs.tag }} --json isDraft,targetCommitish --repo ${{ env.REPO_LINK }}) 2>&1) || true + if [[ "$output" == "release not found" ]] + then + title="Release for tag ${{ steps.set_tag.outputs.tag }} does not exist." + message="Check passed." + echo "exists=false" >> $GITHUB_OUTPUT + echo "draft_exists=false" >> $GITHUB_OUTPUT + echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + exit 0 + fi + commit=$(jq -r '.targetCommitish' <<< "$output") + if [[ $commit != ${{ inputs.sha }} ]] + then + title="Release for tag ${{ steps.set_tag.outputs.tag }} already exists for commit $commit!" + message="Cannot create a new release for commit ${{ inputs.sha }}. Exiting." + echo "::error title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + exit 1 + fi + isDraft=$(jq -r '.isDraft' <<< "$output") + if [[ $isDraft == true ]] && [[ ${{ inputs.test_run }} == false ]] + then + title="Release tag ${{ steps.set_tag.outputs.tag }} already associated with the draft release." + message="Release workflow will publish the associated release." + echo "exists=false" >> $GITHUB_OUTPUT + echo "draft_exists=true" >> $GITHUB_OUTPUT + echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + exit 0 + fi + title="Release for tag ${{ steps.set_tag.outputs.tag }} already exists." + message="Skip GitHub Release Publishing." + echo "exists=true" >> $GITHUB_OUTPUT + echo "draft_exists=false" >> $GITHUB_OUTPUT + echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + REPO: ${{ env.REPO_LINK }} + + - name: "[DEBUG] Log Job Outputs" + run: | + echo exists: ${{ steps.release_check.outputs.exists }} + echo draft_exists: ${{ steps.release_check.outputs.draft_exists }} + echo tag: ${{ steps.set_tag.outputs.tag }} + + skip-github-release: + runs-on: ubuntu-latest + needs: [check-release-exists] + if: needs.check-release-exists.outputs.exists == 'true' + + steps: + - name: "Tag Exists, Skip GitHub Release Job" + run: | + echo title="A tag already exists for ${{ needs.check-release-exists.outputs.tag }} and commit." + echo message="Skipping GitHub release." + echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + + audit-release-different-commit: + runs-on: ubuntu-latest + needs: [check-release-exists] + if: needs.check-release-exists.outputs.exists == 'false' + + steps: + - name: "Check If Release Already Exists For Commit" + uses: cardinalby/git-get-release-action@1.2.4 + id: check_release_commit + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + commitSha: ${{ inputs.sha }} + doNotFailIfNotFound: true # returns blank outputs when not found instead of error + searchLimit: 15 # Since we only care about recent releases, speed up the process + + - name: "[DEBUG] Print Release Details" + run: | + echo steps.check_release_commit.outputs.id: ${{ steps.check_release_commit.outputs.id }} + echo steps.check_release_commit.outputs.tag_name: ${{ steps.check_release_commit.outputs.tag_name }} + echo steps.check_release_commit.outputs.target_commitish: ${{ steps.check_release_commit.outputs.target_commitish }} + echo steps.check_release_commit.outputs.prerelease: ${{ steps.check_release_commit.outputs.prerelease }} + + # Since we already know a release for this tag does not exist, if we find anything it's for the wrong tag, exit + - name: "Check If The Tag Matches The Version Number" + if: steps.check_release_commit.outputs.id != '' + run: | + title="Tag ${{ steps.check_release_commit.outputs.tag_name }} already exists for this commit!" + message="Cannot create a new tag for ${{ needs.check-release-exists.outputs.tag }} for the same commit" + echo "::error title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + exit 1 + + publish-draft-release: + runs-on: ubuntu-latest + needs: [check-release-exists, audit-release-different-commit] + if: >- + needs.check-release-exists.outputs.draft_exists == 'true' && + inputs.test_run == false + + steps: + - name: "Publish Draft Release - ${{ needs.check-release-exists.outputs.tag }}" + run: | + gh release edit $TAG --draft=false --repo ${{ env.REPO_LINK }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ needs.check-release-exists.outputs.tag }} + + create-github-release: + runs-on: ubuntu-latest + needs: [check-release-exists, audit-release-different-commit] + if: needs.check-release-exists.outputs.draft_exists == 'false' + + steps: + - name: "Check out repository" + uses: actions/checkout@v4 + with: + ref: ${{ inputs.sha }} + + - name: "Download Artifact ${{ inputs.archive_name }}" + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.archive_name }} + path: . + + - name: "[DEBUG] Display Structure Of Expected Files" + run: | + ls -R .changes + ls -l dist + + - name: "Set Release Type" + id: release_type + run: | + if ${{ contains(inputs.version_number, 'rc') || contains(inputs.version_number, 'b') }} + then + echo Release will be set as pre-release + echo "prerelease=--prerelease" >> $GITHUB_OUTPUT + else + echo This is not a prerelease + fi + + - name: "Set As Draft Release" + id: draft + run: | + if [[ ${{ inputs.test_run }} == true ]] + then + echo Release will be published as draft + echo "draft=--draft" >> $GITHUB_OUTPUT + else + echo This is not a draft release + fi + + - name: "GitHub Release Workflow Annotation" + run: | + title="Release ${{ needs.check-release-exists.outputs.tag }}" + message="Configuration: ${{ steps.release_type.outputs.prerelease }} ${{ steps.draft.outputs.draft }}" + echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + + - name: "Create New GitHub Release - ${{ needs.check-release-exists.outputs.tag }}" + run: | + gh release create $TAG ./dist/* --title "$TITLE" --notes-file $RELEASE_NOTES --target $COMMIT $PRERELEASE $DRAFT --repo ${{ env.REPO_LINK }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + TAG: ${{ needs.check-release-exists.outputs.tag }} + TITLE: ${{ github.event.repository.name }} ${{ needs.check-release-exists.outputs.tag }} + RELEASE_NOTES: ${{ inputs.changelog_path }} + COMMIT: ${{ inputs.sha }} + PRERELEASE: ${{ steps.release_type.outputs.prerelease }} + DRAFT: ${{ steps.draft.outputs.draft }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index baa32604..1135adb8 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -60,6 +60,7 @@ on: # this is the permission that allows creating a new release permissions: contents: write + id-token: write # will cancel previous workflows triggered by the same event and for the same ref for PRs or same SHA otherwise concurrency: @@ -71,23 +72,55 @@ defaults: shell: bash jobs: + release-inputs: + name: "Release inputs" + runs-on: ubuntu-latest + outputs: + working-dir: ${{ steps.release-inputs.outputs.working-dir }} + run-unit-tests: ${{ steps.release-inputs.outputs.run-unit-tests }} + archive-name: ${{ steps.release-inputs.outputs.archive-name }} + steps: + - name: "Inputs" + id: release-inputs + run: | + working_dir="./" + run_unit_tests=true + archive_name=${{ inputs.package }}-${{ inputs.version_number }}-${{ inputs.deploy-to }} - bump-version-generate-changelog: - name: Bump package version, Generate changelog - uses: dbt-labs/dbt-adapters/.github/workflows/release_prep_hatch.yml@bumpVersion + if test "${{ inputs.package }}" = "dbt-tests-adapter" + then + working_dir="./dbt-tests-adapter/" + run_unit_tests=false + fi + + echo "working-dir=$working_dir" >> $GITHUB_OUTPUT + echo "run-unit-tests=$run_unit_tests" >> $GITHUB_OUTPUT + echo "archive-name=$archive_name" >> $GITHUB_OUTPUT + + - name: "[DEBUG]" + run: | + echo package : ${{ inputs.package }} + echo working-dir : ${{ steps.release-inputs.outputs.working-dir }} + echo run-unit-tests : ${{ steps.release-inputs.outputs.run-unit-tests }} + echo archive-name : ${{ steps.release-inputs.outputs.archive-name }} + bump-version-generate-changelog: + name: "Bump package version, Generate changelog" + uses: dbt-labs/dbt-adapters/.github/workflows/release_prep_hatch.yml@main + needs: [release-inputs] with: version_number: ${{ inputs.version_number }} deploy_to: ${{ inputs.deploy-to }} nightly_release: ${{ inputs.nightly_release }} target_branch: ${{ inputs.target_branch }} - + working-dir: ${{ needs.release-inputs.outputs.working-dir }} + run-unit-tests: ${{ fromJSON(needs.release-inputs.outputs.run-unit-tests) }} secrets: inherit log-outputs-bump-version-generate-changelog: name: "[Log output] Bump package version, Generate changelog" if: ${{ !failure() && !cancelled() }} - needs: [bump-version-generate-changelog] + needs: [release-inputs, bump-version-generate-changelog] runs-on: ubuntu-latest steps: - name: Print variables @@ -97,7 +130,7 @@ jobs: build-and-test: name: "Build and Test" - needs: [log-outputs-bump-version-generate-changelog] + needs: [release-inputs, bump-version-generate-changelog] runs-on: ubuntu-latest permissions: id-token: write # IMPORTANT: this permission is mandatory for trusted publishing @@ -107,69 +140,41 @@ jobs: with: ref: ${{ needs.bump-version-generate-changelog.outputs.final_sha }} - - name: Setup `hatch` - uses: ./.github/actions/setup-hatch - - - name: Build `dbt-adapters` - if: ${{ inputs.package == 'dbt-adapters' }} - uses: ./.github/actions/build-hatch - - - name: Build `dbt-tests-adapter` - if: ${{ inputs.package == 'dbt-tests-adapter' }} - uses: ./.github/actions/build-hatch - with: - working-dir: "./dbt-tests-adapter/" - - - name: Setup `hatch` - uses: ./.github/actions/setup-hatch - - - name: Build `dbt-adapters` - if: ${{ inputs.package == 'dbt-adapters' }} - uses: ./.github/actions/build-hatch + - name: "Setup `hatch`" + uses: dbt-labs/dbt-adapters/.github/actions/setup-hatch@main - - name: Build `dbt-tests-adapter` - if: ${{ inputs.package == 'dbt-tests-adapter' }} - uses: ./.github/actions/build-hatch + - name: "Build ${{ inputs.package }}" + uses: dbt-labs/dbt-adapters/.github/actions/build-hatch@main with: - working-dir: "./dbt-tests-adapter/" - - # this step is only needed for the release process - - name: "Upload Build Artifact" - if: ${{ github.event_name == 'workflow_call' }} - uses: actions/upload-artifact@v3 - with: - name: ${{ steps.version.outputs.version_number }} - path: | - ${{ inputs.changelog_path }} - ./dist/ - retention-days: 3 + working-dir: ${{ needs.release-inputs.outputs.working-dir }} + archive-name: ${{ needs.release-inputs.outputs.archive-name }} github-release: - name: GitHub Release - if: ${{ !failure() && !cancelled() }} - - needs: [build-and-test] - - uses: dbt-labs/dbt-release/.github/workflows/github-release.yml@main - + name: "GitHub Release" + # ToDo: update GH release to handle adding dbt-tests-adapter and dbt-adapter assets to the same release + if: ${{ !failure() && !cancelled() && inputs.package == 'dbt-adapters' }} + needs: [release-inputs, build-and-test, bump-version-generate-changelog] + uses: dbt-labs/dbt-adapters/.github/workflows/github-release.yml@main with: + sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }} version_number: ${{ inputs.version_number }} changelog_path: ${{ needs.bump-version-generate-changelog.outputs.changelog_path }} test_run: ${{ inputs.deploy-to == 'test' && true || false }} - sha: ${{ needs.bump-version-generate-changelog.outputs.final_sha }} + archive_name: ${{ needs.release-inputs.outputs.archive-name }} pypi-release: - name: Publish to PyPI + name: "Publish to PyPI" runs-on: ubuntu-latest - needs: [github-release] + needs: [release-inputs, build-and-test] environment: name: ${{ inputs.deploy-to }} url: ${{ vars.PYPI_PROJECT_URL }} steps: + - name: "Check out repository" + uses: actions/checkout@v4 + - name: "Publish to PyPI" - uses: ./.github/actions/publish-pypi + uses: dbt-labs/dbt-adapters/.github/actions/publish-pypi@main with: repository-url: ${{ vars.PYPI_REPOSITORY_URL }} - artifacts-dir: ${{ inputs.version_number }} - - + archive-name: ${{ needs.release-inputs.outputs.archive-name }} diff --git a/.github/workflows/release_prep_hatch.yml b/.github/workflows/release_prep_hatch.yml index c32e0a2f..32a267e0 100644 --- a/.github/workflows/release_prep_hatch.yml +++ b/.github/workflows/release_prep_hatch.yml @@ -53,6 +53,9 @@ on: type: string required: false default: '' + run-unit-tests: + type: boolean + default: false run-integration-tests: type: boolean default: false @@ -61,10 +64,17 @@ on: type: string required: false default: main + working-dir: + description: "The working directory to use for run statements" + type: string + default: "./" outputs: changelog_path: description: The path to the changelog for this version value: ${{ jobs.audit-changelog.outputs.changelog_path }} + final_sha: + description: The sha that will actually be released + value: ${{ jobs.determine-release-branch.outputs.final_sha }} secrets: FISHTOWN_BOT_PAT: description: "Token to commit/merge changes into branches" @@ -97,6 +107,9 @@ jobs: echo Target branch: ${{ inputs.target_branch }} echo Nightly release: ${{ inputs.nightly_release }} echo Optional env setup script: ${{ inputs.env_setup_script_path }} + echo run-unit-tests: ${{ inputs.run-unit-tests }} + echo run-integration-tests: ${{ inputs.run-integration-tests }} + echo working-dir: ${{ inputs.working-dir }} # ENVIRONMENT VARIABLES echo Python target version: ${{ env.PYTHON_TARGET_VERSION }} echo Notification prefix: ${{ env.NOTIFICATION_PREFIX }} @@ -188,6 +201,8 @@ jobs: is_updated=true fi echo "up_to_date=$is_updated" >> $GITHUB_OUTPUT + working-directory: ${{ inputs.working-dir }} + - name: "[Notification] Check Current Version In Code" run: | title="Version check" @@ -201,6 +216,7 @@ jobs: - name: "[DEBUG] Print Outputs" run: | echo up_to_date: ${{ steps.version-check.outputs.up_to_date }} + skip-generate-changelog: runs-on: ubuntu-latest needs: [audit-changelog] @@ -213,6 +229,7 @@ jobs: title="Skip changelog generation" message="A changelog file already exists at ${{ needs.audit-changelog.outputs.changelog_path }}, skipping generating changelog" echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + skip-version-bump: runs-on: ubuntu-latest needs: [audit-version-in-code] @@ -225,6 +242,7 @@ jobs: title="Skip version bump" message="The version has already been bumped to ${{ inputs.version_number }}, skipping version bump" echo "::notice title=${{ env.NOTIFICATION_PREFIX }}: $title::$message" + create-temp-branch: runs-on: ubuntu-latest needs: [audit-changelog, audit-version-in-code] @@ -333,6 +351,7 @@ jobs: if: needs.audit-version-in-code.outputs.up_to_date == 'false' run: | hatch version ${{ inputs.version_number }} + working-directory: ${{ inputs.working-dir }} - name: "[Notification] Bump Version To ${{ inputs.version_number }}" if: needs.audit-version-in-code.outputs.up_to_date == 'false' run: | @@ -344,13 +363,13 @@ jobs: - name: "Remove Trailing Whitespace Via Pre-commit" continue-on-error: true run: | - pre-commit run trailing-whitespace --files dbt_common/__about__.py CHANGELOG.md .changes/* + pre-commit run trailing-whitespace --files dbt/adapters/__about__.py CHANGELOG.md .changes/* git status # this step will fail on newline errors but also correct them - name: "Removing Extra Newlines Via Pre-commit" continue-on-error: true run: | - pre-commit run end-of-file-fixer --files dbt_common/__about__.py CHANGELOG.md .changes/* + pre-commit run end-of-file-fixer --files dbt/adapters/__about__.py CHANGELOG.md .changes/* git status - name: "Commit & Push Changes" run: | @@ -367,6 +386,7 @@ jobs: git push run-unit-tests: + if: inputs.run-unit-tests == true runs-on: ubuntu-latest needs: [create-temp-branch, generate-changelog-bump-version] @@ -427,14 +447,14 @@ jobs: python-version: ${{ env.PYTHON_TARGET_VERSION }} - name: Run tests - run: hatch run test:integration + run: hatch run integration-tests:all merge-changes-into-target-branch: runs-on: ubuntu-latest needs: [run-unit-tests, run-integration-tests, create-temp-branch, audit-version-in-code, audit-changelog] if: | !failure() && !cancelled() && - inputs.deploy_to == 'test' && + inputs.deploy_to == 'prod' && ( needs.audit-changelog.outputs.exists == 'false' || needs.audit-version-in-code.outputs.up_to_date == 'false' @@ -449,11 +469,11 @@ jobs: - name: "Checkout Repo ${{ github.repository }}" uses: actions/checkout@v3 - - name: "Merge Changes Into main" + - name: "Merge Changes Into ${{ inputs.target_branch }}" uses: everlytic/branch-merge@1.1.5 with: source_ref: ${{ needs.create-temp-branch.outputs.branch_name }} - target_branch: "main" + target_branch: ${{ inputs.target_branch }} github_token: ${{ secrets.FISHTOWN_BOT_PAT }} commit_message_template: "[Automated] Merged {source_ref} into target {target_branch} during release process" @@ -495,7 +515,7 @@ jobs: then branch=${{ needs.create-temp-branch.outputs.branch_name }} else - branch="main" + branch="${{ inputs.target_branch }}" fi echo "target_branch=$branch" >> $GITHUB_OUTPUT - name: "[Notification] Resolve Branch To Checkout" @@ -511,6 +531,11 @@ jobs: - name: "[Debug] Log Branch" run: git status + - name: "Resolve Commit SHA For Release" + id: resolve_commit_sha + run: | + echo "release_sha=$(git rev-parse HEAD)" >> $GITHUB_OUTPUT + - name: "Remove Temp Branch - ${{ needs.create-temp-branch.outputs.branch_name }}" if: ${{ inputs.deploy_to == 'prod' && inputs.nightly_release == 'false' && needs.create-temp-branch.outputs.branch_name != '' }} run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..3d80b955 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,63 @@ +# For more on configuring pre-commit hooks (see https://pre-commit.com/) + +# Force all unspecified python hooks to run python 3.8 +default_language_version: + python: python3 + +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-yaml + args: [--unsafe] + - id: check-json + - id: end-of-file-fixer + - id: trailing-whitespace + - id: check-case-conflict +- repo: https://github.com/psf/black + rev: 23.1.0 + hooks: + - id: black + additional_dependencies: ['click~=8.1'] + args: + - "--line-length=99" + - "--target-version=py38" + - id: black + alias: black-check + stages: [manual] + additional_dependencies: ['click~=8.1'] + args: + - "--line-length=99" + - "--target-version=py38" + - "--check" + - "--diff" +- repo: https://github.com/pycqa/flake8 + rev: 6.0.0 + hooks: + - id: flake8 + - id: flake8 + alias: flake8-check + stages: [manual] +- repo: https://github.com/pre-commit/mirrors-mypy + rev: v1.1.1 + hooks: + - id: mypy + # N.B.: Mypy is... a bit fragile. + # + # By using `language: system` we run this hook in the local + # environment instead of a pre-commit isolated one. This is needed + # to ensure mypy correctly parses the project. + + # It may cause trouble in that it adds environmental variables out + # of our control to the mix. Unfortunately, there's nothing we can + # do about per pre-commit's author. + # See https://github.com/pre-commit/pre-commit/issues/730 for details. + args: [--show-error-codes, --ignore-missing-imports, --explicit-package-bases] + files: ^dbt/adapters/.* + language: system + - id: mypy + alias: mypy-check + stages: [manual] + args: [--show-error-codes, --pretty, --ignore-missing-imports, --explicit-package-bases] + files: ^dbt/adapters + language: system diff --git a/CHANGELOG.md b/CHANGELOG.md index 75eaec3e..927477cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## dbt-adapter 1.8.0-b1 - March 01, 2024 + +## dbt-adapter 1.8.0-a2 - February 28, 2024 + +## dbt-adapter 1.0.0-b1 - February 27, 2024 + ## dbt-adapter 0.1.0-a8 - February 22, 2024 ### Features @@ -29,4 +35,3 @@ and is generated by [Changie](https://github.com/miniscruff/changie). * Implement unit testing in CI * Allow version to be specified in either __version__.py or __about__.py * Remove __init__.py file from dbt.tests - diff --git a/dbt-tests-adapter/dbt/__init__.py b/dbt-tests-adapter/dbt/__init__.py new file mode 100644 index 00000000..782ff40f --- /dev/null +++ b/dbt-tests-adapter/dbt/__init__.py @@ -0,0 +1,6 @@ +# N.B. +# This will add to the package’s __path__ all subdirectories of directories on sys.path named after the package which effectively combines both modules into a single namespace (dbt.adapters) + +from pkgutil import extend_path + +__path__ = extend_path(__path__, __name__) diff --git a/dbt-tests-adapter/dbt/tests/__about__.py b/dbt-tests-adapter/dbt/tests/__about__.py new file mode 100644 index 00000000..6496f3e2 --- /dev/null +++ b/dbt-tests-adapter/dbt/tests/__about__.py @@ -0,0 +1 @@ +version = "1.8.0b1" diff --git a/dbt/tests/adapter/aliases/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/aliases/fixtures.py similarity index 100% rename from dbt/tests/adapter/aliases/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/aliases/fixtures.py diff --git a/dbt/tests/adapter/aliases/test_aliases.py b/dbt-tests-adapter/dbt/tests/adapter/aliases/test_aliases.py similarity index 100% rename from dbt/tests/adapter/aliases/test_aliases.py rename to dbt-tests-adapter/dbt/tests/adapter/aliases/test_aliases.py diff --git a/dbt/tests/adapter/basic/__init__.py b/dbt-tests-adapter/dbt/tests/adapter/basic/__init__.py similarity index 100% rename from dbt/tests/adapter/basic/__init__.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/__init__.py diff --git a/dbt/tests/adapter/basic/expected_catalog.py b/dbt-tests-adapter/dbt/tests/adapter/basic/expected_catalog.py similarity index 100% rename from dbt/tests/adapter/basic/expected_catalog.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/expected_catalog.py diff --git a/dbt/tests/adapter/basic/files.py b/dbt-tests-adapter/dbt/tests/adapter/basic/files.py similarity index 100% rename from dbt/tests/adapter/basic/files.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/files.py diff --git a/dbt/tests/adapter/basic/test_adapter_methods.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_adapter_methods.py similarity index 100% rename from dbt/tests/adapter/basic/test_adapter_methods.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_adapter_methods.py diff --git a/dbt/tests/adapter/basic/test_base.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_base.py similarity index 100% rename from dbt/tests/adapter/basic/test_base.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_base.py diff --git a/dbt/tests/adapter/basic/test_docs_generate.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_docs_generate.py similarity index 100% rename from dbt/tests/adapter/basic/test_docs_generate.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_docs_generate.py diff --git a/dbt/tests/adapter/basic/test_empty.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_empty.py similarity index 100% rename from dbt/tests/adapter/basic/test_empty.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_empty.py diff --git a/dbt/tests/adapter/basic/test_ephemeral.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_ephemeral.py similarity index 100% rename from dbt/tests/adapter/basic/test_ephemeral.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_ephemeral.py diff --git a/dbt/tests/adapter/basic/test_generic_tests.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_generic_tests.py similarity index 100% rename from dbt/tests/adapter/basic/test_generic_tests.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_generic_tests.py diff --git a/dbt/tests/adapter/basic/test_incremental.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_incremental.py similarity index 100% rename from dbt/tests/adapter/basic/test_incremental.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_incremental.py diff --git a/dbt/tests/adapter/basic/test_singular_tests.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_singular_tests.py similarity index 100% rename from dbt/tests/adapter/basic/test_singular_tests.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_singular_tests.py diff --git a/dbt/tests/adapter/basic/test_singular_tests_ephemeral.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_singular_tests_ephemeral.py similarity index 100% rename from dbt/tests/adapter/basic/test_singular_tests_ephemeral.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_singular_tests_ephemeral.py diff --git a/dbt/tests/adapter/basic/test_snapshot_check_cols.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_snapshot_check_cols.py similarity index 100% rename from dbt/tests/adapter/basic/test_snapshot_check_cols.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_snapshot_check_cols.py diff --git a/dbt/tests/adapter/basic/test_snapshot_timestamp.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_snapshot_timestamp.py similarity index 100% rename from dbt/tests/adapter/basic/test_snapshot_timestamp.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_snapshot_timestamp.py diff --git a/dbt/tests/adapter/basic/test_table_materialization.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_table_materialization.py similarity index 100% rename from dbt/tests/adapter/basic/test_table_materialization.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_table_materialization.py diff --git a/dbt/tests/adapter/basic/test_validate_connection.py b/dbt-tests-adapter/dbt/tests/adapter/basic/test_validate_connection.py similarity index 100% rename from dbt/tests/adapter/basic/test_validate_connection.py rename to dbt-tests-adapter/dbt/tests/adapter/basic/test_validate_connection.py diff --git a/dbt/tests/adapter/caching/test_caching.py b/dbt-tests-adapter/dbt/tests/adapter/caching/test_caching.py similarity index 100% rename from dbt/tests/adapter/caching/test_caching.py rename to dbt-tests-adapter/dbt/tests/adapter/caching/test_caching.py diff --git a/dbt/tests/adapter/catalog/files.py b/dbt-tests-adapter/dbt/tests/adapter/catalog/files.py similarity index 100% rename from dbt/tests/adapter/catalog/files.py rename to dbt-tests-adapter/dbt/tests/adapter/catalog/files.py diff --git a/dbt/tests/adapter/catalog/relation_types.py b/dbt-tests-adapter/dbt/tests/adapter/catalog/relation_types.py similarity index 100% rename from dbt/tests/adapter/catalog/relation_types.py rename to dbt-tests-adapter/dbt/tests/adapter/catalog/relation_types.py diff --git a/dbt/tests/adapter/column_types/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/column_types/fixtures.py similarity index 100% rename from dbt/tests/adapter/column_types/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/column_types/fixtures.py diff --git a/dbt/tests/adapter/column_types/test_column_types.py b/dbt-tests-adapter/dbt/tests/adapter/column_types/test_column_types.py similarity index 100% rename from dbt/tests/adapter/column_types/test_column_types.py rename to dbt-tests-adapter/dbt/tests/adapter/column_types/test_column_types.py diff --git a/dbt/tests/adapter/concurrency/test_concurrency.py b/dbt-tests-adapter/dbt/tests/adapter/concurrency/test_concurrency.py similarity index 100% rename from dbt/tests/adapter/concurrency/test_concurrency.py rename to dbt-tests-adapter/dbt/tests/adapter/concurrency/test_concurrency.py diff --git a/dbt/tests/adapter/constraints/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/constraints/fixtures.py similarity index 100% rename from dbt/tests/adapter/constraints/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/constraints/fixtures.py diff --git a/dbt/tests/adapter/constraints/test_constraints.py b/dbt-tests-adapter/dbt/tests/adapter/constraints/test_constraints.py similarity index 100% rename from dbt/tests/adapter/constraints/test_constraints.py rename to dbt-tests-adapter/dbt/tests/adapter/constraints/test_constraints.py diff --git a/dbt/tests/adapter/dbt_clone/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/dbt_clone/fixtures.py similarity index 100% rename from dbt/tests/adapter/dbt_clone/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/dbt_clone/fixtures.py diff --git a/dbt/tests/adapter/dbt_clone/test_dbt_clone.py b/dbt-tests-adapter/dbt/tests/adapter/dbt_clone/test_dbt_clone.py similarity index 100% rename from dbt/tests/adapter/dbt_clone/test_dbt_clone.py rename to dbt-tests-adapter/dbt/tests/adapter/dbt_clone/test_dbt_clone.py diff --git a/dbt/tests/adapter/dbt_debug/test_dbt_debug.py b/dbt-tests-adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py similarity index 100% rename from dbt/tests/adapter/dbt_debug/test_dbt_debug.py rename to dbt-tests-adapter/dbt/tests/adapter/dbt_debug/test_dbt_debug.py diff --git a/dbt/tests/adapter/dbt_show/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/dbt_show/fixtures.py similarity index 100% rename from dbt/tests/adapter/dbt_show/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/dbt_show/fixtures.py diff --git a/dbt/tests/adapter/dbt_show/test_dbt_show.py b/dbt-tests-adapter/dbt/tests/adapter/dbt_show/test_dbt_show.py similarity index 100% rename from dbt/tests/adapter/dbt_show/test_dbt_show.py rename to dbt-tests-adapter/dbt/tests/adapter/dbt_show/test_dbt_show.py diff --git a/dbt/tests/adapter/empty/test_empty.py b/dbt-tests-adapter/dbt/tests/adapter/empty/test_empty.py similarity index 100% rename from dbt/tests/adapter/empty/test_empty.py rename to dbt-tests-adapter/dbt/tests/adapter/empty/test_empty.py diff --git a/dbt/tests/adapter/ephemeral/test_ephemeral.py b/dbt-tests-adapter/dbt/tests/adapter/ephemeral/test_ephemeral.py similarity index 100% rename from dbt/tests/adapter/ephemeral/test_ephemeral.py rename to dbt-tests-adapter/dbt/tests/adapter/ephemeral/test_ephemeral.py diff --git a/dbt/tests/adapter/grants/base_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/base_grants.py similarity index 100% rename from dbt/tests/adapter/grants/base_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/base_grants.py diff --git a/dbt/tests/adapter/grants/test_incremental_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/test_incremental_grants.py similarity index 100% rename from dbt/tests/adapter/grants/test_incremental_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/test_incremental_grants.py diff --git a/dbt/tests/adapter/grants/test_invalid_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/test_invalid_grants.py similarity index 100% rename from dbt/tests/adapter/grants/test_invalid_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/test_invalid_grants.py diff --git a/dbt/tests/adapter/grants/test_model_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/test_model_grants.py similarity index 100% rename from dbt/tests/adapter/grants/test_model_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/test_model_grants.py diff --git a/dbt/tests/adapter/grants/test_seed_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/test_seed_grants.py similarity index 100% rename from dbt/tests/adapter/grants/test_seed_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/test_seed_grants.py diff --git a/dbt/tests/adapter/grants/test_snapshot_grants.py b/dbt-tests-adapter/dbt/tests/adapter/grants/test_snapshot_grants.py similarity index 100% rename from dbt/tests/adapter/grants/test_snapshot_grants.py rename to dbt-tests-adapter/dbt/tests/adapter/grants/test_snapshot_grants.py diff --git a/dbt/tests/adapter/hooks/data/seed_model.sql b/dbt-tests-adapter/dbt/tests/adapter/hooks/data/seed_model.sql similarity index 100% rename from dbt/tests/adapter/hooks/data/seed_model.sql rename to dbt-tests-adapter/dbt/tests/adapter/hooks/data/seed_model.sql diff --git a/dbt/tests/adapter/hooks/data/seed_run.sql b/dbt-tests-adapter/dbt/tests/adapter/hooks/data/seed_run.sql similarity index 100% rename from dbt/tests/adapter/hooks/data/seed_run.sql rename to dbt-tests-adapter/dbt/tests/adapter/hooks/data/seed_run.sql diff --git a/dbt/tests/adapter/hooks/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/hooks/fixtures.py similarity index 100% rename from dbt/tests/adapter/hooks/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/hooks/fixtures.py diff --git a/dbt/tests/adapter/hooks/test_model_hooks.py b/dbt-tests-adapter/dbt/tests/adapter/hooks/test_model_hooks.py similarity index 100% rename from dbt/tests/adapter/hooks/test_model_hooks.py rename to dbt-tests-adapter/dbt/tests/adapter/hooks/test_model_hooks.py diff --git a/dbt/tests/adapter/hooks/test_run_hooks.py b/dbt-tests-adapter/dbt/tests/adapter/hooks/test_run_hooks.py similarity index 100% rename from dbt/tests/adapter/hooks/test_run_hooks.py rename to dbt-tests-adapter/dbt/tests/adapter/hooks/test_run_hooks.py diff --git a/dbt/tests/adapter/incremental/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/fixtures.py similarity index 100% rename from dbt/tests/adapter/incremental/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/incremental/fixtures.py diff --git a/dbt/tests/adapter/incremental/test_incremental_merge_exclude_columns.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_merge_exclude_columns.py similarity index 100% rename from dbt/tests/adapter/incremental/test_incremental_merge_exclude_columns.py rename to dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_merge_exclude_columns.py diff --git a/dbt/tests/adapter/incremental/test_incremental_on_schema_change.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_on_schema_change.py similarity index 100% rename from dbt/tests/adapter/incremental/test_incremental_on_schema_change.py rename to dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_on_schema_change.py diff --git a/dbt/tests/adapter/incremental/test_incremental_predicates.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_predicates.py similarity index 100% rename from dbt/tests/adapter/incremental/test_incremental_predicates.py rename to dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_predicates.py diff --git a/dbt/tests/adapter/incremental/test_incremental_unique_id.py b/dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_unique_id.py similarity index 100% rename from dbt/tests/adapter/incremental/test_incremental_unique_id.py rename to dbt-tests-adapter/dbt/tests/adapter/incremental/test_incremental_unique_id.py diff --git a/dbt/tests/adapter/materialized_view/basic.py b/dbt-tests-adapter/dbt/tests/adapter/materialized_view/basic.py similarity index 100% rename from dbt/tests/adapter/materialized_view/basic.py rename to dbt-tests-adapter/dbt/tests/adapter/materialized_view/basic.py diff --git a/dbt/tests/adapter/materialized_view/changes.py b/dbt-tests-adapter/dbt/tests/adapter/materialized_view/changes.py similarity index 100% rename from dbt/tests/adapter/materialized_view/changes.py rename to dbt-tests-adapter/dbt/tests/adapter/materialized_view/changes.py diff --git a/dbt/tests/adapter/materialized_view/files.py b/dbt-tests-adapter/dbt/tests/adapter/materialized_view/files.py similarity index 100% rename from dbt/tests/adapter/materialized_view/files.py rename to dbt-tests-adapter/dbt/tests/adapter/materialized_view/files.py diff --git a/dbt/tests/adapter/persist_docs/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/persist_docs/fixtures.py similarity index 100% rename from dbt/tests/adapter/persist_docs/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/persist_docs/fixtures.py diff --git a/dbt/tests/adapter/persist_docs/test_persist_docs.py b/dbt-tests-adapter/dbt/tests/adapter/persist_docs/test_persist_docs.py similarity index 100% rename from dbt/tests/adapter/persist_docs/test_persist_docs.py rename to dbt-tests-adapter/dbt/tests/adapter/persist_docs/test_persist_docs.py diff --git a/dbt/tests/adapter/python_model/test_python_model.py b/dbt-tests-adapter/dbt/tests/adapter/python_model/test_python_model.py similarity index 100% rename from dbt/tests/adapter/python_model/test_python_model.py rename to dbt-tests-adapter/dbt/tests/adapter/python_model/test_python_model.py diff --git a/dbt/tests/adapter/python_model/test_spark.py b/dbt-tests-adapter/dbt/tests/adapter/python_model/test_spark.py similarity index 100% rename from dbt/tests/adapter/python_model/test_spark.py rename to dbt-tests-adapter/dbt/tests/adapter/python_model/test_spark.py diff --git a/dbt/tests/adapter/query_comment/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/query_comment/fixtures.py similarity index 100% rename from dbt/tests/adapter/query_comment/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/query_comment/fixtures.py diff --git a/dbt/tests/adapter/query_comment/test_query_comment.py b/dbt-tests-adapter/dbt/tests/adapter/query_comment/test_query_comment.py similarity index 100% rename from dbt/tests/adapter/query_comment/test_query_comment.py rename to dbt-tests-adapter/dbt/tests/adapter/query_comment/test_query_comment.py diff --git a/dbt/tests/adapter/relations/test_changing_relation_type.py b/dbt-tests-adapter/dbt/tests/adapter/relations/test_changing_relation_type.py similarity index 100% rename from dbt/tests/adapter/relations/test_changing_relation_type.py rename to dbt-tests-adapter/dbt/tests/adapter/relations/test_changing_relation_type.py diff --git a/dbt/tests/adapter/relations/test_dropping_schema_named.py b/dbt-tests-adapter/dbt/tests/adapter/relations/test_dropping_schema_named.py similarity index 100% rename from dbt/tests/adapter/relations/test_dropping_schema_named.py rename to dbt-tests-adapter/dbt/tests/adapter/relations/test_dropping_schema_named.py diff --git a/dbt/tests/adapter/simple_copy/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/simple_copy/fixtures.py similarity index 100% rename from dbt/tests/adapter/simple_copy/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_copy/fixtures.py diff --git a/dbt/tests/adapter/simple_copy/test_copy_uppercase.py b/dbt-tests-adapter/dbt/tests/adapter/simple_copy/test_copy_uppercase.py similarity index 100% rename from dbt/tests/adapter/simple_copy/test_copy_uppercase.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_copy/test_copy_uppercase.py diff --git a/dbt/tests/adapter/simple_copy/test_simple_copy.py b/dbt-tests-adapter/dbt/tests/adapter/simple_copy/test_simple_copy.py similarity index 100% rename from dbt/tests/adapter/simple_copy/test_simple_copy.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_copy/test_simple_copy.py diff --git a/dbt/tests/adapter/simple_seed/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/simple_seed/fixtures.py similarity index 100% rename from dbt/tests/adapter/simple_seed/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_seed/fixtures.py diff --git a/dbt/tests/adapter/simple_seed/seed_bom.csv b/dbt-tests-adapter/dbt/tests/adapter/simple_seed/seed_bom.csv similarity index 100% rename from dbt/tests/adapter/simple_seed/seed_bom.csv rename to dbt-tests-adapter/dbt/tests/adapter/simple_seed/seed_bom.csv diff --git a/dbt/tests/adapter/simple_seed/seeds.py b/dbt-tests-adapter/dbt/tests/adapter/simple_seed/seeds.py similarity index 100% rename from dbt/tests/adapter/simple_seed/seeds.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_seed/seeds.py diff --git a/dbt/tests/adapter/simple_seed/test_seed.py b/dbt-tests-adapter/dbt/tests/adapter/simple_seed/test_seed.py similarity index 100% rename from dbt/tests/adapter/simple_seed/test_seed.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_seed/test_seed.py diff --git a/dbt/tests/adapter/simple_seed/test_seed_type_override.py b/dbt-tests-adapter/dbt/tests/adapter/simple_seed/test_seed_type_override.py similarity index 100% rename from dbt/tests/adapter/simple_seed/test_seed_type_override.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_seed/test_seed_type_override.py diff --git a/dbt/tests/adapter/simple_snapshot/common.py b/dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/common.py similarity index 100% rename from dbt/tests/adapter/simple_snapshot/common.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/common.py diff --git a/dbt/tests/adapter/simple_snapshot/seeds.py b/dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/seeds.py similarity index 100% rename from dbt/tests/adapter/simple_snapshot/seeds.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/seeds.py diff --git a/dbt/tests/adapter/simple_snapshot/snapshots.py b/dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/snapshots.py similarity index 100% rename from dbt/tests/adapter/simple_snapshot/snapshots.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/snapshots.py diff --git a/dbt/tests/adapter/simple_snapshot/test_snapshot.py b/dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/test_snapshot.py similarity index 100% rename from dbt/tests/adapter/simple_snapshot/test_snapshot.py rename to dbt-tests-adapter/dbt/tests/adapter/simple_snapshot/test_snapshot.py diff --git a/dbt/tests/adapter/store_test_failures_tests/_files.py b/dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/_files.py similarity index 100% rename from dbt/tests/adapter/store_test_failures_tests/_files.py rename to dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/_files.py diff --git a/dbt/tests/adapter/store_test_failures_tests/basic.py b/dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/basic.py similarity index 100% rename from dbt/tests/adapter/store_test_failures_tests/basic.py rename to dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/basic.py diff --git a/dbt/tests/adapter/store_test_failures_tests/fixtures.py b/dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/fixtures.py similarity index 100% rename from dbt/tests/adapter/store_test_failures_tests/fixtures.py rename to dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/fixtures.py diff --git a/dbt/tests/adapter/store_test_failures_tests/test_store_test_failures.py b/dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/test_store_test_failures.py similarity index 100% rename from dbt/tests/adapter/store_test_failures_tests/test_store_test_failures.py rename to dbt-tests-adapter/dbt/tests/adapter/store_test_failures_tests/test_store_test_failures.py diff --git a/dbt/tests/adapter/unit_testing/test_case_insensitivity.py b/dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_case_insensitivity.py similarity index 100% rename from dbt/tests/adapter/unit_testing/test_case_insensitivity.py rename to dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_case_insensitivity.py diff --git a/dbt/tests/adapter/unit_testing/test_invalid_input.py b/dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_invalid_input.py similarity index 100% rename from dbt/tests/adapter/unit_testing/test_invalid_input.py rename to dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_invalid_input.py diff --git a/dbt/tests/adapter/unit_testing/test_types.py b/dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_types.py similarity index 100% rename from dbt/tests/adapter/unit_testing/test_types.py rename to dbt-tests-adapter/dbt/tests/adapter/unit_testing/test_types.py diff --git a/dbt/tests/adapter/utils/base_array_utils.py b/dbt-tests-adapter/dbt/tests/adapter/utils/base_array_utils.py similarity index 100% rename from dbt/tests/adapter/utils/base_array_utils.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/base_array_utils.py diff --git a/dbt/tests/adapter/utils/base_utils.py b/dbt-tests-adapter/dbt/tests/adapter/utils/base_utils.py similarity index 100% rename from dbt/tests/adapter/utils/base_utils.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/base_utils.py diff --git a/dbt/tests/adapter/utils/data_types/base_data_type_macro.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/base_data_type_macro.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/base_data_type_macro.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/base_data_type_macro.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_bigint.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_bigint.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_bigint.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_bigint.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_boolean.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_boolean.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_boolean.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_boolean.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_float.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_float.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_float.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_float.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_int.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_int.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_int.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_int.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_numeric.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_numeric.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_numeric.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_numeric.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_string.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_string.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_string.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_string.py diff --git a/dbt/tests/adapter/utils/data_types/test_type_timestamp.py b/dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_timestamp.py similarity index 100% rename from dbt/tests/adapter/utils/data_types/test_type_timestamp.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/data_types/test_type_timestamp.py diff --git a/dbt/tests/adapter/utils/fixture_any_value.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_any_value.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_any_value.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_any_value.py diff --git a/dbt/tests/adapter/utils/fixture_array_append.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_append.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_array_append.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_append.py diff --git a/dbt/tests/adapter/utils/fixture_array_concat.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_concat.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_array_concat.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_concat.py diff --git a/dbt/tests/adapter/utils/fixture_array_construct.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_construct.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_array_construct.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_array_construct.py diff --git a/dbt/tests/adapter/utils/fixture_bool_or.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_bool_or.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_bool_or.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_bool_or.py diff --git a/dbt/tests/adapter/utils/fixture_cast_bool_to_text.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_cast_bool_to_text.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_cast_bool_to_text.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_cast_bool_to_text.py diff --git a/dbt/tests/adapter/utils/fixture_concat.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_concat.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_concat.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_concat.py diff --git a/dbt/tests/adapter/utils/fixture_date_spine.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_date_spine.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_date_spine.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_date_spine.py diff --git a/dbt/tests/adapter/utils/fixture_date_trunc.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_date_trunc.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_date_trunc.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_date_trunc.py diff --git a/dbt/tests/adapter/utils/fixture_dateadd.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_dateadd.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_dateadd.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_dateadd.py diff --git a/dbt/tests/adapter/utils/fixture_datediff.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_datediff.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_datediff.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_datediff.py diff --git a/dbt/tests/adapter/utils/fixture_equals.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_equals.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_equals.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_equals.py diff --git a/dbt/tests/adapter/utils/fixture_escape_single_quotes.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_escape_single_quotes.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_escape_single_quotes.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_escape_single_quotes.py diff --git a/dbt/tests/adapter/utils/fixture_except.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_except.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_except.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_except.py diff --git a/dbt/tests/adapter/utils/fixture_generate_series.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_generate_series.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_generate_series.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_generate_series.py diff --git a/dbt/tests/adapter/utils/fixture_get_intervals_between.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_get_intervals_between.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_get_intervals_between.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_get_intervals_between.py diff --git a/dbt/tests/adapter/utils/fixture_get_powers_of_two.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_get_powers_of_two.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_get_powers_of_two.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_get_powers_of_two.py diff --git a/dbt/tests/adapter/utils/fixture_hash.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_hash.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_hash.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_hash.py diff --git a/dbt/tests/adapter/utils/fixture_intersect.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_intersect.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_intersect.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_intersect.py diff --git a/dbt/tests/adapter/utils/fixture_last_day.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_last_day.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_last_day.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_last_day.py diff --git a/dbt/tests/adapter/utils/fixture_length.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_length.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_length.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_length.py diff --git a/dbt/tests/adapter/utils/fixture_listagg.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_listagg.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_listagg.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_listagg.py diff --git a/dbt/tests/adapter/utils/fixture_null_compare.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_null_compare.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_null_compare.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_null_compare.py diff --git a/dbt/tests/adapter/utils/fixture_position.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_position.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_position.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_position.py diff --git a/dbt/tests/adapter/utils/fixture_replace.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_replace.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_replace.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_replace.py diff --git a/dbt/tests/adapter/utils/fixture_right.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_right.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_right.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_right.py diff --git a/dbt/tests/adapter/utils/fixture_safe_cast.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_safe_cast.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_safe_cast.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_safe_cast.py diff --git a/dbt/tests/adapter/utils/fixture_split_part.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_split_part.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_split_part.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_split_part.py diff --git a/dbt/tests/adapter/utils/fixture_string_literal.py b/dbt-tests-adapter/dbt/tests/adapter/utils/fixture_string_literal.py similarity index 100% rename from dbt/tests/adapter/utils/fixture_string_literal.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/fixture_string_literal.py diff --git a/dbt/tests/adapter/utils/test_any_value.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_any_value.py similarity index 100% rename from dbt/tests/adapter/utils/test_any_value.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_any_value.py diff --git a/dbt/tests/adapter/utils/test_array_append.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_array_append.py similarity index 100% rename from dbt/tests/adapter/utils/test_array_append.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_array_append.py diff --git a/dbt/tests/adapter/utils/test_array_concat.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_array_concat.py similarity index 100% rename from dbt/tests/adapter/utils/test_array_concat.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_array_concat.py diff --git a/dbt/tests/adapter/utils/test_array_construct.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_array_construct.py similarity index 100% rename from dbt/tests/adapter/utils/test_array_construct.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_array_construct.py diff --git a/dbt/tests/adapter/utils/test_bool_or.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_bool_or.py similarity index 100% rename from dbt/tests/adapter/utils/test_bool_or.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_bool_or.py diff --git a/dbt/tests/adapter/utils/test_cast_bool_to_text.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_cast_bool_to_text.py similarity index 100% rename from dbt/tests/adapter/utils/test_cast_bool_to_text.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_cast_bool_to_text.py diff --git a/dbt/tests/adapter/utils/test_concat.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_concat.py similarity index 100% rename from dbt/tests/adapter/utils/test_concat.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_concat.py diff --git a/dbt/tests/adapter/utils/test_current_timestamp.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_current_timestamp.py similarity index 100% rename from dbt/tests/adapter/utils/test_current_timestamp.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_current_timestamp.py diff --git a/dbt/tests/adapter/utils/test_date_spine.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_date_spine.py similarity index 100% rename from dbt/tests/adapter/utils/test_date_spine.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_date_spine.py diff --git a/dbt/tests/adapter/utils/test_date_trunc.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_date_trunc.py similarity index 100% rename from dbt/tests/adapter/utils/test_date_trunc.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_date_trunc.py diff --git a/dbt/tests/adapter/utils/test_dateadd.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_dateadd.py similarity index 100% rename from dbt/tests/adapter/utils/test_dateadd.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_dateadd.py diff --git a/dbt/tests/adapter/utils/test_datediff.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_datediff.py similarity index 100% rename from dbt/tests/adapter/utils/test_datediff.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_datediff.py diff --git a/dbt/tests/adapter/utils/test_equals.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_equals.py similarity index 100% rename from dbt/tests/adapter/utils/test_equals.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_equals.py diff --git a/dbt/tests/adapter/utils/test_escape_single_quotes.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_escape_single_quotes.py similarity index 100% rename from dbt/tests/adapter/utils/test_escape_single_quotes.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_escape_single_quotes.py diff --git a/dbt/tests/adapter/utils/test_except.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_except.py similarity index 100% rename from dbt/tests/adapter/utils/test_except.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_except.py diff --git a/dbt/tests/adapter/utils/test_generate_series.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_generate_series.py similarity index 100% rename from dbt/tests/adapter/utils/test_generate_series.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_generate_series.py diff --git a/dbt/tests/adapter/utils/test_get_intervals_between.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_get_intervals_between.py similarity index 100% rename from dbt/tests/adapter/utils/test_get_intervals_between.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_get_intervals_between.py diff --git a/dbt/tests/adapter/utils/test_get_powers_of_two.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_get_powers_of_two.py similarity index 100% rename from dbt/tests/adapter/utils/test_get_powers_of_two.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_get_powers_of_two.py diff --git a/dbt/tests/adapter/utils/test_hash.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_hash.py similarity index 100% rename from dbt/tests/adapter/utils/test_hash.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_hash.py diff --git a/dbt/tests/adapter/utils/test_intersect.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_intersect.py similarity index 100% rename from dbt/tests/adapter/utils/test_intersect.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_intersect.py diff --git a/dbt/tests/adapter/utils/test_last_day.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_last_day.py similarity index 100% rename from dbt/tests/adapter/utils/test_last_day.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_last_day.py diff --git a/dbt/tests/adapter/utils/test_length.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_length.py similarity index 100% rename from dbt/tests/adapter/utils/test_length.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_length.py diff --git a/dbt/tests/adapter/utils/test_listagg.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_listagg.py similarity index 100% rename from dbt/tests/adapter/utils/test_listagg.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_listagg.py diff --git a/dbt/tests/adapter/utils/test_null_compare.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_null_compare.py similarity index 100% rename from dbt/tests/adapter/utils/test_null_compare.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_null_compare.py diff --git a/dbt/tests/adapter/utils/test_position.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_position.py similarity index 100% rename from dbt/tests/adapter/utils/test_position.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_position.py diff --git a/dbt/tests/adapter/utils/test_replace.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_replace.py similarity index 100% rename from dbt/tests/adapter/utils/test_replace.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_replace.py diff --git a/dbt/tests/adapter/utils/test_right.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_right.py similarity index 100% rename from dbt/tests/adapter/utils/test_right.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_right.py diff --git a/dbt/tests/adapter/utils/test_safe_cast.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_safe_cast.py similarity index 100% rename from dbt/tests/adapter/utils/test_safe_cast.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_safe_cast.py diff --git a/dbt/tests/adapter/utils/test_split_part.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_split_part.py similarity index 100% rename from dbt/tests/adapter/utils/test_split_part.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_split_part.py diff --git a/dbt/tests/adapter/utils/test_string_literal.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_string_literal.py similarity index 100% rename from dbt/tests/adapter/utils/test_string_literal.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_string_literal.py diff --git a/dbt/tests/adapter/utils/test_timestamps.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_timestamps.py similarity index 100% rename from dbt/tests/adapter/utils/test_timestamps.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_timestamps.py diff --git a/dbt/tests/adapter/utils/test_validate_sql.py b/dbt-tests-adapter/dbt/tests/adapter/utils/test_validate_sql.py similarity index 100% rename from dbt/tests/adapter/utils/test_validate_sql.py rename to dbt-tests-adapter/dbt/tests/adapter/utils/test_validate_sql.py diff --git a/dbt-tests-adapter/pyproject.toml b/dbt-tests-adapter/pyproject.toml index 990f2d1a..c5df5998 100644 --- a/dbt-tests-adapter/pyproject.toml +++ b/dbt-tests-adapter/pyproject.toml @@ -50,16 +50,14 @@ Changelog = "https://github.com/dbt-labs/dbt-adapters/blob/main/CHANGELOG.md" requires = ["hatchling"] build-backend = "hatchling.build" -[tool.hatch.build.targets.sdist.force-include] -"../dbt/tests" = "dbt/tests" -"../dbt/__init__.py" = "dbt/__init__.py" +[tool.hatch.version] +path = "dbt/tests/__about__.py" -[tool.hatch.build.targets.wheel.force-include] -"../dbt/tests" = "dbt/tests" -"../dbt/__init__.py" = "dbt/__init__.py" +[tool.hatch.build.targets.sdist] +include = ["dbt/tests", "dbt/__init__.py"] -[tool.hatch.version] -path = "../dbt/tests/__about__.py" +[tool.hatch.build.targets.wheel] +include = ["dbt/tests", "dbt/__init__.py"] [tool.hatch.envs.build] detached = true diff --git a/dbt/adapters/__about__.py b/dbt/adapters/__about__.py index d94aee52..75d27aae 100644 --- a/dbt/adapters/__about__.py +++ b/dbt/adapters/__about__.py @@ -1 +1 @@ -version = "0.1.0a8" +version = "1.0.0a2" diff --git a/dbt/tests/__about__.py b/dbt/tests/__about__.py deleted file mode 100644 index 759fdcd7..00000000 --- a/dbt/tests/__about__.py +++ /dev/null @@ -1 +0,0 @@ -version = "1.8.0a2" diff --git a/pyproject.toml b/pyproject.toml index 1bc90a59..f9b8b0f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", ] dependencies = [ - "dbt-common<1.0", + "dbt-common<2.0", "pytz>=2015.7", # installed via dbt-common but used directly "agate>=1.0,<2.0", @@ -142,6 +142,7 @@ files = [ ] exclude = [ "dbt/adapters/events/adapter_types_pb2.py", + "dbt-tests-adapter/dbt/__init__.py", # overlaps with `dbt/__init__.py` as expected for namespaces "venv", ] [[tool.mypy.overrides]]