Uh oh!
There was an error while loading. Please reload this page.
Script to run all checks locally - #8798
Conversation
AlexWaygood
left a comment
There was a problem hiding this comment.
Thanks! This looks like a great start.
I have a few questions, a few suggestions, and a few nits ;)
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…sam/typeshed into run-all-checks-single-script
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
…sam/typeshed into run-all-checks-single-script
…sam/typeshed into run-all-checks-single-script
Here's the output currently if I try running `python scripts/runtests.py redis`.(.venv) C:\Users\alexw\coding\typeshed>python scripts/runtests.py stubs/redisLooks good! ✨ 🍰 ✨50 files left unchanged.All done! ✨ 🍰 ✨50 files left unchanged.error finding npx; is Node.js installed?*** Testing Python 3.11 on win32Testing third-party packages...Running mypy --python-version 3.11 --show-traceback --warn-incomplete-stub --show-error-codes --no-error-summary --platform win32 --no-site-packages --custom-typeshed-dir C:\Users\alexw\coding\typeshed --no-implicit-optional --disallow-untyped-decorators --disallow-any-generics --strict-equality --enable-error-code ignore-without-code --config-file /tmp/...testing redis (50 files)... success*** Testing Python 3.10 on win32Testing third-party packages...Running mypy --python-version 3.10 --show-traceback --warn-incomplete-stub --show-error-codes --no-error-summary --platform win32 --no-site-packages --custom-typeshed-dir C:\Users\alexw\coding\typeshed --no-implicit-optional --disallow-untyped-decorators --disallow-any-generics --strict-equality --enable-error-code ignore-without-code --config-file /tmp/...testing redis (50 files)... success*** Testing Python 3.9 on win32Testing third-party packages...Running mypy --python-version 3.9 --show-traceback --warn-incomplete-stub --show-error-codes --no-error-summary --platform win32 --no-site-packages --custom-typeshed-dir C:\Users\alexw\coding\typeshed --no-implicit-optional --disallow-untyped-decorators --disallow-any-generics --strict-equality --enable-error-code ignore-without-code --config-file /tmp/...testing redis (50 files)... success*** Testing Python 3.8 on win32Testing third-party packages...Running mypy --python-version 3.8 --show-traceback --warn-incomplete-stub --show-error-codes --no-error-summary --platform win32 --no-site-packages --custom-typeshed-dir C:\Users\alexw\coding\typeshed --no-implicit-optional --disallow-untyped-decorators --disallow-any-generics --strict-equality --enable-error-code ignore-without-code --config-file /tmp/...testing redis (50 files)... success*** Testing Python 3.7 on win32Testing third-party packages...Running mypy --python-version 3.7 --show-traceback --warn-incomplete-stub --show-error-codes --no-error-summary --platform win32 --no-site-packages --custom-typeshed-dir C:\Users\alexw\coding\typeshed --no-implicit-optional --disallow-untyped-decorators --disallow-any-generics --strict-equality --enable-error-code ignore-without-code --config-file /tmp/...testing redis (50 files)... success--- success, 250 files checked ---redis... successSkipping pytype on Windows. You can run the test with WSL.usage: regr_test.py [-h] [--all] [--platform [{linux,darwin,win32} ...]] [-p [{3.11,3.10,3.9,3.8,3.7} ...]] [packages_to_test ...]regr_test.py: error: argument packages_to_test: No test cases found for 'redis'!One or more tests failed. See above for details.flake8: SuccessCheck consistent: SuccessCheck new syntax: Successpyright: Failedmypy: Successstubtest: Successpytype: SkippedRegression test: SuccessSome notes:
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…all-checks-single-script
Uh oh!
There was an error while loading. Please reload this page.
(Nit): we currently get a bit of an ugly traceback if the script is interrupted halfway through: (.venv) C:\Users\alexw\coding\typeshed>python scripts/runtests.py stubs/redisRunning pycln...Looks good! ✨ 🍰 ✨50 files left unchanged.Traceback (most recent call last): File "C:\Users\alexw\coding\typeshed\scripts\runtests.py", line 55, in <module> subprocess.run([sys.executable, "-m", "pycln", path, "--all"]) File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 503, in run stdout, stderr = process.communicate(input, timeout=timeout) File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1144, in communicate self.wait() File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1207, in wait return self._wait(timeout=timeout) File "C:\Users\alexw\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1488, in _wait result = _winapi.WaitForSingleObject(self._handle,KeyboardInterrupt^CIt might be nice to wrap the whole Lines 179 to 185 in 380022c |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
…all-checks-single-script
Avasam
commented
Oct 1, 2022
A traceback can still appear, but it's clearer why. Unless maybe we start piping the output of all tests, checking for a KeyboardInterrupt and then printing the output. I don't think that's really worth it. |
AlexWaygood
commented
Oct 2, 2022
Agreed, it looks good now! |
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood
left a comment
There was a problem hiding this comment.
Some very minor suggestions about some of the terminal output
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
AlexWaygood
left a comment
There was a problem hiding this comment.
Awesome, thank you! Just one last comment, but other than that -- I've run out of things to say!
I'll leave this open for a day or two in case any other maintainers want to take a look, but this looks great to me :)
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>

Closes#8686
There's still an issue that needs to be fixed with the mypy test (see #8797), and I would like to be able to seamlessly run the pytype test on windows, if that's even feasible.
Summary output:

Please let me know how to better word the "next steps" in
create_baseline_stubs.Notes of things to do in follow-up PR(s):