Fix the red test matrix on master - #109
Merged
Merged
Conversation
Windows / cross-version portability: - the schema loader handed raw filesystem paths to the ShExC parser as the document base; Windows paths (drive letter, backslashes) fail ShExJ IRIREF validation -- convert to file:/// URIs (POSIX untouched) - golden .results files read/written with the platform default encoding garble U+2260 on Windows (cp1252); pin encoding='utf-8' - "2016-07"^^xsd:date renders differently across Python versions (isodate on py<3.11 normalizes reduced-precision dates; fromisoformat on 3.11+ rejects them, preserving the lexical form) -- use a fully-specified date Also, to get the matrix running at all (red since the pytest migration): - workflow: checkout the shexTest submodule (https URL in .gitmodules), push trigger main -> master, SKIP_EXTERNAL_URLS (coerced to bool -- a string in pytest.mark.skipif is eval'ed as Python), guard the unmarked external-URL tests, never collect from tests/data - rdflib 7: serialize() returns str (drop .decode()), parse into bind_namespaces="core" graphs in PrefixLibrary.add_rdf, replace removed Graph.load(), regenerate goldens (dc1 renaming, bnode labels) - latent bugs: missing @ on shape refs in test_schemaorg DS_SHEX, CFGraph.open() loads nothing (validated an empty graph; parse() instead), manifest_tester failed the suite on unloadable-schema skips Full suite with SKIP_EXTERNAL_URLS: 129 passed, 21 skipped, 1 xfailed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
uv 0.7.13 predates Python 3.14.0, so every '3.14' job ran 3.14.0b2, and it fetched Python builds from an old release URL that failed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chardet 7 can report {'encoding': None} with high confidence (e.g. for
shexTest's 1val1STRING_LITERAL1_with_all_controls.shex), and pyshexc's
load_shex_file then crashes in bytes.decode(None). The fix exists only
in an unreleased pyshexc fork, so SchemaLoader and PrefixLibrary now use
an equivalent reader in pyshex.utils.schema_loader that falls back to
UTF-8.
tests/data/earl_report.ttl is regenerated by the shexTest run; commit
the rdflib 7 output so test_prefixlib.test_add_rdf_file no longer
depends on test ordering.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
URIRedirector copied the Windows checkout path (backslashes) into focus IRIs, while generate_base() uses forward slashes for the data graph's @base. Entries with relative focus nodes (e.g. 2Eachdot's 's0') then validated a node absent from the data: 25 should-pass cases failed on Windows only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
On Windows the redirected data/focus IRIs were bare paths like 'D:/a/.../validation/s0'. pyshex reads 'D:' as a URI scheme and rewrote the focus to 'file://D:/...', so every should-pass entry with a relative focus validated a node absent from the data (26 entries, Windows only). Path.as_uri() gives 'file:///D:/...' on Windows and 'file:///...' on POSIX; both resolve relative IRIs and open with urlopen. Reverts the previous URIRedirector slash normalization, which fixed the focus/subject string mismatch but not this. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- invalid escape sequences (SyntaxWarning, an error in future Python) in test_patterns_in_json.py and test_evaluate.py; values unchanged - earlreport: datetime.utcnow() is deprecated; same naive-UTC output - manifest: ConjunctiveGraph is deprecated; the manifest is one graph - codecov-action v6 has no 'file' input (warned on every job, and the path was ignored); use 'files' Remaining warnings come from dependencies (pyjsg, rdflib) or from shexTest's intentionally invalid boolean literals. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Every
testjob on master has been failing since at least August. Recent Dependabot PRs show this, and so does #108. This PR makes the matrix pass so that #105 and #108 can be judged on their own changes.Commits
Cherry-picked 816c2fa from EXTENDS validation with feasibility-pruned partition search #105 ("Windows compatibility (plus CI plumbing and rdflib 7 alignment)"). It checks out the shexTest submodule over https, skips external-URL tests in CI, and aligns the tests with rdflib 7. It also fixes Windows paths and file encodings. One conflict in
schema_loader.pyneeded adapting: master has no import resolution, so only the Windows base-URI conversion was ported, applied tobase_location.Pin a current uv (0.12.18). uv 0.7.13 predates Python 3.14.0, so the "3.14" jobs actually ran 3.14.0b2. It also downloaded Python builds from an old release URL that returned server errors.
Read schema files safely with chardet 7. chardet 7 can return
{'encoding': None}with high confidence. pyshexc'sload_shex_filethen crashes inbytes.decode(None), as it does on shexTest's1val1STRING_LITERAL1_with_all_controls.shex. The fix exists only in an unreleased pyshexc fork, so pyshex now has an equivalent reader that falls back to UTF-8. This commit also adds the regeneratedtests/data/earl_report.ttl, so the prefix test no longer depends on test order.Windows shexTest harness fix. The harness redirected data and focus IRIs to bare Windows paths like
D:/a/.../validation/s0. PyShEx readsD:as a URI scheme and rewrote the focus tofile://D:/..., so every should-pass entry with a relative focus validated a node missing from the data. That affected 26 entries on Windows only. They are now redirected to real file URIs fromPath.as_uri(). When an entry fails, the harness now also prints the focus node and whether it appears among the data subjects.Warnings. Fixed the Codecov step's
fileinput (v6 expectsfiles), invalid escape sequences in two tests, and the deprecateddatetime.utcnow()andConjunctiveGraphcalls. The remaining warnings come from dependencies (pyjsg, rdflib) or from shexTest's intentionally invalid boolean literals.CI: all 10 test jobs pass (Ubuntu and Windows, Python 3.10 to 3.14), each with 122 passed, 21 skipped, 1 xfailed.
Effect on other PRs
schema_loader.pyandearl_report.ttl; take EXTENDS validation with feasibility-pruned partition search #105's version in both.🤖 Generated with Claude Code