Skip to content

Commit

Permalink
Merge branch 'main' into solve-847
Browse files Browse the repository at this point in the history
  • Loading branch information
smagnan authored Jun 3, 2024
2 parents b9fc0aa + 95f108e commit 0d5a384
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 21 deletions.
22 changes: 22 additions & 0 deletions .github/scripts/build_sdist_and_wheel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

# Build sdist and wheel
python -m pip install -U pip
python -m pip install build
python -m build

# Check sdist install and imports
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/outlines-*.tar.gz
venv-sdist/bin/python -c "import outlines"
cd ..

# Check wheel install and imports
mkdir -p test-wheel
cd test-wheel
python -m venv venv-wheel
venv-wheel/bin/python -m pip install ../dist/outlines-*.whl
venv-wheel/bin/python -c "import outlines"
cd ..
21 changes: 2 additions & 19 deletions .github/workflows/release_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,11 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: "3.10"
- name: Build sdist and wheel
run: |
python -m pip install -U pip
python -m pip install build
python -m build
- name: Build SDist and Wheel
run: ./.github/scripts/build_sdist_and_wheel.sh
- name: Check that the package version matches the Release name
run: |
grep -Rq "^Version: ${GITHUB_REF:10}$" outlines.egg-info/PKG-INFO
- name: Check sdist install and imports
run: |
mkdir -p test-sdist
cd test-sdist
python -m venv venv-sdist
venv-sdist/bin/python -m pip install ../dist/outlines-*.tar.gz
venv-sdist/bin/python -c "import outlines"
- name: Check wheel install and imports
run: |
mkdir -p test-wheel
cd test-wheel
python -m venv venv-wheel
venv-wheel/bin/python -m pip install ../dist/outlines-*.whl
venv-wheel/bin/python -c "import outlines"
- name: Publish to PyPi
uses: pypa/[email protected]
with:
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,11 @@ jobs:
name: html-report
path: htmlcov
if: ${{ failure() }}

build-wheel:
name: Build Wheel and Test SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build SDist and Wheel
run: ./.github/scripts/build_sdist_and_wheel.sh
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ dependencies = [
"requests",
"tqdm",
"datasets",
"pycountry",
"pyairports",
]
dynamic = ["version"]

Expand All @@ -58,8 +60,6 @@ test = [
"vllm",
"torch",
"transformers",
"pycountry",
"pyairports",
]
serve = [
"vllm>=0.3.0",
Expand Down

0 comments on commit 0d5a384

Please sign in to comment.