Skip to content

Fix the red test matrix on master - #109

Merged
ericprud merged 7 commits into
masterfrom
fix-ci-baseline
Sep 24, 2026
Merged

ericprud merged 7 commits into
masterfrom
fix-ci-baseline

Conversation

@ericprud

@ericprud ericprud commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Every test job 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

  1. 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.py needed adapting: master has no import resolution, so only the Windows base-URI conversion was ported, applied to base_location.

  2. 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.

  3. Read schema files safely with chardet 7. chardet 7 can return {'encoding': None} with high confidence. pyshexc's load_shex_file then crashes in bytes.decode(None), as it does on shexTest's 1val1STRING_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 regenerated tests/data/earl_report.ttl, so the prefix test no longer depends on test order.

  4. Windows shexTest harness fix. The harness redirected data and focus IRIs to bare Windows 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 missing from the data. That affected 26 entries on Windows only. They are now redirected to real file URIs from Path.as_uri(). When an entry fails, the harness now also prints the focus node and whether it appears among the data subjects.

  5. Warnings. Fixed the Codecov step's file input (v6 expects files), invalid escape sequences in two tests, and the deprecated datetime.utcnow() and ConjunctiveGraph calls. 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

🤖 Generated with Claude Code

Eric Prud'hommeaux and others added 7 commits September 23, 2026 22:39
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>
@ericprud
ericprud merged commit 11d770d into master Sep 24, 2026
11 checks passed
@ericprud
ericprud deleted the fix-ci-baseline branch September 24, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant