gradio/.config/playwright.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.5 KiB
JavaScript
Raw Normal View History

import { defineConfig } from "@playwright/test";
const base = defineConfig({
use: {
screenshot: "only-on-failure",
trace: "retain-on-failure",
permissions: ["clipboard-read", "clipboard-write", "microphone"],
bypassCSP: true,
launchOptions: {
args: [
"--disable-web-security",
"--use-fake-device-for-media-stream",
"--use-fake-ui-for-media-stream",
"--use-file-for-fake-audio-capture=../gradio/test_data/test_audio.wav"
]
}
},
2024-02-01 22:23:59 +08:00
expect: { timeout: 15000 },
timeout: 30000,
Gradio components in `gr.Chatbot()` (#8131) * chatbot components * demoi * add changeset * preprocess fix * add changeset * Make guide for tailwind more verbose (#8152) * Lite wheel optimization (#7855) * Add `pull_request.branches.main` as a trigger of the `publish` workflow * [WIP] Comment out the publish steps * Package and upload the NPM package for debug * Skip the copy_frontend.py hook in the Lite build * add changeset * [WIP] Show gradio files * [WIP] Show gradio files * Comment out installing the gradio and gradio_client libraries * Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows * Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows * Add code * Revert "[WIP] Show gradio files" This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83. * Build the gradio wheel with the custom lite target * add changeset * Revert "[WIP] Show gradio files" This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a. * Revert "Skip the copy_frontend.py hook in the Lite build" This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7. * Update .github/actions/install-frontend-deps/action.yml for hatch installation * [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch * Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch" This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc. * Comment-in lines in publish.yml * Move Lite build from publish.yml to deploy-spaces.yml * Use the build_lite option of install-all-deps instead of running the build command * [TMP] Change the branch of action files * Fix the hatch Lite build setting * Return pnpm pack to deploy-space * Revert "[TMP] Change the branch of action files" This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85. * Remove dependencies for lite build * [TMP] Change the branch of action files * Revert "Remove dependencies for lite build" This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c. * Install packaging>=23.2 * [TMP] Show packaging version * Fix pip install * Fix * Uninstall packaging once * Use `pip install -U` instead of uninstalling the exiting version * Revert "[TMP] Show packaging version" This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7. * Add `-U` flag * Set packaging version as >=23.2 * Revert the changes on pip install * Set packaging version as >=23.2 in requirements.txt * Revert "Set packaging version as >=23.2" This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069. * Fix hook name * Revert "Set packaging version as >=23.2 in requirements.txt" This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f. * Revert "Revert the changes on pip install" This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466. * Add comments * Revert "[TMP] Change the branch of action files" This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d. * Revert the trigger of .github/workflows/deploy-spaces.yml * Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action * [TMP] Trigger CI based on this PR * Remove packging installation * Revert "Remove packging installation" This reverts commit 4a4f18de3a78220150bc614f574a5a808454cd12. * Revert "[TMP] Trigger CI based on this PR" This reverts commit 6cea830c8e9f853c612c7286cba68027b5262b3b. --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> * Add ETag to `/custom_component` route to control browser caching (#8170) * Add code * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Implement JS Client tests (#8109) * add msw setup and initialisation tests * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Remove hatch installation in js/app/package.json which is no longer needed (#8174) * Remove hatch installation in js/app/package.json which is no longer needed * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Update test-functional.yml - Fix vulnerability code injection (#8145) * Update test-functional.yml * Update test-functional.yml * tweaks --------- Co-authored-by: pngwn <hello@pngwn.io> * rework upload to be a class method + pass client into each component (#8179) * rework upload to be a class method + pass client into each component * add changeset * Update client/js/src/utils/upload_files.ts * fix storybook * review comments * Apply suggestions from code review Co-authored-by: Hannah <hannahblair@users.noreply.github.com> * format * ts fix --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> * chore(deps): update pnpm to v9 (#8123) * chore(deps): update pnpm to v9 * update workflow --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pngwn <hello@pngwn.io> * Use workspace version for code in _website (#8189) * workspace * add changeset * remove circular import from preview * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Pass Error status in /dev/reload stream (#8106) * get error message * Support multiple clients * add changeset * add changeset * add changeset * Display in UI * console.error the python traceback * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Convert sse calls in client from async to sync (#8182) * convert sse calls in client from async to sync * add changeset * more sync * lint * more sync * fix threadpool * fix timeouts * reuse executor * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * run python reload only if python file changed (#8194) * run python reload only if python file changed * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com> * fix: handling SIGINT correctly in reload.py, single entrance of block_thread in blocks.py (#8158) * fix: handling SIGINT, single block_thread and fix popen * Use pass --------- Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> * Add eventsource polyfill for Node.js and browser environments (#8118) * add msw setup and initialisation tests * add changeset * add eventsource polyfill for node and browser envs * add changeset * add changeset * config tweak * types * update eventsource usage * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks * dynamically import eventsource * revet eventsource imports * add node test * lockfile * add client test in root pkg file * lcokfile * remove eventsource from js/app * add changeset * remove ts ignore * move eventsource polyfill to eventsource factory * add changeset * tweak --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Ensure connectivity to private HF spaces with SSE protocol (#8181) * add msw setup and initialisation tests * add changeset * add eventsource polyfill for node and browser envs * add changeset * add changeset * config tweak * types * update eventsource usage * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks * dynamically import eventsource * revet eventsource imports * add jwt param to sse requests * add stream test * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Support custom components in gr.load (#8200) * Add code * add changeset * Update fuzzy-mirrors-scream.md * Update fuzzy-mirrors-scream.md * Fix tests * Update .changeset/fuzzy-mirrors-scream.md Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Fix code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Refactor analytics to not use api.gradio.app (#8180) * Analytics refactor * add changeset * add changeset * Fix wasm? * Fix python tests' * Revert changes chrome * use util function --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet (#8204) * Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet * add changeset * Refactoring --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Set the show_api flag on Lite (#8205) * Set the show_api flag on Lite * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (#8052) * Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (wip: only object-detection in this commit) * add changeset * Add image-classification and image-segmentation * Add zero-shot-image-classification and zero-shot-object-detection * Add document-question-answering * Add feature-extraction and fill-mask * Add question-answering and summarization * Fix an error message * Add text2text-generation, text-classification, and text-generation * Add translation andtranslation_xx_to_yy * Add zero-shot-classification * Add postprocess_takes_inputs to control the args passed to the postprocess function of each pipeline * Add topk option to image-classification * format_backend * Add audio-classification, automatic-speech-recognition, and zero-shot-audio-classification * Add image-to-text * Add token-classification (with JSON component as an output. Is it correct?) * Ignore import type failure of transformers_js_py * Add image-feature-extraction * Add image-to-image * Add text-to-audio * Add depth-estimation * Remove `render=False` * Reorder the if-blocks following the Transformers.js doc * Update gradio/pipelines_utils.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update gradio/pipelines_utils.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Fix feature-extraction demo * Fix demo title * Add guides/08_gradio-clients-and-lite/gradio-lite-and-transformers-js.md without contents * Rename guides/08_gradio-clients-and-lite/*.md to fix the order * Use pipeline.model.config._name_or_path for the demo title instead of pipeline.model.config.model_type * Fix normal Interface.from_pipeline to use pipeline.model.config.name_or_path as the demo title * Write an article about Gradio-Lite and Transformers.js * Update the doc * tweaks * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * merge * allow the canvas size to be set on the `ImageEditor` (#8127) * add canvas size kwarg to imageeditor * add changeset * fix tests * fix cropsize * changes * notebooks * update docstrings * fix type * fix undefined dimensions * Update image_editor.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * fix type * format --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Rename `eventSource_Factory` and `fetch_implementation` (#8209) * rename eventSource_factory -> stream_factory + rename event_source -> steam * rename fetch_implementation -> fetch * rename fetch to _fetch due to global.fetch conflict * add changeset * format * format * format * format * fix --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * remove redundant event source logic (#8211) * remove redundant event source logic * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Only connect to heartbeat if needed (#8169) * Add connect_heartbeat field * fix types * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * chore: update versions (#8172) * fixes * type fixes * type fixes * notebook fix * type ignore * data object model * remove component in tuple * more fixes * extend components * remove test var * extend to all components backend * remove loading data models * conflict fix * test and type fixes * playwright test * PR fixes * final changes * Add pltly for 2e2 test * pass loader to Gradio helper class * fix things * add changeset * checks * more fixy * more fixy * more fixy --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Simon Duerr <dev@simonduerr.eu> Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> Co-authored-by: Lê Ngọc Hoa <114990730+h2oa@users.noreply.github.com> Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: James Zhou <61927718+jameszhou02@users.noreply.github.com> Co-authored-by: Tiger3018 <tiger3018of02@gmail.com>
2024-06-14 22:43:35 +08:00
testMatch: /.*\.spec\.ts/,
testDir: "..",
workers: process.env.CI ? 1 : undefined,
retries: 3
});
const normal = defineConfig(base, {
globalSetup: process.env.CUSTOM_TEST ? undefined : "./playwright-setup.js"
});
fix-tests (#7345) * fix-tests * [tmp] Comment-out * Fix the URL constructor calls in `resolve_wasm_src()`, `should_proxy_wasm_src()`, and `<DownloadLink />` to handle relative URLs * Remove a circular dependency between lite/index.ts and lite/custom-element/index.ts to solve a bug that the dev app is mounted twice sometimes * Fix js/app/test/image_component_events.spec.ts * Set the `testIgnore` in `.config/playwright.config.js` * Fix the Lite dev mode only to create an app and expose the controller for Playwright, without editors etc. * add changeset * Set the mocked ruff version as 0.2.2 * Extend timeout * Fix to use the built lite files instead of the dev server * add changeset * comment out failed tests * Revert "comment out failed tests" This reverts commit 3580d7988714f49a21e221fe230b26ee86b66a68. * Fix the Gellery component to work in Wasm * Fix js/app/test/file_explorer_component_events.spec.ts to run on Wasm * Ignore queue_full_e2e_test.spec.ts * Revert "[tmp] Comment-out" This reverts commit c775c0cc298ac7e1f49545042e1dc7b6615d179d. * Revert "Extend timeout" This reverts commit 742d1e1e83fc99bd0ac6107a589b75905b7ed593. * Remove a commented out line * Refactor file_explorer_component_events.spec.ts * Revert "fix-tests", restoring the original test-functional.yml content This reverts commit 9ff2a7ddc5b00e1f41b4d7e9c4a64223934cf268. * Set CI step names * [tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content" This reverts commit de2dbe33173de39304294e6b46151ef1e07f6806. * Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content"" This reverts commit 32154f3bb18d83bad5bce14e254d635dfbe847af. * [tmp] Revert "Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content""" This reverts commit 204075e190eb755a99d2bb449fc339b1f1b5c29b. * Fix vite.config.js removing unnecessary code * Revert "Set the `testIgnore` in `.config/playwright.config.js`" This reverts commit 98dccc5be94ea9c77e69a58f50db577922fe2d67. * Add gallery_component_events.spec.ts * Revert js/app/test * tweak * tweak * revert workflow changes * add changeset --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-04 22:03:46 +08:00
normal.projects = undefined; // Explicitly unset this field due to https://github.com/microsoft/playwright/issues/28795
const lite = defineConfig(base, {
webServer: {
fix-tests (#7345) * fix-tests * [tmp] Comment-out * Fix the URL constructor calls in `resolve_wasm_src()`, `should_proxy_wasm_src()`, and `<DownloadLink />` to handle relative URLs * Remove a circular dependency between lite/index.ts and lite/custom-element/index.ts to solve a bug that the dev app is mounted twice sometimes * Fix js/app/test/image_component_events.spec.ts * Set the `testIgnore` in `.config/playwright.config.js` * Fix the Lite dev mode only to create an app and expose the controller for Playwright, without editors etc. * add changeset * Set the mocked ruff version as 0.2.2 * Extend timeout * Fix to use the built lite files instead of the dev server * add changeset * comment out failed tests * Revert "comment out failed tests" This reverts commit 3580d7988714f49a21e221fe230b26ee86b66a68. * Fix the Gellery component to work in Wasm * Fix js/app/test/file_explorer_component_events.spec.ts to run on Wasm * Ignore queue_full_e2e_test.spec.ts * Revert "[tmp] Comment-out" This reverts commit c775c0cc298ac7e1f49545042e1dc7b6615d179d. * Revert "Extend timeout" This reverts commit 742d1e1e83fc99bd0ac6107a589b75905b7ed593. * Remove a commented out line * Refactor file_explorer_component_events.spec.ts * Revert "fix-tests", restoring the original test-functional.yml content This reverts commit 9ff2a7ddc5b00e1f41b4d7e9c4a64223934cf268. * Set CI step names * [tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content" This reverts commit de2dbe33173de39304294e6b46151ef1e07f6806. * Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content"" This reverts commit 32154f3bb18d83bad5bce14e254d635dfbe847af. * [tmp] Revert "Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content""" This reverts commit 204075e190eb755a99d2bb449fc339b1f1b5c29b. * Fix vite.config.js removing unnecessary code * Revert "Set the `testIgnore` in `.config/playwright.config.js`" This reverts commit 98dccc5be94ea9c77e69a58f50db577922fe2d67. * Add gallery_component_events.spec.ts * Revert js/app/test * tweak * tweak * revert workflow changes * add changeset --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-04 22:03:46 +08:00
command: "python -m http.server 8000 --directory ../js/lite",
url: "http://localhost:8000/",
reuseExistingServer: !process.env.CI
},
testMatch: [
"**/file_component_events.spec.ts",
"**/kitchen_sink.spec.ts",
"**/gallery_component_events.spec.ts",
"**/image_remote_url.spec.ts" // To detect the bugs on Lite fixed in https://github.com/gradio-app/gradio/pull/8011 and https://github.com/gradio-app/gradio/pull/8026
],
workers: 1,
Gradio components in `gr.Chatbot()` (#8131) * chatbot components * demoi * add changeset * preprocess fix * add changeset * Make guide for tailwind more verbose (#8152) * Lite wheel optimization (#7855) * Add `pull_request.branches.main` as a trigger of the `publish` workflow * [WIP] Comment out the publish steps * Package and upload the NPM package for debug * Skip the copy_frontend.py hook in the Lite build * add changeset * [WIP] Show gradio files * [WIP] Show gradio files * Comment out installing the gradio and gradio_client libraries * Restore installing gradio_client because it's used by `python js/_website/generate_jsons/generate.py` that follows * Restore installing gradio because it's used by `python js/_website/generate_jsons/generate.py` that follows * Add code * Revert "[WIP] Show gradio files" This reverts commit e15fef29bd14671576e64d94d3b844786ebe7e83. * Build the gradio wheel with the custom lite target * add changeset * Revert "[WIP] Show gradio files" This reverts commit aef053f9caad203c7e1bbfa15e9f9e536f77442a. * Revert "Skip the copy_frontend.py hook in the Lite build" This reverts commit ca296d0e4e169adbb6af3705561869aa8c9037b7. * Update .github/actions/install-frontend-deps/action.yml for hatch installation * [WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch * Revert "[WIP] Fix test-functional.yml and .github/actions/install-all-deps/action.yml to call the setup actions in this branch" This reverts commit 571823b4a05f7e41e0b3731d51c5bd86b2e17ddc. * Comment-in lines in publish.yml * Move Lite build from publish.yml to deploy-spaces.yml * Use the build_lite option of install-all-deps instead of running the build command * [TMP] Change the branch of action files * Fix the hatch Lite build setting * Return pnpm pack to deploy-space * Revert "[TMP] Change the branch of action files" This reverts commit fe4e1c8f210eb21ac7ee1bd4b219d35e1ae84c85. * Remove dependencies for lite build * [TMP] Change the branch of action files * Revert "Remove dependencies for lite build" This reverts commit 856a858c1f49d736bfeb056ba0ec7e9bc35af29c. * Install packaging>=23.2 * [TMP] Show packaging version * Fix pip install * Fix * Uninstall packaging once * Use `pip install -U` instead of uninstalling the exiting version * Revert "[TMP] Show packaging version" This reverts commit 910b6bbde3dc8777c051bd5576813913d57959f7. * Add `-U` flag * Set packaging version as >=23.2 * Revert the changes on pip install * Set packaging version as >=23.2 in requirements.txt * Revert "Set packaging version as >=23.2" This reverts commit 8aa77c8930815e69d7256886cad88b6da8361069. * Fix hook name * Revert "Set packaging version as >=23.2 in requirements.txt" This reverts commit fbd605cbfb5d06706eacc0648a2e9d7816c9de1f. * Revert "Revert the changes on pip install" This reverts commit 81ff38a660635fce9cb17862a2072e4d169c3466. * Add comments * Revert "[TMP] Change the branch of action files" This reverts commit 0d6aa48d75a842db9b3987212deffedb0c0ca51d. * Revert the trigger of .github/workflows/deploy-spaces.yml * Remove unused `node_auth_token` and `npm_token` inputs from the `install-all-deps` action * [TMP] Trigger CI based on this PR * Remove packging installation * Revert "Remove packging installation" This reverts commit 4a4f18de3a78220150bc614f574a5a808454cd12. * Revert "[TMP] Trigger CI based on this PR" This reverts commit 6cea830c8e9f853c612c7286cba68027b5262b3b. --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> * Add ETag to `/custom_component` route to control browser caching (#8170) * Add code * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Implement JS Client tests (#8109) * add msw setup and initialisation tests * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Remove hatch installation in js/app/package.json which is no longer needed (#8174) * Remove hatch installation in js/app/package.json which is no longer needed * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Update test-functional.yml - Fix vulnerability code injection (#8145) * Update test-functional.yml * Update test-functional.yml * tweaks --------- Co-authored-by: pngwn <hello@pngwn.io> * rework upload to be a class method + pass client into each component (#8179) * rework upload to be a class method + pass client into each component * add changeset * Update client/js/src/utils/upload_files.ts * fix storybook * review comments * Apply suggestions from code review Co-authored-by: Hannah <hannahblair@users.noreply.github.com> * format * ts fix --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> * chore(deps): update pnpm to v9 (#8123) * chore(deps): update pnpm to v9 * update workflow --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: pngwn <hello@pngwn.io> * Use workspace version for code in _website (#8189) * workspace * add changeset * remove circular import from preview * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Pass Error status in /dev/reload stream (#8106) * get error message * Support multiple clients * add changeset * add changeset * add changeset * Display in UI * console.error the python traceback * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Convert sse calls in client from async to sync (#8182) * convert sse calls in client from async to sync * add changeset * more sync * lint * more sync * fix threadpool * fix timeouts * reuse executor * lint --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * run python reload only if python file changed (#8194) * run python reload only if python file changed * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com> * fix: handling SIGINT correctly in reload.py, single entrance of block_thread in blocks.py (#8158) * fix: handling SIGINT, single block_thread and fix popen * Use pass --------- Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> * Add eventsource polyfill for Node.js and browser environments (#8118) * add msw setup and initialisation tests * add changeset * add eventsource polyfill for node and browser envs * add changeset * add changeset * config tweak * types * update eventsource usage * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks * dynamically import eventsource * revet eventsource imports * add node test * lockfile * add client test in root pkg file * lcokfile * remove eventsource from js/app * add changeset * remove ts ignore * move eventsource polyfill to eventsource factory * add changeset * tweak --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Ensure connectivity to private HF spaces with SSE protocol (#8181) * add msw setup and initialisation tests * add changeset * add eventsource polyfill for node and browser envs * add changeset * add changeset * config tweak * types * update eventsource usage * add changeset * add walk_and_store_blobs improvements and add tests * add changeset * api_info tests * add direct space URL link tests * fix tests * add view_api tests * add post_message test * tweak * add spaces tests * jwt and protocol tests * add post_data tests * test tweaks * dynamically import eventsource * revet eventsource imports * add jwt param to sse requests * add stream test * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Support custom components in gr.load (#8200) * Add code * add changeset * Update fuzzy-mirrors-scream.md * Update fuzzy-mirrors-scream.md * Fix tests * Update .changeset/fuzzy-mirrors-scream.md Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Fix code --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Refactor analytics to not use api.gradio.app (#8180) * Analytics refactor * add changeset * add changeset * Fix wasm? * Fix python tests' * Revert changes chrome * use util function --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet (#8204) * Specify the fastapi version on Lite to avoid ujson installation which is not available on Pyodide yet * add changeset * Refactoring --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Set the show_api flag on Lite (#8205) * Set the show_api flag on Lite * add changeset * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (#8052) * Extend Interface.from_pipeline() to support Transformers.js.py pipelines on Lite (wip: only object-detection in this commit) * add changeset * Add image-classification and image-segmentation * Add zero-shot-image-classification and zero-shot-object-detection * Add document-question-answering * Add feature-extraction and fill-mask * Add question-answering and summarization * Fix an error message * Add text2text-generation, text-classification, and text-generation * Add translation andtranslation_xx_to_yy * Add zero-shot-classification * Add postprocess_takes_inputs to control the args passed to the postprocess function of each pipeline * Add topk option to image-classification * format_backend * Add audio-classification, automatic-speech-recognition, and zero-shot-audio-classification * Add image-to-text * Add token-classification (with JSON component as an output. Is it correct?) * Ignore import type failure of transformers_js_py * Add image-feature-extraction * Add image-to-image * Add text-to-audio * Add depth-estimation * Remove `render=False` * Reorder the if-blocks following the Transformers.js doc * Update gradio/pipelines_utils.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update gradio/pipelines_utils.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Fix feature-extraction demo * Fix demo title * Add guides/08_gradio-clients-and-lite/gradio-lite-and-transformers-js.md without contents * Rename guides/08_gradio-clients-and-lite/*.md to fix the order * Use pipeline.model.config._name_or_path for the demo title instead of pipeline.model.config.model_type * Fix normal Interface.from_pipeline to use pipeline.model.config.name_or_path as the demo title * Write an article about Gradio-Lite and Transformers.js * Update the doc * tweaks * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * merge * allow the canvas size to be set on the `ImageEditor` (#8127) * add canvas size kwarg to imageeditor * add changeset * fix tests * fix cropsize * changes * notebooks * update docstrings * fix type * fix undefined dimensions * Update image_editor.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * fix type * format --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Rename `eventSource_Factory` and `fetch_implementation` (#8209) * rename eventSource_factory -> stream_factory + rename event_source -> steam * rename fetch_implementation -> fetch * rename fetch to _fetch due to global.fetch conflict * add changeset * format * format * format * format * fix --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * remove redundant event source logic (#8211) * remove redundant event source logic * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * Only connect to heartbeat if needed (#8169) * Add connect_heartbeat field * fix types * add changeset --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> * chore: update versions (#8172) * fixes * type fixes * type fixes * notebook fix * type ignore * data object model * remove component in tuple * more fixes * extend components * remove test var * extend to all components backend * remove loading data models * conflict fix * test and type fixes * playwright test * PR fixes * final changes * Add pltly for 2e2 test * pass loader to Gradio helper class * fix things * add changeset * checks * more fixy * more fixy * more fixy --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Simon Duerr <dev@simonduerr.eu> Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: freddyaboulton <alfonsoboulton@gmail.com> Co-authored-by: Hannah <hannahblair@users.noreply.github.com> Co-authored-by: Lê Ngọc Hoa <114990730+h2oa@users.noreply.github.com> Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: James Zhou <61927718+jameszhou02@users.noreply.github.com> Co-authored-by: Tiger3018 <tiger3018of02@gmail.com>
2024-06-14 22:43:35 +08:00
retries: 3,
timeout: 60000
});
fix-tests (#7345) * fix-tests * [tmp] Comment-out * Fix the URL constructor calls in `resolve_wasm_src()`, `should_proxy_wasm_src()`, and `<DownloadLink />` to handle relative URLs * Remove a circular dependency between lite/index.ts and lite/custom-element/index.ts to solve a bug that the dev app is mounted twice sometimes * Fix js/app/test/image_component_events.spec.ts * Set the `testIgnore` in `.config/playwright.config.js` * Fix the Lite dev mode only to create an app and expose the controller for Playwright, without editors etc. * add changeset * Set the mocked ruff version as 0.2.2 * Extend timeout * Fix to use the built lite files instead of the dev server * add changeset * comment out failed tests * Revert "comment out failed tests" This reverts commit 3580d7988714f49a21e221fe230b26ee86b66a68. * Fix the Gellery component to work in Wasm * Fix js/app/test/file_explorer_component_events.spec.ts to run on Wasm * Ignore queue_full_e2e_test.spec.ts * Revert "[tmp] Comment-out" This reverts commit c775c0cc298ac7e1f49545042e1dc7b6615d179d. * Revert "Extend timeout" This reverts commit 742d1e1e83fc99bd0ac6107a589b75905b7ed593. * Remove a commented out line * Refactor file_explorer_component_events.spec.ts * Revert "fix-tests", restoring the original test-functional.yml content This reverts commit 9ff2a7ddc5b00e1f41b4d7e9c4a64223934cf268. * Set CI step names * [tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content" This reverts commit de2dbe33173de39304294e6b46151ef1e07f6806. * Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content"" This reverts commit 32154f3bb18d83bad5bce14e254d635dfbe847af. * [tmp] Revert "Revert "[tmp] Revert "Revert "fix-tests", restoring the original test-functional.yml content""" This reverts commit 204075e190eb755a99d2bb449fc339b1f1b5c29b. * Fix vite.config.js removing unnecessary code * Revert "Set the `testIgnore` in `.config/playwright.config.js`" This reverts commit 98dccc5be94ea9c77e69a58f50db577922fe2d67. * Add gallery_component_events.spec.ts * Revert js/app/test * tweak * tweak * revert workflow changes * add changeset --------- Co-authored-by: Yuichiro Tachibana (Tsuchiya) <t.yic.yt@gmail.com> Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
2024-03-04 22:03:46 +08:00
lite.projects = undefined; // Explicitly unset this field due to https://github.com/microsoft/playwright/issues/28795
export default !!process.env.GRADIO_E2E_TEST_LITE ? lite : normal;