JeroenDeDauw
Repos
291
Followers
194
Following
24

🌻 The collaborative editing software that runs Wikipedia. Mirror from https://gerrit.wikimedia.org/g/mediawiki/core. See https://mediawiki.org/wiki/Developer_access for contributing.

3133
1097

🗺 Maps is the MediaWiki extension that enables visualization of geographic data with dynamic embedded maps.

59
48

💶 User facing application for the Wikimedia Deutschland fundraising.

145
15

䷂ Library for diffing, patching and representing differences between objects

189
14

🔗 Semantic MediaWiki turns MediaWiki into a knowledge management platform with query and export capabilities

425
195

📖 Library that provides ways to read from and iterate through the Wikibase entities in a Wikibase Repository JSON dump

63
17

Events

1.37.3 -> 1.37.6 AND 1.35.7 -> 1.35.8

Created at 5 hours ago
issue comment
Dockerize

Thanks for explaining

To be clear about how this would normally work with a Docker approach: you'd want the package manager (pip) installed in the Docker image, but not the packages that the package manager pulls in. So needing to run pip install is not an argument for using Docker, assuming the runtime itself is already taken care of.

Created at 1 day ago
issue comment
Dockerize

Ok, I'll give running the tests a try then later today and see if anything needs to be installed beyond python itself.

Didn't the bot use a DB? No dependency there?

Created at 1 day ago
issue comment
Dockerize

Does pip also come bundled with python?

If you just need a standard version of python and nothing else, then there is indeed not much reason to Dockerize.

This is somewhat suggested by https://github.com/robertskmiles/stampy/blob/master/.github/workflows/unit-test-pull-request.yml, though idk if the Python on GitHub Actions is special somehow, for instance by having extra modules bundled.

Created at 1 day ago
Link URLs on entity pages

From @paulduchesne:

it would be really useful to be able to click through the URL links (which we are now expecting to only be validated URLs)

AC:

  • URLs are linked.
  • Visually similar to links in WB statements
  • Should have nofollow by default. It's nice (but not required) if the usual MW config about nofollow is respected, especially if that is also the case for URLs in statements.

We definitely need nofollow on those URL if we link them. Good to check what wikibase does for statements with link values.

Created at 1 day ago

Render object URL as link

Merge pull request #107 from ProfessionalWiki/url

Render object URL as link

Created at 1 day ago
JeroenDeDauw delete branch url
Created at 1 day ago
pull request closed
Render object URL as link

Fixes #103

Screenshot_20220928_214739

On initial page render rel="nofollow" is added, but when an edit is done it is not added because it's irrelevant until the page is reloaded.

Created at 1 day ago
issue comment
Dockerize

What is currently needed then?

  • Python
  • venv? Or does that come bundled?
  • Anaconda? Or does that go via venv?
  • Anything else not going via venv?

Having a Dockerized version does not force you do use Docker. You can keep using your current setup if you prefer.

Is there any off-the-shelf mock environment for Discord API, Goose AI, ...?

That question seems quite relevant for testing, but I'm not sure how it relates to Dockerizing.

debug Docker files

I certainly prefer having the setup instructions in version-controlled code that can be run by CI. The alternative is having them in README text that gets out of date and tends to be incomplete, because "obvious things" (to some) get omitted.

Created at 1 day ago
opened issue
Dockerize

Acceptance criteria:

  • Stampy and its test suite can be run via Docker. This means there are no local dependencies beyond Docker, including no Python and no Anaconda.

Benefits:

  • Easier getting started for new devs, esp those that do not frequently work with Python
  • Avoid polluting dev machines with random dependencies
  • Ensure dev/test/ci/prod run the exact same versions
Created at 2 days ago
Put property mapping on the correct node

From discussion #98

Created at 3 days ago

Add config-based predicate mapping prefix

Merge pull request #106 from ProfessionalWiki/wdt

Add config-based predicate mapping prefix

Created at 5 days ago
JeroenDeDauw delete branch wdt
Created at 5 days ago
pull request closed
Add config-based predicate mapping prefix

Follow-up to #105

Created at 5 days ago
Add simple fix for Property RDF mappings

Sounds good. If Wikibase changes how it does things, the extension can always be updated to match.

Created at 1 week ago
Add simple fix for Property RDF mappings

There is a hacky way we can get the wd part of the prefix from WB settings and then we can append the t using a WB constant. However, I'm not sure if there is some other magic that happens in the background and in such a case it would probably be better to do something similar to what WB's PropertySpecificComponentsRdfBuilder does.

Why is getting the wb prefix from the config hacky? Appending the constant to it sounds viable. I cannot quickly tell what the deal with PropertySpecificComponentsRdfBuilder is. I am not aware of "other magic" that would happen to the prefixes.

Created at 1 week ago
JeroenDeDauw delete branch prop-node
Created at 1 week ago

Add simple fix for Property RDF mappings

Move id logic

Merge pull request #105 from ProfessionalWiki/prop-node

Add simple fix for Property RDF mappings

Created at 1 week ago
pull request closed
Add simple fix for Property RDF mappings

Refs #100

This is the simplest implementation that produces the example output as per https://github.com/ProfessionalWiki/WikibaseRDF/discussions/98#discussioncomment-3692976.

There are two possible issues with this implementation, although they might not be critical.

Duplicate node issue: This is caused because the original "empty" wdt node is created by Wikibase here: https://github.com/wikimedia/Wikibase/blob/master/repo/includes/Rdf/PropertySpecificComponentsRdfBuilder.php#L143-L146

I cannot find a way to inject anything there and my understanding is the RDF output is a stream, so you can only append. However, the resultant ttl file validates on something like http://ttl.summerofcode.be/, so I don't know if this is really a problem.

Configurability issue: It seems to be possible to use a different prefix instead of wdt: https://doc.wikimedia.org/Wikibase/master/php/md_docs_topics_entitysources.html Refer to 'rdfNodeNamespacePrefix'. There is a hacky way we can get the wd part of the prefix from WB settings and then we can append the t using a WB constant. However, I'm not sure if there is some other magic that happens in the background and in such a case it would probably be better to do something similar to what WB's PropertySpecificComponentsRdfBuilder does.


If we need to expand on the Property mapping logic, e.g. by injecting the same dependencies used by PropertySpecificComponentsRdfBuilder, would it make more sense to have two implementations of our EntityRdfBuilder to keep Item and Property logic separate?

Created at 1 week ago