Skip to content

Commit

Permalink
Use uv; update Python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
jayqi authored Apr 29, 2024
1 parent 436c1ef commit bc219fa
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 25 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.11 with uv
uses: drivendataorg/setup-python-uv-action@v1
with:
python-version: 3.8
python-version: 3.11

- name: Install dependencies
run: |
uv pip install -r dev-requirements.txt
- name: Build examples and docs
run: |
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,14 @@ jobs:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python 3.11 with uv
uses: drivendataorg/setup-python-uv-action@v1
with:
python-version: 3.7
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
uv pip install -r dev-requirements.txt
- name: Build package
id: build_package
Expand Down
28 changes: 12 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.8
uses: actions/setup-python@v2
- name: Set up Python 3.11 with uv
uses: drivendataorg/setup-python-uv-action@v1
with:
python-version: 3.8
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
uv pip install -r dev-requirements.txt
- name: Lint package
run: |
Expand All @@ -40,21 +39,20 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:

- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Set up Python ${{ matrix.python-version }} with uv
uses: drivendataorg/setup-python-uv-action@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r dev-requirements.txt
uv pip install -r dev-requirements.txt
- name: Test Package
run: |
Expand All @@ -78,14 +76,12 @@ jobs:
PYTHON_BIN=bin/python
fi
echo "=== Testing wheel installation ==="
python -m venv .venv-whl
.venv-whl/$PYTHON_BIN -m pip install --upgrade pip
.venv-whl/$PYTHON_BIN -m pip install dist/deon-*.whl
uv virtualenv .venv-whl
uv pip install dist/deon-*.whl --python=.venv-whl/$PYTHON_BIN
.venv-whl/$PYTHON_BIN -m deon --help
echo "=== Testing source installation ==="
python -m venv .venv-sdist
.venv-sdist/$PYTHON_BIN -m pip install --upgrade pip
.venv-sdist/$PYTHON_BIN -m pip install dist/deon-*.tar.gz --force-reinstall
uv virtualenv .venv-sdist
uv pip install dist/deon-*.tar.gz --python=.venv-sdist/$PYTHON_BIN
.venv-sdist/$PYTHON_BIN -m deon --help
- name: Test Building Docs
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
reqs:
pip install -r dev-requirements.txt

examples: reqs
examples:
deon --output examples/ethics.md --overwrite
deon --output examples/ethics.ipynb --overwrite
deon --output examples/ethics.html --overwrite
Expand Down

0 comments on commit bc219fa

Please sign in to comment.