From 53c65eb7fc4fba822910a604fde063f339fb0024 Mon Sep 17 00:00:00 2001 From: Paul Millar Date: Fri, 17 Jul 2026 16:50:52 +0200 Subject: [PATCH 1/3] Add test configuration for checking w3id.org and purl.org Motivation: It is important that switchboard services, like purl.org and w3id.org are configured correctly. We would benefit from having a way to test the redirections are working. Modification: Add two configurations the `test-redirection` script. This script is available from the [w3id-tester](https://github.com/pan-ontologies/w3id-tester) repo. Note: the w3id.org checks currently fail because we haven't established the correct rules, yet. Result: We now have a way to ensure correct behaviour of our redirection services. --- pid-tests/README.md | 18 ++++++++++++++ pid-tests/check-purl.json | 44 +++++++++++++++++++++++++++++++++ pid-tests/check-w3id.json | 52 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 114 insertions(+) create mode 100644 pid-tests/README.md create mode 100644 pid-tests/check-purl.json create mode 100644 pid-tests/check-w3id.json diff --git a/pid-tests/README.md b/pid-tests/README.md new file mode 100644 index 0000000..0a64c99 --- /dev/null +++ b/pid-tests/README.md @@ -0,0 +1,18 @@ +# PID checks + +This directory contains tests for checking PaNET PIDs are functioning correct. + +The following tests are provided: + +|---|---| +|File| Target service | +|---|---| +| `check-w3id.json` | Redirections in `https://w3id.org/` | +|`check-purl.json` | Redirections in `https://purl.org/` | +|---|---| + +To run the tests, you need the `test-redirection` script from [w3id-tester repo](https://github.com/pan-ontologies/w3id-tester). + +Example command to check w3id.org: `../../w3id-tester/test-redirection -c check-w3c.json` + +Example command to check purl.org: `./test-redirection -c check-purl.json`. diff --git a/pid-tests/check-purl.json b/pid-tests/check-purl.json new file mode 100644 index 0000000..a2e9ada --- /dev/null +++ b/pid-tests/check-purl.json @@ -0,0 +1,44 @@ +[ + { + "name": "PaNET: latest release", + "description": "A constant link to the latest version of PaNET (unreasoned)", + "source_url": "https://purl.org/pan-science/PaNET/PaNET.owl", + "expected_status": 302, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.owl" + }, + { + "name": "PaNET: link for mapping", + "description": "A (suspect?) support for a mapping", + "source_url": "https://purl.org/pan-science/integration/PaN-mapping", + "expected_status": 302, + "expected_location": "http://www.purl.org/pan-science/integration/PaN-mapping/0.1" + }, + { + "name": "ESRFET: link to deliverable", + "description": "A (suspect?) link for ESRFET URL", + "source_url": "https://purl.org/pan-science/ESRFET", + "expected_status": 302, + "expected_location": "https://github.com/pan-ontologies/esrf-ontologies/tree/oscars-deliverable-31-12-2024" + }, + { + "name": "PaNET: documentation", + "description": "Documentation of the latest version of PaNET.", + "source_url": "https://purl.org/pan-science/PaNET/", + "expected_status": 302, + "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html" + }, + { + "name": "PaNET: documentation anchor", + "description": "An anchor in documentation of the latest version of PaNET.", + "source_url": "https://purl.org/pan-science/PaNET/foo", + "expected_status": 302, + "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html#foo" + }, + { + "name": "PaNET: document for IRI", + "description": "An anchor in documentation of a PaNET IRI.", + "source_url": "https://purl.org/pan-science/PaNET/PaNET0001", + "expected_status": 302, + "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html#PaNET0001" + } +] diff --git a/pid-tests/check-w3id.json b/pid-tests/check-w3id.json new file mode 100644 index 0000000..dbe202a --- /dev/null +++ b/pid-tests/check-w3id.json @@ -0,0 +1,52 @@ +[ + { + "name": "w3id examples: simple example", + "description": "w3id provided example redirection, used as a canary.", + "source_url": "/examples/simple/", + "expected_status": 302, + "expected_location": "https://example.com/" + }, + + { + "name": "PaNET latest release ontology", + "description": "A constant link to the latest version of PaNET", + "source_url": "/PaN/PaNET/PaNET.owl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.owl" + }, + { + "name": "PaNET version-specific ontology", + "description": "A link to a specific version PaNET", + "source_url": "/PaN/PaNET/1.2.0/PaNET.owl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.owl" + }, + { + "name": "PaNET latest release documentation", + "description": "A link to the latest release of PaNET", + "source_url": "/PaN/PaNET", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html" + }, + { + "name": "PaNET latest release documentation, with typo", + "description": "Mistakenly adding a trailing '/' to the URL", + "source_url": "/PaN/PaNET/", + "expected_status": 308, + "expected_location": "https://w3id.org/PaN/PaNET" + }, + { + "name": "PaNET version-specific documentation", + "description": "A link to the documentation of a specific version of PaNET", + "source_url": "/PaN/PaNET/1.2.0", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/index-en.html" + }, + { + "name": "PaNET version-specific documentation, with typo", + "description": "Mistakenly adding a trailing '/' to the URL", + "source_url": "/PaN/PaNET/1.2.0/", + "expected_status": 308, + "expected_location": "https://w3id.org/PaN/PaNET/1.2.0" + } +] From b6031de6cc1189148711daa1a0a12db973f9ea19 Mon Sep 17 00:00:00 2001 From: Paul Millar Date: Tue, 21 Jul 2026 20:23:47 +0200 Subject: [PATCH 2/3] Update to slightly different structure; add more tests --- pid-tests/check-w3id.json | 138 ++++++++++++++++++++++++++++++++------ 1 file changed, 117 insertions(+), 21 deletions(-) diff --git a/pid-tests/check-w3id.json b/pid-tests/check-w3id.json index dbe202a..1a3c562 100644 --- a/pid-tests/check-w3id.json +++ b/pid-tests/check-w3id.json @@ -1,52 +1,148 @@ [ { - "name": "w3id examples: simple example", - "description": "w3id provided example redirection, used as a canary.", + "name": "w3id canary", + "description": "An example redirection, maintained by w3id, that we use to verify the test framework itself.", "source_url": "/examples/simple/", "expected_status": 302, "expected_location": "https://example.com/" }, { - "name": "PaNET latest release ontology", - "description": "A constant link to the latest version of PaNET", - "source_url": "/PaN/PaNET/PaNET.owl", + "name": "PaNET latest: download RDF/XML", + "description": "Download the latest RDF/XML version of PaNET.", + "source_url": "/PaN/PaNET/latest/PaNET.owl", "expected_status": 307, "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.owl" }, { - "name": "PaNET version-specific ontology", - "description": "A link to a specific version PaNET", - "source_url": "/PaN/PaNET/1.2.0/PaNET.owl", + "name": "PaNET latest: download RDF/XML (reasoned)", + "description": "Download the latest RDF/XML version of PaNET that includes inferred axions.", + "source_url": "/PaN/PaNET/latest/PaNET_reasoned.owl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.owl" + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET_reasoned.owl" + }, + { + "name": "PaNET latest: download Turtle", + "description": "Download the latest Turtle version of PaNET.", + "source_url": "/PaN/PaNET/latest/PaNET.ttl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.ttl" }, { - "name": "PaNET latest release documentation", - "description": "A link to the latest release of PaNET", + "name": "PaNET latest: download N3", + "description": "Download the latest Notation3 version of PaNET.", + "source_url": "/PaN/PaNET/latest/PaNET.n3", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.n3" + }, + + { + "name": "PaNET latest: docs", + "description": "The documentation for the latest release of PaNET", "source_url": "/PaN/PaNET", "expected_status": 307, "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html" }, { - "name": "PaNET latest release documentation, with typo", - "description": "Mistakenly adding a trailing '/' to the URL", + "name": "PaNET latest: docs with slash", + "description": "The documentation for the latest release of PaNET, with trailing slash", "source_url": "/PaN/PaNET/", - "expected_status": 308, - "expected_location": "https://w3id.org/PaN/PaNET" + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/index-en.html" + }, + + { + "name": "PaNET latest: IRI, RDF/XML", + "description": "The RDF/XML description of an IRI within the latest release of PaNET.", + "source_url": "/PaN/PaNET#PaNET01134", + "accept": "application/rdf+xml", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.owl" + }, + { + "name": "PaNET latest: IRI, Turtle", + "description": "The Turtle description of an IRI within the latest release of PaNET.", + "source_url": "/PaN/PaNET#PaNET01134", + "accept": "text/turtle", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.ttl" + }, + { + "name": "PaNET latest: IRI, N3", + "description": "The Notation3 description of an IRI within the latest release of PaNET.", + "source_url": "/PaN/PaNET#PaNET01134", + "accept": "text/n3", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.n3" + }, + + + { + "name": "PaNET version: download RDF/XML", + "description": "Download an RDF/XML description of PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0/PaNET.owl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.owl" + }, + { + "name": "PaNET version: download RDF/XML (reasoned)", + "description": "Download an RDF/XML description of PaNET v1.2.0 the includes inferred axions.", + "source_url": "/PaN/PaNET/1.2.0/PaNET_reasoned.owl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET_reasoned.owl" + }, + { + "name": "PaNET version: download Turtle", + "description": "Download a Turtle description of PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0/PaNET.ttl", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.ttl" + }, + { + "name": "PaNET version: download N3", + "description": "Download a Notation3 description of PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0/PaNET.n3", + "expected_status": 307, + "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.n3" }, + { - "name": "PaNET version-specific documentation", - "description": "A link to the documentation of a specific version of PaNET", + "name": "PaNET version: docs", + "description": "The documentation for PaNET v1.2.0", "source_url": "/PaN/PaNET/1.2.0", "expected_status": 307, "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/index-en.html" }, { - "name": "PaNET version-specific documentation, with typo", - "description": "Mistakenly adding a trailing '/' to the URL", + "name": "PaNET version: docs, with slash", + "description": "The documentation for PaNET v1.2.0, with trailing slash", "source_url": "/PaN/PaNET/1.2.0/", - "expected_status": 308, - "expected_location": "https://w3id.org/PaN/PaNET/1.2.0" + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/index-en.html" + }, + + { + "name": "PaNET version: IRI, RDF/XML", + "description": "The RDF/XML description of an IRI within PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0#PaNET01134", + "accept": "application/rdf+xml", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.owl" + }, + { + "name": "PaNET version: IRI, Turtle", + "description": "The Turtle description of an IRI within PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0#PaNET01134", + "accept": "text/turtle", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.ttl" + }, + { + "name": "PaNET version: IRI, N3", + "description": "The Notation3 description of an IRI within PaNET v1.2.0.", + "source_url": "/PaN/PaNET/1.2.0#PaNET01134", + "accept": "text/n3", + "expected_status": 307, + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.n3" } ] From 5f49d719d37216ff6db080adb270bb00cbe51b47 Mon Sep 17 00:00:00 2001 From: Paul Millar Date: Thu, 23 Jul 2026 15:34:01 +0200 Subject: [PATCH 3/3] Switch downloads from GitHub releases to GitHub pages. --- pid-tests/check-w3id.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pid-tests/check-w3id.json b/pid-tests/check-w3id.json index 1a3c562..20d11dd 100644 --- a/pid-tests/check-w3id.json +++ b/pid-tests/check-w3id.json @@ -12,28 +12,28 @@ "description": "Download the latest RDF/XML version of PaNET.", "source_url": "/PaN/PaNET/latest/PaNET.owl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.owl" + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.owl" }, { "name": "PaNET latest: download RDF/XML (reasoned)", "description": "Download the latest RDF/XML version of PaNET that includes inferred axions.", "source_url": "/PaN/PaNET/latest/PaNET_reasoned.owl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET_reasoned.owl" + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology_reasoned.owl" }, { "name": "PaNET latest: download Turtle", "description": "Download the latest Turtle version of PaNET.", "source_url": "/PaN/PaNET/latest/PaNET.ttl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.ttl" + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.ttl" }, { "name": "PaNET latest: download N3", "description": "Download the latest Notation3 version of PaNET.", "source_url": "/PaN/PaNET/latest/PaNET.n3", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/latest/download/PaNET.n3" + "expected_location": "https://pan-ontologies.github.io/PaNET/latest/ontology.n3" }, { @@ -82,28 +82,28 @@ "description": "Download an RDF/XML description of PaNET v1.2.0.", "source_url": "/PaN/PaNET/1.2.0/PaNET.owl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.owl" + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.owl" }, { "name": "PaNET version: download RDF/XML (reasoned)", "description": "Download an RDF/XML description of PaNET v1.2.0 the includes inferred axions.", "source_url": "/PaN/PaNET/1.2.0/PaNET_reasoned.owl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET_reasoned.owl" + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology_reasoned.owl" }, { "name": "PaNET version: download Turtle", "description": "Download a Turtle description of PaNET v1.2.0.", "source_url": "/PaN/PaNET/1.2.0/PaNET.ttl", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.ttl" + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.ttl" }, { "name": "PaNET version: download N3", "description": "Download a Notation3 description of PaNET v1.2.0.", "source_url": "/PaN/PaNET/1.2.0/PaNET.n3", "expected_status": 307, - "expected_location": "https://github.com/pan-ontologies/PaNET/releases/download/v1.2.0/PaNET.n3" + "expected_location": "https://pan-ontologies.github.io/PaNET/1.2.0/ontology.n3" }, {