Skip to content

Commit 449f969

Browse files
committed
updating the activator to support service implementation @id pointing to the python package instead of ..
1 parent be60b41 commit 449f969

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/python_activator/Manifest.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def __init__(self, id, local_url, status, error):
157157
except:
158158
self.metadata = {}
159159
pass
160-
self.metadata["@id"] = id
160+
self.metadata["@id"] = id.replace("_:","")
161161
self.metadata["status"] = status
162162
if error:
163163
self.metadata["error"] = error
@@ -223,10 +223,10 @@ def install(self):
223223
)
224224

225225
# use resolved implementation id
226-
deployment_file = Path(implementation[0]["@id"]).joinpath(
226+
deployment_file = Path(implementation[0]["@id"]).parent.joinpath(
227227
"deployment.yaml"
228228
)
229-
self.python_service = implementation[0]["@id"]
229+
self.python_service = Path(implementation[0]["@id"]).parent
230230
engine = "koio:org.kgrid.python-activator"
231231
break
232232

src/python_activator/api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ async def download_file(ko_id: str):
193193
)
194194
)
195195

196-
# exoand the service using the context
196+
# expand the service using the context
197197
service = jsonld.expand(
198198
service,
199199
{
@@ -230,7 +230,7 @@ def endpoints(request: Request):
230230
Knowledge_Objects[obj_key].metadata["documentation"] = (
231231
request.url.__str__()
232232
+ "/"
233-
+ Knowledge_Objects[obj_key].metadata["@id"]
233+
+ Knowledge_Objects[obj_key].metadata["@id"].replace("_:","")
234234
+ "/doc"
235235
)
236236
return [obj.metadata for obj in Knowledge_Objects.values()]

0 commit comments

Comments
 (0)