Releases: lokal-profil/wikidata-stuff
0.5
This introduces no new functionality but drops all previously deprecated packages, modules, classes, functions and arguments.
If upgrading from a pre-0.4 release you are strongly recommended too **first upgrade to 0.4 ** and then clear out any deprecation warnings.
Note that the package name is now wikidatastuff
.
0.4
This introduces multiple breaking changes but has been designed to raise deprecation warnings for all of these making it easier to adapt code built on pre-0.4 releases.
To display the deprecation warnings run your script using the pywikibot -debug
flag (you must be making use of pywikibot.handleArgs()
) or add the -Wd
option to your python call.
The major changes are:
- Re-factor of the
WikidataStuff
class to makeStatement
,Qualifier
andReference
stand-alone classes. These were internal classes before. References to the old names no longer work but the deprecation messages point to the new schema. - Re-naming of all modules, classes, functions and function arguments to conform with PEP8. Usage of the old names works but raises a deprecation warning pointing to the new naming convention.
- Re-naming of the package, to conform with PEP8, from
wikidataStuff
towikidatastuff
. The old name still works but raises a deprecation warning. - Some functions moved from
wikidata_stuff
tohelpers
.
Minor/internal changes:
- Standardised string formatting
- Standardised line breaking
0.3.9
Uses the Reference
embedded in Statement
, if any, unless a ref
is explicitly provided to addNewClaim
.
Switches the mysql library from mysqlclient
toPyMySQL
.
0.3.8
Introduces the no_wdss
parameter for disabling WikidataStringSearch
0.3.7
Introduces PreviewItem
a module for generating a wikitext table preview of a single updated/created Wikidata item candidate.
Also:
- Raw output can now be gotten from select queries by adding
raw
tomake_select_wdqs_query()
- Local hashing of
wbRepesentation
has been dropped as this is now supported natively by pywikibot. You might have to update your version of pywikibot. - Added a helper function
convert_language_dict_to_json()
for converting language-string dictionaries to the required (json) format needed by Wikidata. - Allow the standard summary to be used also for the creation of new items.
- Extended README
0.3.6
Add a reference property to Statement
Adds the add_reference()
function to Statement
allowing a Reference
to be associated with the statement.
This also changes the hash
and the __repr__
of Statement
.
Also makes get_unit_q
more flexible by allowing powers to be either plain or raised (i.e. km2 or km²).
0.3.5
Make Statement
s hashable
Also add temporary hashing support for WbTypes (WbTime, WbQuantity, Coordinates etc.) until this is available through pywikibot proper.
0.3.4
Add functionality needed for comparison of Statement and Qualifier (but not References)
- Duplicate Qualifiers are no longer allowed in a Statement.
- The internal representation of Qualifiers in a Statement is now a set stored as
_quals
.quals
still returns a list. - The Pid used for a Qualifier may now also be an int.
__repr__
for Claim is now available anywhere in the WikidataStuff class
0.3.3
Introduce add_multiple_label_or_alias
and add_multiple_descriptions
were added to provide a mechanism for adding label+alias or descriptions in multiple languages in a single edit.
Also adds the possibility of providing both a singl name or a list of names (in a given language) to add_multiple_label_or_alias
/addLabelOrAlias
.
0.3.2
Added no_strip
parameter to helpers.fill_cache_wdqs()
which toggles the output from integers to full Qids.