Skip to content

Commit

Permalink
Fix getting entity/class/property by id that has special characters s…
Browse files Browse the repository at this point in the history
…uch as /
  • Loading branch information
Binh Vu committed Apr 14, 2024
1 parent 963181f commit 57441ee
Show file tree
Hide file tree
Showing 9 changed files with 218 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
- Users can export the linked entities
- Importing a dataset, if the readable labels are not available for nodes/edges in the semantic descriptions, users can generate a default one via `add-missing-readable-label` flag.

### Fixed

- Fix getting entity/class/property by id that has special characters such as /

## [4.1.0] - 2024-04-13

### Added
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "web-sand"
version = "4.1.0"
version = "4.1.1"
description = "UI for browsing/editing semantic descriptions"
authors = ["Binh Vu <[email protected]>"]
repository = "https://github.com/usc-isi-i2/sand"
Expand All @@ -21,7 +21,7 @@ peewee = "^3.15.2"
Flask = "^2.2.2"
python-dotenv = ">= 0.19.0, < 0.20.0"
tornado = "^6.2"
gena = "^1.6.4"
gena = "^1.7.0"
loguru = "^0.7.0"
orjson = ">= 3.9.0, < 4.0.0"
drepr = "^2.10.0"
Expand Down
1 change: 1 addition & 0 deletions sand/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from dependency_injector.wiring import Provide, inject
from flask import jsonify
from gena import generate_api, generate_app, generate_readonly_api_4dict
from sm.misc.funcs import identity_func
from werkzeug.exceptions import HTTPException

import sand.deserializer as sand_deser
Expand Down
8 changes: 4 additions & 4 deletions sand/models/ontology.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@ def readable_label(self):

def semweb_default_props():
return {
str(RDFS.label): OntProperty(
id=str(RDFS.label),
"rdfs:label": OntProperty(
id="rdfs:label",
uri=str(RDFS.label),
label="rdfs:label",
aliases=[],
datatype="string",
description="Provides a human-readable version of a resource's name.",
parents=[],
),
str(RDF.type): OntProperty(
id=str(RDF.type),
"rdf:type": OntProperty(
id="rdf:type",
uri=str(RDF.type),
label="rdf:type",
aliases=[],
Expand Down
2 changes: 1 addition & 1 deletion www/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"antd": "^4.19.5",
"axios": "^0.21.4",
"fuse.js": "^6.4.6",
"gena-app": "^3.0.1",
"gena-app": "^4.2.0",
"hyphenation.en-us": "^0.2.1",
"lodash": "^4.17.21",
"memoize-one": "^5.2.1",
Expand Down
8 changes: 8 additions & 0 deletions www/src/models/entity/EntityStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,12 @@ export class EntityStore extends RStore<string, Entity> {
record.properties
);
}

protected createFetchByIdRequest(id: string): Promise<any> {
return axios.get(`${this.remoteURL}/find_by_id`, {
params: {
id,
},
});
}
}
8 changes: 8 additions & 0 deletions www/src/models/ontology/ClassStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,12 @@ export class ClassStore extends RStore<string, Class> {
record.ancestors = new Set(record.ancestors);
return record;
}

protected createFetchByIdRequest(id: string): Promise<any> {
return axios.get(`${this.remoteURL}/find_by_id`, {
params: {
id,
},
});
}
}
8 changes: 8 additions & 0 deletions www/src/models/ontology/PropertyStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,12 @@ export class PropertyStore extends RStore<string, Property> {
new Set(record.ancestors)
);
}

protected createFetchByIdRequest(id: string): Promise<any> {
return axios.get(`${this.remoteURL}/find_by_id`, {
params: {
id,
},
});
}
}
Loading

0 comments on commit 57441ee

Please sign in to comment.