Skip to content

Commit

Permalink
chore: upgrade rdflib dependency (#1351)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nora-Olivia-Ammann authored Dec 19, 2024
1 parent b38144f commit 58ff473
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 136 deletions.
3 changes: 1 addition & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ dependencies = [
# pandas: "excel" is an extra that contains xlrd that is necessary for reading old .xls Excel files
"pyld>=2.0.4",
"pyyaml>=6.0.2",
"rdflib==7.0.0",
# rdflib: don't upgrade until backend allows parsing of different types of json-ld formats
"rdflib>=7.1.1",
"regex>=2024.9.11",
"requests>=2.32.3",
"rustworkx>=0.15.1",
Expand Down
15 changes: 12 additions & 3 deletions test/integration/commands/xmlupload/test_resource_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,20 @@ def test_one_resource_without_links(ingest_client_mock: AssetClient) -> None:
"route": "/v2/resources",
"data": {
"@type": "http://0.0.0.0:3333/ontology/9999/onto/v2#foo_1_type",
"http://www.w3.org/2000/01/rdf-schema#label": "foo_1_label",
"http://www.w3.org/2000/01/rdf-schema#label": {
"@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "foo_1_label",
},
"http://api.knora.org/ontology/knora-api/v2#attachedToProject": {
"@id": "https://admin.test.dasch.swiss/project/MsOaiQkcQ7-QPxsYBKckfQ"
},
"@context": {},
prop_name: {
"@type": "http://api.knora.org/ontology/knora-api/v2#TextValue",
"http://api.knora.org/ontology/knora-api/v2#valueAsString": "foo_1 text",
"http://api.knora.org/ontology/knora-api/v2#valueAsString": {
"@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "foo_1 text",
},
},
},
}
Expand Down Expand Up @@ -136,7 +142,10 @@ def test_one_resource_with_link_to_existing_resource(ingest_client_mock: AssetCl
"route": "/v2/resources",
"data": {
"@type": "http://0.0.0.0:3333/ontology/9999/onto/v2#foo_1_type",
"http://www.w3.org/2000/01/rdf-schema#label": "foo_1_label",
"http://www.w3.org/2000/01/rdf-schema#label": {
"@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "foo_1_label",
},
"http://api.knora.org/ontology/knora-api/v2#attachedToProject": {
"@id": "https://admin.test.dasch.swiss/project/MsOaiQkcQ7-QPxsYBKckfQ"
},
Expand Down
10 changes: 8 additions & 2 deletions test/unittests/commands/xmlupload/test_resource_create_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,15 @@ def test_frame_json(resource_graph: Graph) -> None:
"@type": "http://0.0.0.0:3333/ontology/9999/onto/v2#TestResource",
"http://0.0.0.0:3333/ontology/9999/onto/v2#isTrueOrFalse": {
"@type": "http://api.knora.org/ontology/knora-api/v2#BooleanValue",
"http://api.knora.org/ontology/knora-api/v2#booleanValueAsBoolean": True,
"http://api.knora.org/ontology/knora-api/v2#booleanValueAsBoolean": {
"@type": "http://www.w3.org/2001/XMLSchema#boolean",
"@value": True,
},
},
"http://api.knora.org/ontology/knora-api/v2#attachedToProject": {"@id": "http://rdfh.ch/9999/project"},
"http://www.w3.org/2000/01/rdf-schema#label": "Special Characters: äöüéèà",
"http://www.w3.org/2000/01/rdf-schema#label": {
"@type": "http://www.w3.org/2001/XMLSchema#string",
"@value": "Special Characters: äöüéèà",
},
}
assert result_json == expected
Loading

0 comments on commit 58ff473

Please sign in to comment.