-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* move config into pyproject.toml or hatch.toml
- Loading branch information
1 parent
99d6a3d
commit a145bc1
Showing
17 changed files
with
641 additions
and
423 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Under the Hood | ||
body: Move from setup.py to pyproject.toml and to hatch as a dev tool | ||
time: 2024-12-07T16:59:18.731819-05:00 | ||
custom: | ||
Author: mikealfare | ||
Issue: "951" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,19 +48,12 @@ jobs: | |
persist-credentials: false | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip install -r dev-requirements.txt | ||
python -m pip --version | ||
pre-commit --version | ||
- name: pre-commit hooks | ||
run: pre-commit run --all-files --show-diff-on-failure | ||
uses: pre-commit/[email protected] | ||
|
||
unit: | ||
name: unit test / python ${{ matrix.python-version }} | ||
|
@@ -72,10 +65,6 @@ jobs: | |
matrix: | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
|
||
env: | ||
TOXENV: "unit" | ||
PYTEST_ADDOPTS: "-v --color=yes --csv unit_results.csv" | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
@@ -88,27 +77,9 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip install tox | ||
python -m pip --version | ||
tox --version | ||
- name: Run tox | ||
run: tox | ||
|
||
- name: Get current date | ||
if: always() | ||
id: date | ||
#no colons allowed for artifacts | ||
run: | | ||
echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT | ||
uses: pypa/hatch@install | ||
|
||
- uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: unit_results_${{ matrix.python-version }}-${{ steps.date.outputs.date }}.csv | ||
path: unit_results.csv | ||
- run: hatch run unit-tests | ||
|
||
build: | ||
name: build packages | ||
|
@@ -130,24 +101,16 @@ jobs: | |
python-version: '3.9' | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip install --upgrade setuptools wheel twine check-wheel-contents | ||
python -m pip --version | ||
uses: pypa/hatch@install | ||
|
||
- name: Build distributions | ||
run: ./scripts/build-dist.sh | ||
run: hatch build | ||
|
||
- name: Show distributions | ||
run: ls -lh dist/ | ||
|
||
- name: Check distribution descriptions | ||
run: | | ||
twine check dist/* | ||
- name: Check wheel contents | ||
run: | | ||
check-wheel-contents dist/*.whl --ignore W007,W008 | ||
run: hatch run build:check-all | ||
|
||
- name: Check if this is an alpha version | ||
id: check-is-alpha | ||
|
@@ -175,6 +138,7 @@ jobs: | |
matrix: | ||
os: [ubuntu-22.04, macos-14, windows-2022] | ||
python-version: ['3.9', '3.10', '3.11', '3.12'] | ||
dist-type: ["whl", "gz"] | ||
exclude: | ||
# psycopg2-binary doesn't have a precompiled wheel for python 3.9 for mac | ||
- os: macos-14 | ||
|
@@ -186,12 +150,6 @@ jobs: | |
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
python -m pip install --user --upgrade pip | ||
python -m pip install --upgrade wheel | ||
python -m pip --version | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
name: dist | ||
|
@@ -200,18 +158,10 @@ jobs: | |
- name: Show distributions | ||
run: ls -lh dist/ | ||
|
||
- name: Install wheel distributions | ||
run: | | ||
find ./dist/*.whl -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ | ||
- name: Check wheel distributions | ||
run: | | ||
python -c "import dbt.adapters.redshift" | ||
- name: Install source distributions | ||
- name: Install ${{ matrix.dist-type }} distributions | ||
run: | | ||
find ./dist/*.gz -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ | ||
find ./dist/*.${{ matrix.dist-type }} -maxdepth 1 -type f | xargs python -m pip install --force-reinstall --find-links=dist/ | ||
- name: Check source distributions | ||
- name: Check ${{ matrix.dist-type }} distributions | ||
run: | | ||
python -c "import dbt.adapters.redshift" | ||
python -c "import dbt.adapters.bigquery" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.