Skip to content

Commit

Permalink
fixes wikidata refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Mar 10, 2024
1 parent 9584bf8 commit 59d27ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion ceurws/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from ceurws.volume_view import VolumeView, VolumeListView
from ceurws.wikidatasync import WikidataSync
from ceurws.wikidata_view import WikidataView
from lodstorage.query import EndpointManager

class CeurWsWebServer(InputWebserver):
"""
Expand All @@ -44,7 +45,7 @@ def __init__(self):
constructor
"""
InputWebserver.__init__(self, config=CeurWsWebServer.get_config())

@ui.page("/volumes")
async def show_volumes(client: Client):
return await self.page(
Expand Down
8 changes: 4 additions & 4 deletions ceurws/wikidata_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,7 @@ def reload_aggrid(self,olod:List):
"""
reverseLod = sorted(
olod,
key=lambda row: int(row["sVolume"])
if "sVolume" in row
else int(row["Volume"]),
key=lambda row: int(row.get("sVolume") or row.get("Volume") or 0),
reverse=True,
)
lod = []
Expand Down Expand Up @@ -116,7 +114,9 @@ def setup_ui(self):
.classes("btn btn-primary btn-sm col-1")
.tooltip("Refresh from Wikidata SPARQL endpoint")
)
self.query_view=QueryView(self.solution)
self.query_view=QueryView(self.solution,
name="CEUR-WS wikidata sync",
sparql_endpoint=self.solution.wdSync.wikidata_endpoint)
self.query_view.show_query(self.solution.wdSync.wdQuery.query)

#grid_config = GridConfig(
Expand Down
1 change: 1 addition & 0 deletions ceurws/wikidatasync.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ def from_endpoint_names(
wd_sync = cls(
baseurl=wd_ep.endpoint, dblp_endpoint_url=dblp_ep.endpoint, debug=debug
)
wd_sync.wikidata_endpoint=wd_ep
return wd_sync

def login(self):
Expand Down

0 comments on commit 59d27ec

Please sign in to comment.