Repository navigation
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3446 +/- ##
==========================================
+ Coverage 81.62% 84.89% +3.27%
==========================================
Files 162 162
Lines 20518 20612 +94
Branches 4366 4390 +24
==========================================
+ Hits 16748 17499 +751
+ Misses 2876 2171 -705
- Partials 894 942 +48
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
matentzn
reviewed
Apr 29, 2026
jdsika
marked this pull request as draft
April 29, 2026 14:50
Contributor
Author
Status: Draft — awaiting upstream dependencyThis PR is moved back to draft pending the merge of an upstream fix:
Once that lands and a new prefixmaps release is cut, we can evaluate whether to:
Additionally:
The implementation and tests in this PR are complete and passing — no code changes needed beyond the upstream resolution. |
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
May 7, 2026 13:55
ef47b47 to
3a71506
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
2 times, most recently
from
May 7, 2026 17:12
076b00d to
1116533
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
9 times, most recently
from
May 11, 2026 16:15
260a97e to
e56ca65
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
June 9, 2026 15:21
e56ca65 to
5f17e19
Compare
rmessaou
force-pushed
the
fix/normalize-well-known-prefixes
branch
2 times, most recently
from
July 8, 2026 08:49
ce55ccb to
909eb7d
Compare
Contributor
Author
|
@kevinschaper do you think we are ready to release Is there anything still needed for the prefixmaps repo? |
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
September 11, 2026 12:33
a4b329c to
32821d0
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
October 2, 2026 11:48
32821d0 to
0342283
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
October 14, 2026 07:34
0342283 to
316b430
Compare
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
October 23, 2026 08:49
ff48839 to
9ede52d
Compare
… names Add an opt-in --normalize-prefixes flag to the OWL, SHACL, JSON-LD context and JSON-LD generators that renames non-standard prefix aliases to their well-known names. The names come from the prefixmaps linked_data context (curated) layered over its merged context, and where rdflib binds a namespace by default, from rdflib, which serializes the output (geo, schema, wgs where prefixmaps says geosparql, sc, WGS84). - Both http://schema.org/ and https://schema.org/ map to 'schema'. - OWL and SHACL share normalize_graph_prefixes(): phase 1 renames schema-declared prefixes, phase 2 cleans up runtime-injected bindings without overwriting HTTPS bindings with HTTP variants. - A standard name already declared for another namespace is skipped with a warning. The flag defaults to off, preserving existing behaviour, and only the generators that honour it offer it: gen-rdf writes the schema's class_uri and prefix declarations as literal data and gen-shex's RDF uses rdflib's names already, so neither emits an alias to rename. The documentation for the flag is in docs/generators/owl.rst. test_csv_limit set csv.field_size_limit(20) without restoring it, so any later test on the same worker that read prefixmaps' CSV data failed; it now restores the limit. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
jdsika
force-pushed
the
fix/normalize-well-known-prefixes
branch
from
October 23, 2026 11:48
9ede52d to
29098c8
Compare
3 tasks done
This branch has not been deployed
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.
Warning
Blocked: depends on an unreleased
prefixmaps, and this breaks the Docker build.packages/linkml/pyproject.tomlcurrently carries a git pin:plus
[tool.hatch.metadata] allow-direct-references = trueto permit it.The fix it depends on (linkml/prefixmaps#82 — the
gxprefix mapping to adead Graphite/Synaptica namespace instead of Gaia-X) is merged in the
prefixmaps
mainbranch but has not been released: the latest version onPyPI is still
0.2.6(2024-10-17).This is not just a policy problem. The git pin is baked into the built wheel's
metadata, so the Docker image build fails:
pip installhas to fetch thedependency from GitHub, and the base image has no
git.That is the one failing check on this PR; every other job is green.
Do not merge until
prefixmapscuts a release. Then the pin becomesprefixmaps >= 0.2.8,allow-direct-referencesis removed, anduv.lockisregenerated — both spots are marked
TODO(prefixmaps-0.2.8). The Dockerfailure resolves itself at that point, since the dependency comes from PyPI.
Summary
Adds an opt-in
--normalize-prefixesflag togen-owl,gen-shacl,gen-jsonld-contextandgen-jsonld, which forwards it to its inline context. The flag renames non-standard prefix aliases for well-known namespaces to their conventional names, for examplesdo:→schema:anddce:→dc:. Namespace IRIs never change; only prefix labels do.Where the names come from
well_known_prefix_map()derives the names from prefixmaps: its curatedlinked_datacontext takes precedence over its broadermergedcontext. Where rdflib binds a namespace by default, its name wins, because rdflib serializes the output:geo,schemaandwgswhere prefixmaps saysgeosparql,scandWGS84. There is no hand-written table. Bothhttp://schema.org/(from prefixmaps) andhttps://schema.org/(from rdflib) map toschema. The pin explained above is needed for thegxcorrection in prefixmaps#82.Behaviour
normalize_graph_prefixes(). It renames schema-declared aliases first, then runtime-injected bindings, and never overwrites an HTTPS binding with its HTTP variant.gen-rdfwrites the schema'sclass_uriand prefix declarations as literal data, andgen-shex's RDF already uses rdflib's names, so neither emits an alias to rename.How was this tested?
test_normalize_prefixes.py(27 tests) and three tests intest_jsonldcontextgen.pycover each generator, the HTTP/HTTPS variants, collisions, and agreement between the generators. The full compiler suite passes after rebasing ontomain(12,421 passed).test_csv_limitnow restorescsv.field_size_limit. It left the limit at 20, soprefixmaps' CSV loading failed in any later test on the same pytest-xdist worker. That produced intermittent failures, reproducible by runningtest_csv_limit[20-1]before these tests.Checklist