Wikibase Repository development environment (mwcli)

This entry is part 4 of 7 in the series Wikibase Entities

Back in 2022, while working at Wikimedia Germany, I ran two sessions with people from the Wikibase Stakeholder Group, focused on Ecosystem Enablement.

These sessions were video recorded and documented in quite a lot of detail, but following through with the videos would probably lead to a bit of a drawn out experience, as they were focused around a workshop setting with participants following along.

  • Session 1, 2022-04-28: Using mwcli, loading extensions, understanding Mediawiki’s general extension mechanism (Video, Overview)
  • Session 2, 2022-05-24: Running your first extension, Wikibase stable interface policy, Mediawiki hooks, building a new API function (Video, Overview)

In this post, I will focus on the core steps required to get a MediaWiki and Wikibase Repository development environment setup in a few minutes with mwcli, and will serve as a basis for some blog posts that I will be writing in the future.

Getting mwcli

If you head to the home page of mwcli, you’ll see a link to an installation guide.

Read more

Lexeme and MediaInfo, implementing EntityDocument

This entry is part 3 of 7 in the series Wikibase Entities

As we continue the journey, looking at Entity and EntityDocument within Wikibase, another useful thing to look at are the third and fourth widely used (at least within the Wikimedia space) entity types for Wikibase.

Both of these entity types make use of the EntityDocument, with none of the old assumptions baked into the Entity base class that used to exist.

MediaWiki extensions

As these entity types were decoupled from the main body of Wikibase, they were developed as MediaWiki extensions. https://www.mediawiki.org/wiki/Extension:WikibaseMediaInfo and https://www.mediawiki.org/wiki/Extension:WikibaseLexeme

This was the easy choice at the time, and probably still makes perfect sense, as Wikibase itself is a MediaWiki extension, and there is already a common pattern of extensions extending extensions. This ultimately saves some work around coding an extension mechanism, though we should remember that ultimately the Wikibase codebase has free choice when it comes to choose how it can be extended.

Read more

Wikibase, from Entity to EntityDocument

This entry is part 2 of 7 in the series Wikibase Entities

The term document has already come up a few times while discussing what a Wikibase entity is, and if that should change (be that in name only, code or structures), including in my first post of this series.

Looking at the very first definition of entity in the duck duck go search that I performed 6 seconds ago, an entity is:

Something that exists as a particular and discrete unit.

The American Heritage® Dictionary of the English Language, 5th Edition

At the most basic level, it’s fairly straightforward to say that a Wikibase doesn’t hold the actual entities (such as a type of tree), rather data about said entities.

And in a nutshell, this data is collected within a document.

Image from “What is the semantic web” by onotext.com

Quoting a few choice people again, before diving deeper into this topic…

The “entities” in the Wikibase base are not Entities. They are descriptions of entities. The entity is the thing in the world not the data we have about it, even tough colloquially, we don’t make the distinction. But we have separate URIs for the thing and the description in the abstract and for specific renderings.
I think that’s important to mention when discussing what an entity “is”.

Daniel Kinzler in conversation, June 2024

The data model chose to use the term “Entity” for the top-level Thing/class in the hierarchy of the data model. But in reality, a better term would have been “Document” or “Record”. In general, the confusion is often due simply to folks that are more familiar with one of the domains than the other, between OOP Objects and Semantic Web Objects.

Thad Guidry in a comment, June 2024

Read more

Wikibase: What is an entity?

This entry is part 1 of 7 in the series Wikibase Entities

I left the Wikidata and Wikibase teams roughly a year ago, and at the time there were some long and deep discussions going on inside the team trying to define what an entity was, and what should and should not be an entity.

At the recent Hackathon in Tallinn, this topic resurfaced to me, as current and previous members of the Wikidata and Wikibase teams were in attendance, along with myself.

I have opinions, others have opinions, and feel that a short blog post summarizing the currently publicly written details, as well as some of the more on point things I have heard people say may help further discussion, or perhaps bring it to some kind of conclusion.

What I actually found when pulling the various written details together is they mostly describe what I would say is the ideal path forward without rewriting the world (of Wikibase), but it’s taken me a while to sit back, relax, and actually reread all the things that we have written over the years.

Read more

2023 Year Review

What a year, I spent most of my time on a sail boat, cruising around the Caribbean etc, and working part-time for Wikimedia on Wikibase.

WBStack became Wikibase.Cloud and the team now working behind it has continued to iterate on the platform, which finally made its way out of its early alpha state. That also came with a snazzy new landing page, and set of logos for Wikibase etc.

Infact, in the last few weeks I finally saw all of the old wbstack Github issues finally migrate onto Phabricator for the team to more easily view and work with.

I look forward to creating an overview of the things that have changed with Wikibase.Cloud year on year at some point, as an overview of the progression of the platform that I still believe is very important to the continued growth of Wikibase.

In the less digital world, I turned our many boaty blog posts and pictures into a book! No you can’t buy one (maybe if we made a 2nd edition. But can we consider ourselves published authors now? It has an ISBN on the back, after all?

Read more

Smart Home: A fleet of Temperature and Humidity Sensors

One of the easiest ways to get myself into the Zigbee life without needing to worry too much about exactly what I was doing, buying or what my goals were was to buy a set of Temperature and Humidity Sensors for every room of the house.

After a tiny amount of research and some discussion among friends, I settled on a fleet of Aquara sensors. These work well with home assistant, use batteries that I have many of already and want to use up, are visually appealing and can be bought in bulk on AliExpress.

For a hub, I went for the SMLIGHT SLZB-06 that has some good reviews in terms of flexibility and openness, as well as allowing use via wired network, Wi-Fi or even USB.

Everything was extremely easy to set up, wiring the hub into the network and having it appear in Home Assistant running on my Raspberry Pi 4, and then pairing each of the sensors with the Hub and having them appear within Home assistant.

Read more

Scanning for iBeacon advertisements in Go

I spent some time this evening faffing around trying to make a Raspberry Pi turn into a device that could detect nearby iBeacons, filtered by signal strength to find the closest, to basically create a kind of iBeacon scanner that spat out the UUID, minor and major values.

Eventually, I gave up on the Raspberry Pi for various reasons, and moved to my Windows laptop, found a good library, a working example to build on and managed to create a scanner that outputs what you see below!

The details

Searching around, I came across https://github.com/tinygo-org/bluetooth, which included an example that got me scanning for Bluetooth devices right away.

Read more

Review & Removal of Wikidata query service Blazegraph JNL on Cloudflare R2

Back in August, I uploaded a new Wikidata query service Blazegraph JNL file to both Cloudflare and the Internet Archive. 4 months on, it is time for me to remove the R2 version of this file, which is costing me around 18 USD per month to store, and fall back to the Internet Archive version … Read more

Smart home: Starting with OPNSense Router, Eero Wi-Fi and a pile of cables

I recently moved into a home, that whether I like it or note, is rather “smart”.

There is a Ring video doorbell, Ring camera out the back and Wi-Fi radiators throughout, not to mention the Wi-Fi fridge, dishwasher, washing machine, hot water tank and Amazon Echo Dot that I was recently gifted.

In total, I think there are around 18 Wi-Fi devices in the house before I add any of my own.

Router choice

When first moving in, I only had an old Netgear WNR1000v3 router that would barely give a single client 40MBps connection, let alone be able to support 20+ devices moving forward. It also really couldn’t handle the fibre internet speed, given it is from 2011.

I also tried an old Plusnet hub that I had kicking around, but apparently they lock the PPPoe details to only allow Plusnet accounts?

Trusting the advice of my dear friend Ollie after discussing his “2022.11.14 Low Power Firewall” research spreadsheet, I settled on buying a Beelink U59 Pro N5105 mini PC (that would also arrive the next day).

You can find a good performance review including power benchmarks for this device on CNX Software.

Read more

COVID-19 Wikipedia pageview spikes, 2019-2022

Back in 2019 at the start of the COVID-19 outbreak, Wikipedia saw large spikes in page views on COVID-19 related topics while people here hunting for information.

I briefly looked at some of the spikes in March 2020 using the easy-to-use pageview tool for Wikimedia sites. But the problem with viewing the spikes through this tool is that you can only look at 10 pages at a time on a single site, when in reality you’d want to look at many pages relating to a topic, across multiple sites at once.

I wrote a notebook to do just this, submitted it for privacy review, and I am finally getting around to putting some of those moving parts and visualizations in public view.

Methodology

It certainly isn’t perfect, but the representation of spikes is much more accurate than looking at a single Wikipedia or set of hand selected pages.

  1. Find statements on Wikidata that relate to COVID-19 items
  2. Find Wikipedia site links for these items
  3. Find previous names of these pages if they have been moved
  4. Lookup pageviews for all titles in the pageview_hourly dataset
  5. Compile into a gigantic table and make some graphs using plotly

I’ll come onto the details later, but first for the…

Graphics

All graphics generally show an initial peak in the run-up to the WHO declaring an international public health emergency (12 Feb 2020), and another peak starting prior to the WHO declaring a pandemic.

Be sure to have a look at the interactive views of each diagram to really see the details.

COVID-19 related Wikimedia pageviews (interactive view)

Read more