Skip to content

Commit

Permalink
refactors wikidata refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Mar 10, 2024
1 parent 4a56343 commit 9584bf8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .project
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
<comment></comment>
<projects>
<project>ConferenceCorpus</project>
<project>justpy</project>
<project>PyGenericSpreadSheet</project>
<project>pyJustpyWidgets</project>
<project>pyLoDStorage</project>
<project>wdgrid</project>
</projects>
<buildSpec>
<buildCommand>
Expand Down
9 changes: 7 additions & 2 deletions ceurws/wikidata_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ngwidgets.lod_grid import ListOfDictsGrid
from nicegui import ui
from typing import Dict,List
from _ast import Try
from wd.query_view import QueryView

class WikidataView(View):
"""
Expand Down Expand Up @@ -95,7 +95,9 @@ async def on_refresh_button_click(self):
handle the refreshing of the proceedings from wikidata
"""
try:
ui.notify("")
ui.notify("wikidata refresh button clicked")
wd_records=self.solution.wdSync.update()
self.lod_grid.load_lod(wd_records)
pass
except Exception as ex:
self.solution.handle_exception(ex)
Expand All @@ -114,6 +116,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.show_query(self.solution.wdSync.wdQuery.query)

#grid_config = GridConfig(
# key_col="Vol",
# multiselect=True)
Expand Down
2 changes: 2 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ dependencies = [
'neo4j',
# https://github.com/WolfgangFahl/nicegui_widgets
'ngwidgets>=0.12.5',
# https://pypi.org/project/wdgrid/
'wdgrid>=0.1.0'
]

requires-python = ">=3.9"
Expand Down

0 comments on commit 9584bf8

Please sign in to comment.