Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
/ok to test |
|
|
/ok to test |
2 similar comments
|
/ok to test |
|
/ok to test |
5ec3c5e to
9a403dc
Compare
|
/ok to test |
11 similar comments
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
|
/ok to test |
f03471d to
5683f54
Compare
|
/ok to test |
|
/ok to test |
| # The canonical regex as defined in PEP 723 | ||
| pep723 = re.search(r"(?m)^# /// (?P<type>[a-zA-Z0-9-]+)$\s(?P<content>(^#(| .*)$\s)+)^# ///$", content) | ||
| if not pep723: | ||
| return |
There was a problem hiding this comment.
Could/should we enforce here that the PEP 723 information is available?
| try: | ||
| importlib.metadata.distribution(name.string) | ||
| except importlib.metadata.PackageNotFoundError: | ||
| pytest.skip(f"Skipping {example} due to missing package requirement: {name}") |
There was a problem hiding this comment.
To avoid multiple roundtrips adding missing packages: Maybe collect all names here and move the pytest.skip after the loop, showing all names together?
| process = subprocess.run([sys.executable, example_path], capture_output=True) # noqa: S603 | ||
| if process.returncode != 0: | ||
| if process.stdout: | ||
| print(process.stdout.decode()) |
There was a problem hiding this comment.
.decode(error="replace") to minimize distraction from the primary error
also below
rwgk
left a comment
There was a problem hiding this comment.
I triggered a rerun, it looks like there was some general issue starting containers or similar. Let's see if it's cleared up.
Prior to this PR,
cuda.coreexamples were being parsed and imported, but not actually run, as part of CI. This updates now actually runs the ones that we can in CI. (Fixes #1798).This also adds PEP 723 metadata to the examples so they can be run directly with
uv runorpipx run. This metadata is also used to determine if a particular example can run as part of CI.