Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions pid-tests/README.md
Original file line number Diff line number Diff line change
@@ -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`.
44 changes: 44 additions & 0 deletions pid-tests/check-purl.json
Original file line number Diff line number Diff line change
@@ -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"
}
]
148 changes: 148 additions & 0 deletions pid-tests/check-w3id.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
[
{
"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: 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://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://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://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://pan-ontologies.github.io/PaNET/latest/ontology.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: docs with slash",
"description": "The documentation for the latest release of PaNET, with trailing slash",
"source_url": "/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://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://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://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://pan-ontologies.github.io/PaNET/1.2.0/ontology.n3"
},

{
"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: docs, with slash",
"description": "The documentation for PaNET v1.2.0, with trailing slash",
"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: 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"
}
]
Loading