Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate and add last updated value to data outputs #562

Open
2 tasks done
andrewtavis opened this issue Jan 26, 2025 · 6 comments
Open
2 tasks done

Investigate and add last updated value to data outputs #562

andrewtavis opened this issue Jan 26, 2025 · 6 comments
Assignees
Labels
feature New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@andrewtavis
Copy link
Member

Terms

Description

A long term goal for Scribe is that data updates will only need to be for the specific data that's been updated since the last time that the user requested new data. One way this could be achieved is by getting the last time that the Wikidata item was edited and adding this as a last_updated field in the JSON and SQLite tables. This would allow us to serve data that meets the condition that last_updated >= last_app_data_update.

This issue would investigate how to get the last time that a Wikidata entry was edited via both the JSON dump and the Wikidata Query Service queries and add this to the outputs of both processes 🚀

Contribution

Happy to support someone who has interest in working on this!

@axif0 might pick this up for Outreachy, but could also review if someone else had interest 📶✈

@andrewtavis andrewtavis added feature New feature or request help wanted Extra attention is needed question Further information is requested labels Jan 26, 2025
@axif0 axif0 self-assigned this Feb 1, 2025
@axif0
Copy link
Collaborator

axif0 commented Feb 1, 2025

Wikidata entry was edited via both the JSON dump and the Wikidata Query Service queries

Are we want like this?

{
"modified":"2024-11-12T16:46:51Z",
  "L87": {
    "nominativePlural": "Regenbögen",
    "genitiveSingular": "Regenbogens",
    "nominativeSingular": "Regenbogen",
    "dativeSingular": "Regenbogen",
    "accusativeSingular": "Regenbogen"
  }
}

Add an extra parameter modified to show the last timestamp.

@andrewtavis
Copy link
Member Author

I think that having the timestamp in the LID object might make more sense so that the LID is the base unit? With that sounds really good though!

axif0 added a commit to axif0/Scribe-Data that referenced this issue Feb 2, 2025
@axif0
Copy link
Collaborator

axif0 commented Feb 2, 2025

For clarifying, last update, we need to add schema:dateModified ?lastModified . in all sparql queries. The date will save as "lastModified": "2024-12-14T18:10:24Z" in JSON.

Image

query Link

Is it correct ?

@andrewtavis
Copy link
Member Author

Looks great, @axif0! We'd also need this to be ignored in the checks?

@axif0
Copy link
Collaborator

axif0 commented Feb 2, 2025

We'd also need this to be ignored in the checks?

Are you referring to this commit e363282 for add modified date in missing forms queries ?

@andrewtavis
Copy link
Member Author

Exactly this, @axif0 :) Thanks so much for you attention to detail!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request help wanted Extra attention is needed question Further information is requested
Projects
Status: Todo
Development

No branches or pull requests

2 participants