-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADAP-1118: Migrate to pyproject.toml (#1150)
* update to pyproject.toml * install all optional dependencies in the default environment for testing * update dagger script for hatch * update hatch integration tests command * keep the dagger reqs in their own file; dagger requires py310 and we test on py39 * update spark container to be more clear about what is happening when
- Loading branch information
1 parent
a38a288
commit 0247ad9
Showing
20 changed files
with
206 additions
and
415 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-07T18:18:14.85697-05:00 | ||
custom: | ||
Author: mikealfare | ||
Issue: "1150" |
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 |
---|---|---|
|
@@ -51,20 +51,8 @@ jobs: | |
with: | ||
python-version: '3.9' | ||
|
||
- name: Install python dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libsasl2-dev | ||
python -m pip install --user --upgrade pip | ||
python -m pip --version | ||
python -m pip install pre-commit | ||
pre-commit --version | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r dev-requirements.txt | ||
python -c "import dbt.adapters.spark" | ||
- name: Run 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 }} | ||
|
@@ -87,29 +75,9 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Install python dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install libsasl2-dev | ||
python -m pip install --user --upgrade pip | ||
python -m pip --version | ||
python -m pip install -r requirements.txt | ||
python -m pip install -r dev-requirements.txt | ||
python -m pip install -e . | ||
- name: Run unit tests | ||
run: python -m pytest --color=yes --csv unit_results.csv -v tests/unit | ||
uses: pypa/hatch@install | ||
|
||
- name: Get current date | ||
if: always() | ||
id: date | ||
run: echo "date=$(date +'%Y-%m-%dT%H_%M_%S')" >> $GITHUB_OUTPUT #no colons allowed for artifacts | ||
|
||
- uses: actions/upload-artifact@v4 | ||
if: always() | ||
with: | ||
name: unit_results_${{ matrix.python-version }}-${{ steps.date.outputs.date }}.csv | ||
path: unit_results.csv | ||
overwrite: true | ||
- run: hatch run unit-tests | ||
|
||
build: | ||
name: build packages | ||
|
@@ -128,24 +96,16 @@ jobs: | |
with: | ||
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 | ||
|
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 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.