Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI tweaks for gradio and gradio_client #3752

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

concurrency:
group: backend-${{ github.ref }}-${{ github.event_name == 'push' || github.event.inputs.fire != null }}
cancel-in-progress: false
cancel-in-progress: true

env:
NODE_OPTIONS: "--max-old-space-size=4096"
Expand Down
1 change: 1 addition & 0 deletions client/python/scripts/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ cd "$(dirname ${0})/.."
echo "Linting..."
ruff test gradio_client
black --check test gradio_client
pyright gradio_client/*.py

echo "Testing..."
python -m pip install -e ../../. # Install gradio from local source (as the latest version may not yet be published to PyPI)
Expand Down
3 changes: 3 additions & 0 deletions client/python/scripts/format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ cd "$(dirname ${0})/.."
echo "Formatting the client library.. Our style follows the Black code style."
ruff --fix test gradio_client
black test gradio_client

echo "Type checking the client library with pyright"
pyright gradio_client/*.py
1 change: 1 addition & 0 deletions client/python/test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ black==22.6.0
pytest-asyncio
pytest==7.1.2
ruff==0.0.260
pyright==1.1.298
4 changes: 1 addition & 3 deletions scripts/type_check_backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,4 @@ source scripts/helpers.sh

pip_required

pip install --upgrade pip
pip install pyright==1.1.298
pyright gradio/*.py client/python/gradio_client/*.py
pyright gradio/*.py
1 change: 1 addition & 0 deletions test/requirements-37.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pygments==2.12.0
# via ipython
pyparsing==3.0.9
# via packaging
pyright==1.1.298
pyrsistent==0.18.1
# via jsonschema
pytest==7.1.2
Expand Down
1 change: 1 addition & 0 deletions test/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ python-dateutil==2.8.2
# via
# botocore
# pandas
pyright==1.1.298
pytz==2022.1
# via pandas
pywavelets==1.3.0
Expand Down