-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Fix local tests #3411
Fix local tests #3411
Conversation
All the demos for this PR have been deployed at https://huggingface.co/spaces/gradio-pr-deploys/pr-3411-all-demos |
"data": media_data.BASE64_AUDIO["data"], | ||
"is_file": False, | ||
"orig_name": "audio_sample.wav", | ||
"name": "test/test_files/audio_sample.wav", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was failing on Windows because the paths get converted to using forward slashes instead of back slashes
self, base64_encoding: str, prefix: str, extension: str | ||
) -> str: | ||
guess_extension = get_extension(base64_encoding) | ||
if not extension and guess_extension: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Model3D test was failing because the extension was not being correctly guessed from the base64. This fixes that. I have no idea why the test was passing on CI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Thanks for reviewing @aliabid94! |
* document embed params * fix tests * cleanup * cleanup * cleanup * revert * changelog
* hub telemetry * more analytics * format * changelog * Gradio Status Page (#3331) * add status page to error message * changelog * link to status page on website * move link to the right * merge * merge * Add option to display gallery in preview mode (#3345) * Add code + api * CHANGELOG * dropdown (#3338) * fix * fixes * format * changelog * Update gradio/components.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * fix clear case --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Some improvements to Flag (#3289) * Fixes to button disable * button * formatting * flagging fix * fixes * formatter * changelog * ormatting * tests * saving * adding optionality for flagging * updatest * error catching * updates * changelog * tests * typing * flag button * formatting * tests * tests * tests * increased latency * queue fix * clear * formatting * fix * fix tests * Fix flaky external test (#3348) * Fix flaky external test * CHANGELOG * Undo accidental diff * Fix flaky external test * CHANGELOG * Undo accidental diff * Remove from changelog * Use bunny file --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * updates * format * more updates * threading * fixes * Fix error when using backen_fn and custom js at the same time (#3358) * Fix error when using backen_fn and custom js at the same time * generate notebooks * update changelog * changes --------- Co-authored-by: Ali Abid <aabid94@gmail.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com> * Fix File updating (#3375) * Fix * Remove line * Add unit test * CHANGELOG * Remove comment * Updated chat ui (#3370) * test * changes * chagnes * changes * changes * changes * changes * Update CHANGELOG.md * changes * Update demo/chatbot_multimodal/run.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * Update demo/chatbot_simple_demo/run.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * changes * changes * changes --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * fixes * New Version Docs (#3376) * [create-pull-request] automated change * empty commit * [create-pull-request] automated change * empty commit --------- Co-authored-by: abidlabs <abidlabs@users.noreply.github.com> Co-authored-by: aliabd <ali.si3luwa@gmail.com> * requirements * test requirements * Release 3.20.1 (#3390) * release 3.20.1 * changelog * merge * New Version Docs (#3392) * [create-pull-request] automated change * trigger ci --------- Co-authored-by: abidlabs <abidlabs@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * merge * Remove everything related to encryption (#3396) * remove requirements * deprecate encrypt * remove flagging * deprecate * formatting * lint * Adds a Chinese translation for the `README` (#3394) * add chinese readme * add chinese readme * update changelog * fix render_readme and english readme * generate readme * remove template and quickstart files * link to chinese from english * fix assets paths * link to english from chinese * change file location * fix link * fix link * fix link --------- Co-authored-by: aliabd <ali.si3luwa@gmail.com> * fix bad codeblock (#3401) * Always set queue=False if every is None for load events (#3391) * Always set queue=False if every is None * CHANGELOG + linting * Move to latest release section * changelog --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * JS client take 2 (#3388) * start * change api * integrate into gradio * log * try this * format * changes * format * fix css * fix file * fix #3282 avoid in-place dict updates (#3405) * fix #3282 avoid in-place dict updates * add tests and changelog for PR3405 * Fix markdown embedded component in docs (#3410) * revert to old md component demo * changelog * Added a section on security (#3408) * security * added section on security * security * changes from review * Fix local tests (#3411) * document embed params * fix tests * cleanup * cleanup * cleanup * revert * changelog * Document web component parameters (#3407) * document embed params * changelog * iframe * fixed review changes * requirements * fixes * format * format * requirements --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com> Co-authored-by: Freddy Boulton <alfonsoboulton@gmail.com> Co-authored-by: pngwn <hello@pngwn.io> Co-authored-by: Jialei <3217223+jialeicui@users.noreply.github.com> Co-authored-by: Ali Abid <aabid94@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: abidlabs <abidlabs@users.noreply.github.com> Co-authored-by: Uanu <92366232+uanu2002@users.noreply.github.com> Co-authored-by: gitgithan <hanqi11991@hotmail.com>
Some tests were failing locally, leading to confusion among contributors. This fixes those tests and closes: #3409
To reproduce, just run
pytest
from the gradio directory on a Mac or Windows and all tests should pass.