Hi,
I'd like to write integration tests for https://www.wikidata.org/wiki/User:FLOSSbot and use test.wikidata.org for that. I figured out how to create properties[1] with pywikibot and search for them[2]. But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org. The https://www.mediawiki.org/wiki/Wikibase/API page does not show anything obvious.
Any idea ?
Cheers
[1] import pywikibot site = pywikibot.Site("test", "wikidata") print(str(site.editEntity({'new': 'property'}, {'datatype':'item', "labels": {"en": {"language":"en","value":"FLOSS3property"} } })))
[2] import pywikibot site = pywikibot.Site("test", "wikidata") for e in site.search_entities('FLOSS', 'en', type='property'): print(str(e))
Hi,
It looks like the wikibase API[1] does not provide a way to delete an item. To remove an item / propery on http://test.wikidata.org a script would have do web scrapping and use the same interface people attending the deletion requests do[2]. Unfortunately a regular user does not seem to have permission to do that on test.wikidata.org. Would it be possible to upgrade the user permissions to allow deletion of items / property on test.wikidata.org ?
Cheers
[1] https://www.mediawiki.org/wiki/Wikibase/API [2] https://www.wikidata.org/wiki/Wikidata:Requests_for_deletions
On 08/09/2016 17:54, Loic Dachary wrote:
Hi,
I'd like to write integration tests for https://www.wikidata.org/wiki/User:FLOSSbot and use test.wikidata.org for that. I figured out how to create properties[1] with pywikibot and search for them[2]. But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org. The https://www.mediawiki.org/wiki/Wikibase/API page does not show anything obvious.
Any idea ?
Cheers
[1] import pywikibot site = pywikibot.Site("test", "wikidata") print(str(site.editEntity({'new': 'property'}, {'datatype':'item', "labels": {"en": {"language":"en","value":"FLOSS3property"} } })))
[2] import pywikibot site = pywikibot.Site("test", "wikidata") for e in site.search_entities('FLOSS', 'en', type='property'): print(str(e))
Hi,
On 09/08/2016 08:54 AM, Loic Dachary wrote:
Hi,
But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org.
You would just use the normal MediaWiki API delete feature[1]. Pywikibot abstracts it as Page.delete(...).
[1] https://www.mediawiki.org/wiki/API:Delete
-- Legoktm
Hi,
I don't think you need to worry at all about cluttering test.wikidata.org. I guess it is purged regularly anyway.
Best,
Markus
On 14.09.2016 20:32, Legoktm wrote:
Hi,
On 09/08/2016 08:54 AM, Loic Dachary wrote:
Hi,
But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org.
You would just use the normal MediaWiki API delete feature[1]. Pywikibot abstracts it as Page.delete(...).
[1] https://www.mediawiki.org/wiki/API:Delete
-- Legoktm
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
On 16/09/2016 15:54, Markus Kroetzsch wrote:
Hi,
I don't think you need to worry at all about cluttering test.wikidata.org. I guess it is purged regularly anyway.
Ok then, fine with me :-)
Best,
Markus
On 14.09.2016 20:32, Legoktm wrote:
Hi,
On 09/08/2016 08:54 AM, Loic Dachary wrote:
Hi,
But I was not able to figure out how to remove them afterwards, to not clutter test.wikidata.org.
You would just use the normal MediaWiki API delete feature[1]. Pywikibot abstracts it as Page.delete(...).
[1] https://www.mediawiki.org/wiki/API:Delete
-- Legoktm
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata
Wikidata mailing list Wikidata@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata