Skip to content

Commit

Permalink
chore: migrate to pyproject.toml (#3025)
Browse files Browse the repository at this point in the history
  • Loading branch information
aarnphm authored Sep 26, 2022
1 parent 945189d commit 266b131
Show file tree
Hide file tree
Showing 14 changed files with 201 additions and 224 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ jobs:
related: &related
- .github/workflows/ci.yml
- codecov.yml
- setup.cfg
- pyproject.toml
- scripts/ci/config.yml
- scripts/ci/run_tests.sh
Expand Down
36 changes: 5 additions & 31 deletions .github/workflows/frameworks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ jobs:
with:
filters: |
dependencies: &dependencies
- setup.cfg
- pyproject.toml
- scripts/ci/config.yml
- requirements/tests-requirements.txt
Expand Down Expand Up @@ -220,7 +219,6 @@ jobs:
- tests/integration/frameworks/models/xgboost.py
- tests/integration/frameworks/test_frameworks.py
catboost_integration_tests:
needs: diff
if: ${{ (github.event_name == 'pull_request' && needs.diff.outputs.catboost == 'true') || github.event_name == 'push' }}
Expand All @@ -246,7 +244,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -291,7 +288,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -336,7 +332,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -385,7 +380,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand All @@ -398,7 +392,7 @@ jobs:
- name: Run unit test for fastai
shell: bash
run: |
OPTS=(--cov=bentoml --cov-config=./setup.cfg --cov-report=xml:"fastai.unit.xml" --cov-report term-missing:skip-covered)
OPTS=(--cov=bentoml --cov-config=./pyproject.toml --cov-report=xml:"fastai.unit.xml" --cov-report term-missing:skip-covered)
python -m pytest ./tests/integration/frameworks/test_fastai_unit.py "${OPTS[@]}" || ERR=1
if [ $ERR -eq 1 ]; then
echo "unit tests for fastai failed!"
Expand Down Expand Up @@ -440,7 +434,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -485,7 +478,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -529,7 +521,6 @@ jobs:
# path: ${{ steps.cache-dir.outputs.dir }}
# key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


# - name: Install dependencies
# run: |
# pip install .
Expand Down Expand Up @@ -573,7 +564,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -617,7 +607,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -661,7 +650,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -705,7 +693,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -752,7 +739,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -796,7 +782,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -841,7 +826,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -887,7 +871,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand All @@ -900,7 +883,7 @@ jobs:
- name: Run unit test for pytorch
shell: bash
run: |
OPTS=(--cov=bentoml --cov-config=./setup.cfg --cov-report=xml:"pytorch.unit.xml" --cov-report term-missing:skip-covered)
OPTS=(--cov=bentoml --cov-config=./pyproject.toml --cov-report=xml:"pytorch.unit.xml" --cov-report term-missing:skip-covered)
python -m pytest ./tests/integration/frameworks/test_pytorch_unit.py "${OPTS[@]}" || ERR=1
if [ $ERR -eq 1 ]; then
echo "unit tests for pytorch failed!"
Expand Down Expand Up @@ -941,7 +924,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -985,7 +967,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -1029,7 +1010,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -1074,7 +1054,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -1119,7 +1098,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -1164,7 +1142,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down Expand Up @@ -1208,7 +1185,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand All @@ -1221,7 +1197,7 @@ jobs:
- name: Run unit test for tensorflow_v2
shell: bash
run: |
OPTS=(--cov=bentoml --cov-config=./setup.cfg --cov-report=xml:"tf2.unit.xml" --cov-report term-missing:skip-covered)
OPTS=(--cov=bentoml --cov-config=./pyproject.toml --cov-report=xml:"tf2.unit.xml" --cov-report term-missing:skip-covered)
python -m pytest ./tests/integration/frameworks/test_tensorflow_v2_unit.py "${OPTS[@]}" || ERR=1
if [ $ERR -eq 1 ]; then
echo "unit tests for tensorflow_v2 failed!"
Expand All @@ -1231,7 +1207,7 @@ jobs:
- name: Run tensorflow_v2 without eager execution
shell: bash
run: |
OPTS=(--cov=bentoml --cov-config=./setup.cfg --cov-report=xml:"tf2.unit.no_eager.xml" --cov-report term-missing:skip-covered --disable-tf-eager-execution)
OPTS=(--cov=bentoml --cov-config=./pyproject.toml --cov-report=xml:"tf2.unit.no_eager.xml" --cov-report term-missing:skip-covered --disable-tf-eager-execution)
python -m pytest ./tests/integration/frameworks/test_tensorflow_v2_unit.py "${OPTS[@]}" || ERR=1
if [ $ERR -eq 1 ]; then
echo "unit tests for tensorflow_v2 failed!"
Expand Down Expand Up @@ -1272,7 +1248,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand All @@ -1285,7 +1260,7 @@ jobs:
- name: Run unit test for transformers
shell: bash
run: |
OPTS=(--cov=bentoml --cov-config=./setup.cfg --cov-report=xml:"transformers.unit.xml" --cov-report term-missing:skip-covered)
OPTS=(--cov=bentoml --cov-config=./pyproject.toml --cov-report=xml:"transformers.unit.xml" --cov-report term-missing:skip-covered)
python -m pytest ./tests/integration/frameworks/test_transformers_unit.py "${OPTS[@]}" || ERR=1
if [ $ERR -eq 1 ]; then
echo "unit tests for transformers failed!"
Expand Down Expand Up @@ -1326,7 +1301,6 @@ jobs:
path: ${{ steps.cache-dir.outputs.dir }}
key: ${{ runner.os }}-tests-${{ hashFiles('requirements/tests-requirements.txt') }}


- name: Install dependencies
run: |
pip install .
Expand Down
1 change: 0 additions & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ python:
- requirements: requirements/docs-requirements.txt
- method: pip
path: .
system_packages: true

formats:
- epub
Expand Down
6 changes: 1 addition & 5 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# All files tracked by Git are included in PyPI distribution
include bentoml/grpc/**/*_pb2*.py
include bentoml/grpc/**/*.pyi

# Files to exclude in PyPI distribution
exclude CONTRIBUTING.md GOVERNANCE.md CODE_OF_CONDUCT.md DEVELOPMENT.md SECURITY.md
exclude Makefile MANIFEST.in
Expand All @@ -23,7 +19,7 @@ prune .git*
prune */__pycache__
prune */.DS_Store
prune */.ipynb_checkpoints
prune */README*
prune **/*/README*

# Patterns to exclude from any directory
global-exclude *.py[cod]
Loading

0 comments on commit 266b131

Please sign in to comment.