Skip to content

Commit

Permalink
Merge branch '5.0-dev' of github.com:gradio-app/gradio into 5.0-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahblair committed Sep 4, 2024
2 parents 3b41452 + 950055e commit fe06141
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/eighty-jeans-unite.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"gradio": patch
---

fix:Fix for create_or_modify_pyi read_text Windows Issue in component_meta.py
21 changes: 11 additions & 10 deletions .github/actions/install-all-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,19 +54,20 @@ runs:
run: |
python -m pip install --upgrade virtualenv
python -m virtualenv venv
- uses: actions/cache@v4
id: cache
with:
path: |
venv/*
client/python/venv
restore-keys: |
gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-
key: "gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
# - uses: actions/cache@v4
# id: cache
# with:
# path: |
# venv/*
# client/python/venv
# restore-keys: |
# gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-
# key: "gradio-lib-${{inputs.python_version}}-${{inputs.os}}-latest-pip-${{ hashFiles('client/python/requirements.txt') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('test/requirements.txt') }}-${{ hashFiles('client/python/test/requirements.txt') }}${{ inputs.test == 'true' && '-test' || ''}}"
- name: Install ffmpeg
uses: FedericoCarboni/setup-ffmpeg@583042d32dd1cabb8bd09df03bde06080da5c87c # @v2
- name: Install test dependencies
if: inputs.test == 'true' && steps.cache.outputs.cache-hit != 'true'
if: inputs.test == 'true'
# && steps.cache.outputs.cache-hit != 'true'
shell: bash
run: |
. ${{ env.VENV_ACTIVATE }}
Expand Down
15 changes: 8 additions & 7 deletions .github/actions/install-frontend-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@ inputs:
runs:
using: "composite"
steps:
- uses: actions/cache@v4
id: frontend-cache
with:
path: |
gradio/templates/*
key: gradio-lib-front-end-${{ hashFiles('js/**', 'client/js/**')}}
# - uses: actions/cache@v4
# id: frontend-cache
# with:
# path: |
# gradio/templates/*
# key: gradio-lib-front-end-${{ hashFiles('js/**', 'client/js/**')}}
- name: Install pnpm
uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # @v4
with:
Expand All @@ -34,7 +34,8 @@ runs:
shell: bash
run: pnpm css
- name: Build frontend
if: inputs.skip_build == 'false' && steps.frontend-cache.outputs.cache-hit != 'true'
if: inputs.skip_build == 'false'
# && steps.frontend-cache.outputs.cache-hit != 'true'
shell: bash
run: pnpm build
- name: generate types
Expand Down
2 changes: 1 addition & 1 deletion gradio/component_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def create_or_modify_pyi(
):
source_file = Path(inspect.getfile(component_class))

source_code = source_file.read_text()
source_code = source_file.read_text(encoding="utf-8")

current_impl, lineno = extract_class_source_code(source_code, class_name)

Expand Down

0 comments on commit fe06141

Please sign in to comment.