This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 45 | ← | Archive 48 | Archive 49 | Archive 50 | Archive 51 | Archive 52 | → | Archive 55 |
As I write this,
Monkbot/task 19 has made some 40,000 edits. This morning, Editor
BhagyaMani reverted 40 of those edits most of which had the edit summary Ref iucn WAS already up to date
(I have fixed the bug that added
Sand cat to
Category:Taxobox binomials not recognized by IUCN). Editor BhagyaMani also left a
note on my talk page complaining that task 19 1) added obsolete parms like |volume= and |doi=; 2) removed the parm |author-link=; but 3) unnecessarily changed the ref name. 4) This ref and also the other one were already up to date.
I am addressing Editor BhagyaMani's complaints here because I believe that they deserve to be addressed by the community that uses {{
cite iucn}}
rather than by two editors having a discussion in the isolated backwater of a user talk page.
To address Editor BhagyaMani's complaints:
{{
cite iucn}}
parameters |volume=
and |doi=
are obsolete; are they? There is no discussion at
Template talk:Cite iucn about that. Perhaps Editor BhagyaMani can link to the discussion(s) where these parameters are determined to be obsolete.|author=
)<ref>
tag name=
attribute as a result of a comment here by Editor
Tom.Reding
which see and
my reply. The entire conversation is now
archived here.|access-date=
(
Tibetan fox). Many of those restored references that do have |access-date=
are two and three years old (
Hairy-nosed otter). When task 19 inspects the reference in {{
speciesbox}}
and {{
taxobox}}
parameter |status_ref=
, it looks for a <ref>
tag with a dated name=
attribute or failing that, for |access-date=
. Task/19 will confirm/update the {{speciesbox}}
and {{taxobox}}
template parameters |status=
, |status_system=
, and |status_ref=
when:
|status_ref=
has a dated <ref>
tag where the date is older than six months; OR|status_ref=
has |access-date=
where the date is older than six months; OR
|status_ref=
does not have a dated <ref>
tag, AND|status_ref=
does not have |access-date=
already up to date? When the
|access-date=
was two or three years ago, how is an editor to know that that reference is already up to date? The IUCN database is not static, we should not treat is as a static thing.
Comments welcome. — Trappist the monk ( talk) 15:33, 19 November 2021 (UTC)
|doi=
is not needed as the link is generated automatically through the page number. And I recall that Tom.Reading ran an update of lots of pages removing the |doi=
some time ago. –
BhagyaMani (
talk) 17:24, 19 November 2021 (UTC)
{{
cite iucn}}
builds a url for |title=
, but... First
Module:Cite iucn looks at |url=
to see if there is a valid url there (where valid is defined as a 'new-form' url – these will eventually go away). When |url=
is missing, empty, or has an 'old-form' url, Module:Cite iucn will build a url from the taxon/assessment IDs found in |page=
(first choice) or |doi=
(second choice).|doi=
in {{cite iucn}}
has been deprecated and should no longer be supported, you should be able to point me to the discussion that reached that consensus. With that, I will modify task 19 and {{
make cite iucn}}
to skip the doi url found in IUCN taxon citations and further, modify task 19 to remove |doi=
from existing references and modify {{cite iucn}}
to remove support for |doi=
. Until such time as I can read the consensus discussion, task 19 will continue to include |doi=
when it updates IUCN references, {{make cite iucn}}
will continue to translate the doi url from IUCN taxon citations, and {{cite iucn}}
will continue to support |doi=
.iucnto
"iucn+a date". Without a date in ref name is easier to update manually. – BhagyaMani ( talk) 19:05, 19 November 2021 (UTC)
The broader discussion at Wikipedia:Categories for discussion/Log/2021 November 20#Works by people not currently known to be notable may be of interest to this WikiProject. It is related to a previous discussion by this WikiProject, now located at Wikipedia talk:WikiProject Tree of Life/Archive 49#Bulk category creation. UnitedStatesian ( talk) 23:36, 21 November 2021 (UTC)
Hello! I'm an admin at the Albanian Wikipedia and lately I went to update some of our infoboxes related to taxonomy to make them up to date with their EnWiki homologues. 2 of my changes (taxobox and speciesbox) were reverted to an old state by an editor saying that those changes introduced errors in our articles and that the automatic system EnWiki uses can't be used in SqWiki because of the lack of other templates, the sheer number of which is gigantic. This surprised me a bit and made me start reading more about the said system here which was a rabbit hole on its own. I have a very naive question: Why is it that we're using templates in a very unusual manner instead of devising a better overall mechanism that deals specifically with this? What that mechanism would be? I don't know (hence why the question is naive) but my first reaction for this was that it should have been sorted out in Phabricator, not with modules here. Having said that, can someone find the time to explain very-very shortly to me how does everything work? I read a lot of documentation pages and so I have the general idea but I rarely work with articles per se personally, mostly dealing with the technical part, so it was still a bit confusing to me. I totally understand if the whole thing can't really be TL;DR-ed. And lastly, is there any guide on internationalization and localization in regard to this system? As I said, the editor who reverted me did mention a lot of missing templates but didn't really specify which, being that he doesn't really deal much with the technical aspect of the project. At this point, I'm confused as to what I should be importing and updating to not break anything. Any kind of help would be appreciated - Klein Muçi ( talk) 08:32, 13 September 2021 (UTC)
Taxonomy templates
Taxobox templates
"
, †
, and ×
) would all go into a single 'non-alpha' category. Yeah, editors will certainly want to add new taxa to a data module. That might be most easily accomplished by writing a template, perhaps {{
add new taxon}}
, which would take as input the same parameters as any of the current taxonomy templates. A lua module would error-check the provided inputs, check that the new taxon isn't already in the appropriate data module, add the new entry to the data module in the proper format, sort, and return a wikitext version of the data table that the editor would then copy/paste over the old version. This is much like creating a {{
cite iucn}}
template with {{
make cite iucn}}
.a modification to Lua allowing it to access templates on other Wikipedias using the title library.It's possible to fetch data tables from commons (
mw.ext.data()
. That might be a good solution so long as some sort of tool is available to edit/create entries in the data table. The data are then available to all wikis without en.wiki violating the no-wikidata rule (if there is such a thing – aren't there several infoboxen that draw their contents from wikidata?).'Felis'={['rank'='genus', 'link'='Felis', 'parent'='Felinae'}
getting the data right at wikidata. There are three main reasons:
rank='genus'
instead of ['rank']='genus'
. Reducing 12-16 characters per entry adds up over 100,000 characters in the larger files. You could go further and not use keys at all for the properties:
'Felis'='genus', 'Felis', 'Felinae', "", "", ""
'Felis'
will only ever return 'genus'
. The value assigned to 'Felis'
needs to be a table so that rank, link, parent, etc can be fetched. I thought about doing more-or-less what you suggest but I wanted the lua tables to be as 'user-friendly' as possible because you wrote above You want the data to be editable by any editor in most cases. I may still shift to something similar:
'Felis'={'genus', 'Felis', 'Felinae'}
'Felis'={'genus', 'Felis', 'Felinae', nil, nil, 'reference'}
'Felis'= { rank='genus', link='Felis', parent='Felinae', refs='citation' }
rank=link=parent > refs > extinct > same_as
[Edit: the actual numbers are: rank=9417, link=9415, parent=9417, extinct=1396, same_as =5, refs =2926] —
Jts1882 |
talk 16:39, 11 October 2021 (UTC)
same as
, i.e. without the underscore, can also be used.)|always_display=
might also have an alias |always display=
. At the time I was more interested in getting the templates translated accurately than in the actual prettiness of the taxon tables so I simply copied the parameter names from the template, wrapped them, (['...']
), and added them to the new lua table in the order that they appeared in the source template. The next iteration of the script that reads the template can better organize the lua tables.|\'\'Rubus\'\' subg. \'\'Chamaemorus\'\'
. No idea if that helps in the byte section though.
Gonnym (
talk) 22:45, 13 October 2021 (UTC)
\'
. P is 1,676,975 bytes of which 1490 is a trivial amount. If it gets to the point that we have to worry about such a small number of bytes, this experiment is doomed.https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=
, with only the |search_value=
number being different. Maybe the ref can store only that number and in the main module handle the ref? That source would be bigger if it used the complete citation information.
Gonnym (
talk) 13:32, 14 October 2021 (UTC)
taxomap_t
and the function module_select()
in
Module:Sandbox/trappist the monk/taxonomy use the taxon name to select a module to load for that taxon.errors detected by script when converting taxonomy templates to lua data 2021-10-13/14
|
---|
|
{{
plainlist}}
and the unordered-list markup (*
) should go away. If you want two citations to appear on separate lines in the 'Taxonomic references' line of the template doc, put them on separate lines in the template code and that is all you need do.|pages={{#if:||312–529}}
doesn't make any sense. Essentially it means:
<nothing>
evaluates to <something>
then return <nothing>
else return 312–529
<nothing>
does not evaluate to <something>
, it returns 312–529
. Who thought that such a construct was a good idea? For this template, it should simply be |pages=312–529
.@
Trappist the monk: it's been a useful clean up, so thanks! As the citation(s) given by |refs=
aren't used by the system – and can't be, even if complete, for all the reasons that references in templates are problematic – I think it doesn't matter whether a limited amount of presentation code appears (e.g. list mark up, br tags), but I agree that templates, like {{
plainlist}}
shouldn't. The purpose of the citation(s) is to show other editors what classification system was used; they are woefully incomplete.
It's interesting, although not entirely surprising, how many creators of taxonomy templates left the HTML comment saying "don't use ref tags", and then did just that. Ideally the interface to the data currently in taxonomy templates would be done in the standard way for web interfaces to databases: generate a dynamic page from a backend, use Javascript to check the entries locally as far as possible, post to the backend for further checking and storage. This would bypass a lot of the current checking, which relies on regular monitoring of error-tracking categories, followed by manual corrections. Peter coxhead ( talk) 06:33, 16 October 2021 (UTC)
l.doShowRefs()
at
line 396: elseif refs:match ('\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127') then
-- choose a better error message
-- and add an error category
error ('has stripmarker')
error()
function to format it and add a category to track these kinds of errors.errors detected by script when converting taxonomy templates to lua data 2021-10-22
|
---|
|
extinct=no
. —
Jts1882 |
talk 16:50, 23 October 2021 (UTC)
|exinct=
(empty or omitted) and explicit |extinct=no
or explicit |extinct=false
; see
Template:Automatic taxobox/editintro/preload and
Wikipedia:Automated taxobox system/taxonomy templates#extinct.no
/false
and explicitly stated no
/false
. If the extinction status of a taxon is not definitively yes
/true
and not definitively no
/false
, that distinction should be made by the use of a non-boolean keyword to indicate something other than extinct/not extinct: unknown
, dubious
, disputed
or some-such and the chosen keyword(s) and definitions should be specified in the template documentation.|extinct=
then use of a non-boolean keyword and an appropriate citation in |refs=
that supports that keyword choice is better than assuming emphasis where emphasis may or may not exist.|extinct=no
, |extinct=false
, |always_display=no
, and |always_display=false
because the template documentation does not distinguish between default and explicit and because it cannot 'know' that an explicit no
/false
is actually there as emphasis – I suspect that the same applies to most humans, even those who are expert in the intricacies of the automated taxobox system.|refs=
?Although converting taxonomy templates to entries in Lua tables is an interesting intellectual exercise, I have serious reservations about it ever being deployed. It solves one issue (moving taxonomy data to another language wiki) at the expense of creating problems that I see as major.
Peter coxhead ( talk) 09:05, 15 October 2021 (UTC)
issuesbut I have given some thought to them and will continue to do so.
{{
make cite iucn}}
that editors could add to
Module:New taxon data (or some such). A sufficiently clever template could read that module as wikitext, insert the new taxon data and then render the table from the new data module as wikitext so that editors simply replace to current module content with the new via copy/paste. When the number of entries in the new data module exceeds some threshold, its contents could be swept into the appropriate data modules by awb or somesuch. The new data module would always be consulted before each main data module is consulted when walking the taxon tree. We might also use it to mark 'deleted' taxa data by supporting 'obsolete taxon name'={deleted=true},
. The next time the taxa data are swept into the main data modules, the sweeping script would know to remove the deleted taxa data. Attempts to use taxa data that has been marked for deletion would cause an error message.{{#property:P...|from=Q...}}
so instead of {{#property:P105|from=Q228283}}
to get the taxon rank (genus) we would have a separate set of qids and perhaps some additional dedicated properties (
taxon name (P225),
taxon rank (P105),
parent taxon (P171) already exist) so we'd need P numbers for taxon link (and some mechanism to link to language appropriate targets?), extinct, always_display, refs, and same_as. We'd want a new qid for use with
instance of (P31) to identify autotaxobox taxa. No doubt, no doubt, there is stuff I haven't thought about here ...mw.wikibase.getSitelink ('Q228283', mw.getContentLanguage():getCode() .. 'wiki')
English Wikipedia Taxoboxbut rather, to make this 'All-Wikipedia Taxobox' (for all Wikipedias), then, to me, such a qualifier doesn't seem appropriate. And, we would also have to add properties to the generic taxa qids for stuff that the generic items don't need: extinct, always_display, refs, and same_as (to support ~/? and ~/skip). Isn't it better to create these data things cleanly without trying to shoehorn them into the existing data structure?
getTaxonInfoItem()
would need to change?The alternative is to make editing the taxonomy modules a restricted task, but this goes against the ethos of Wikipedia- being able to edit and see your changes at the same moment is not the same as not being able to edit at all. There are a great many of pages with restricted access for any number of reasons.
I monitor the main error-tracking categories for taxoboxes and taxonomy templates almost every day, and often more than once a day. It's rare for a day to pass without my needing to fix errors; some are trivial, others not- if the process of adding and modifying an entry revolves around an edit request (which can be created with some kind of preload template to make it user-friendly), then both above points are handled. Anyone can create or modify an entry and instead of going around fixing issues, those same issues can be handled before being deployed. Gonnym ( talk) 08:35, 21 October 2021 (UTC)
As it might help with portability to other wikipedias I've added the options to use data from Wikidata and the module data pages to the prototype Lua taxonbox, {{ biota infobox}} as an experiment.
{{
automatic taxobox}} |
{{
biota infobox|db=templates}} |
{{
biota infobox|db=module}} |
{{
biota infobox|db=wikidata}}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
More examples, including species and subspecies can be found at User:Jts1882/taxobox. More taxoboxes with Wikidata can be found at User:Jts1882/taxobox/Wikidata.
The Wikidata versions are functional if just the major ranks are required, but lack flexibility. The big issue is what to do when multiple parents are presented. One can opt to take the first or last parent with quite different results. The following tables show an example (for Passer) selecting first or last parent when multiple parents are entered. The automated taxonomy version is shown to the right.
Using first parent when multiple parents on Wikidata | Using last parent when multiple parents on Wikidata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
The main difference is the parent for Aves, which can be Tetrapoda or Paraves. The latter then gets a much more detailed taxonomy with all the archosaur classification. The first mimics the skip templates, but unfortunately there is no useful pattern to how the parents are entered on Wikidata, apart from first come first served.
Anyway, I thought I'd share the results of my experiments in case any one is interested. — Jts1882 | talk 15:33, 23 November 2021 (UTC)
|db=module
– pencil links to the template which for the module data won't exist, right?Because one of the big portability problems that I can see (beyond the sheer number of taxonomy templates and how to edit the data) is that the value assigned to |link=
is the name of an article at en.wiki. Editors at other-language wikis want the taxonomy templates to link to articles on their local wiki. I've been wondering of late if one thing that might be done is to replace the article name in the taxonomy templates' |link=
parameter with its wikidata qid. Then, we add a snippet of code to
l.makeLink()
just ahead of the current
line 512 that might look something like this:
if linkTarget:match ('^Q%d+$') then -- is |link= holding a wikidata qid?
linkTarget = mw.wikibase.getSitelink (linkTarget, mw.getContentLanguage():getCode() .. 'wiki') or ''; -- get this wiki's article title; empty string else; getSitelink() returns nil when no sitelink for language
end
When there is no qid or qid doesn't have an article title for the local language, use whatever is in |link=
or in the positional parameter for linking to the target (as l.makeLink()
does already).
A quick hunt through the
documentation does not show how to get the qid that matches an en.wiki article title... A bot can do it by reading the rendered en.wiki article html from which the qid can be extracted ("wgWikibaseItemId":"Q25314"
from
Flowering plant for example).
— Trappist the monk ( talk) 17:55, 23 November 2021 (UTC)
local qid = mw.wikibase.getEntityIdForTitle(link, 'enwiki') -- qid referred to by link in module data
local otherWikipediaPage = mw.wikibase.getSitelink(qid) -- page in local wikipedia
{{#invoke:Sandbox/trappist_the_monk/taxonomy|qids_get|<list selector>|<taxonomy module suffix>}}
<list selector>
– a keyword that selects one of three lists to render:
no links
– lists taxon names in the data module that do not have link values; these are most commonly taxon names that use |same_as=
to redirect to another nameno qids
– lists links that do not have qids and the associated taxon name; items in this list appear when there is no article matching the link name or when the link name exists as a redirect to another articleqids
– lists links, their associated qid, and their associated taxon name<taxonomy module suffix>
– the suffix that identifies the lua taxonomy data module of interest: Q
for
Module:Sandbox/trappist the monk/taxonomy Q{{#invoke:Sandbox/trappist_the_monk/taxonomy|qids_get|no qids|Q}}
failed to load: Module:Sandbox/trappist_the_monk/taxonomy_Q
'Ficus subg. Ficus'={rank='subgenus', parent='Ficus', link='Ficus#Subgenus Ficus|\'\'F.\'\' subg. \'\'Ficus\'\''},
|link=Q59798#Subgenus Ficus|''F.'' subg. ''Ficus''
This is an archive of past discussions. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 45 | ← | Archive 48 | Archive 49 | Archive 50 | Archive 51 | Archive 52 | → | Archive 55 |
As I write this,
Monkbot/task 19 has made some 40,000 edits. This morning, Editor
BhagyaMani reverted 40 of those edits most of which had the edit summary Ref iucn WAS already up to date
(I have fixed the bug that added
Sand cat to
Category:Taxobox binomials not recognized by IUCN). Editor BhagyaMani also left a
note on my talk page complaining that task 19 1) added obsolete parms like |volume= and |doi=; 2) removed the parm |author-link=; but 3) unnecessarily changed the ref name. 4) This ref and also the other one were already up to date.
I am addressing Editor BhagyaMani's complaints here because I believe that they deserve to be addressed by the community that uses {{
cite iucn}}
rather than by two editors having a discussion in the isolated backwater of a user talk page.
To address Editor BhagyaMani's complaints:
{{
cite iucn}}
parameters |volume=
and |doi=
are obsolete; are they? There is no discussion at
Template talk:Cite iucn about that. Perhaps Editor BhagyaMani can link to the discussion(s) where these parameters are determined to be obsolete.|author=
)<ref>
tag name=
attribute as a result of a comment here by Editor
Tom.Reding
which see and
my reply. The entire conversation is now
archived here.|access-date=
(
Tibetan fox). Many of those restored references that do have |access-date=
are two and three years old (
Hairy-nosed otter). When task 19 inspects the reference in {{
speciesbox}}
and {{
taxobox}}
parameter |status_ref=
, it looks for a <ref>
tag with a dated name=
attribute or failing that, for |access-date=
. Task/19 will confirm/update the {{speciesbox}}
and {{taxobox}}
template parameters |status=
, |status_system=
, and |status_ref=
when:
|status_ref=
has a dated <ref>
tag where the date is older than six months; OR|status_ref=
has |access-date=
where the date is older than six months; OR
|status_ref=
does not have a dated <ref>
tag, AND|status_ref=
does not have |access-date=
already up to date? When the
|access-date=
was two or three years ago, how is an editor to know that that reference is already up to date? The IUCN database is not static, we should not treat is as a static thing.
Comments welcome. — Trappist the monk ( talk) 15:33, 19 November 2021 (UTC)
|doi=
is not needed as the link is generated automatically through the page number. And I recall that Tom.Reading ran an update of lots of pages removing the |doi=
some time ago. –
BhagyaMani (
talk) 17:24, 19 November 2021 (UTC)
{{
cite iucn}}
builds a url for |title=
, but... First
Module:Cite iucn looks at |url=
to see if there is a valid url there (where valid is defined as a 'new-form' url – these will eventually go away). When |url=
is missing, empty, or has an 'old-form' url, Module:Cite iucn will build a url from the taxon/assessment IDs found in |page=
(first choice) or |doi=
(second choice).|doi=
in {{cite iucn}}
has been deprecated and should no longer be supported, you should be able to point me to the discussion that reached that consensus. With that, I will modify task 19 and {{
make cite iucn}}
to skip the doi url found in IUCN taxon citations and further, modify task 19 to remove |doi=
from existing references and modify {{cite iucn}}
to remove support for |doi=
. Until such time as I can read the consensus discussion, task 19 will continue to include |doi=
when it updates IUCN references, {{make cite iucn}}
will continue to translate the doi url from IUCN taxon citations, and {{cite iucn}}
will continue to support |doi=
.iucnto
"iucn+a date". Without a date in ref name is easier to update manually. – BhagyaMani ( talk) 19:05, 19 November 2021 (UTC)
The broader discussion at Wikipedia:Categories for discussion/Log/2021 November 20#Works by people not currently known to be notable may be of interest to this WikiProject. It is related to a previous discussion by this WikiProject, now located at Wikipedia talk:WikiProject Tree of Life/Archive 49#Bulk category creation. UnitedStatesian ( talk) 23:36, 21 November 2021 (UTC)
Hello! I'm an admin at the Albanian Wikipedia and lately I went to update some of our infoboxes related to taxonomy to make them up to date with their EnWiki homologues. 2 of my changes (taxobox and speciesbox) were reverted to an old state by an editor saying that those changes introduced errors in our articles and that the automatic system EnWiki uses can't be used in SqWiki because of the lack of other templates, the sheer number of which is gigantic. This surprised me a bit and made me start reading more about the said system here which was a rabbit hole on its own. I have a very naive question: Why is it that we're using templates in a very unusual manner instead of devising a better overall mechanism that deals specifically with this? What that mechanism would be? I don't know (hence why the question is naive) but my first reaction for this was that it should have been sorted out in Phabricator, not with modules here. Having said that, can someone find the time to explain very-very shortly to me how does everything work? I read a lot of documentation pages and so I have the general idea but I rarely work with articles per se personally, mostly dealing with the technical part, so it was still a bit confusing to me. I totally understand if the whole thing can't really be TL;DR-ed. And lastly, is there any guide on internationalization and localization in regard to this system? As I said, the editor who reverted me did mention a lot of missing templates but didn't really specify which, being that he doesn't really deal much with the technical aspect of the project. At this point, I'm confused as to what I should be importing and updating to not break anything. Any kind of help would be appreciated - Klein Muçi ( talk) 08:32, 13 September 2021 (UTC)
Taxonomy templates
Taxobox templates
"
, †
, and ×
) would all go into a single 'non-alpha' category. Yeah, editors will certainly want to add new taxa to a data module. That might be most easily accomplished by writing a template, perhaps {{
add new taxon}}
, which would take as input the same parameters as any of the current taxonomy templates. A lua module would error-check the provided inputs, check that the new taxon isn't already in the appropriate data module, add the new entry to the data module in the proper format, sort, and return a wikitext version of the data table that the editor would then copy/paste over the old version. This is much like creating a {{
cite iucn}}
template with {{
make cite iucn}}
.a modification to Lua allowing it to access templates on other Wikipedias using the title library.It's possible to fetch data tables from commons (
mw.ext.data()
. That might be a good solution so long as some sort of tool is available to edit/create entries in the data table. The data are then available to all wikis without en.wiki violating the no-wikidata rule (if there is such a thing – aren't there several infoboxen that draw their contents from wikidata?).'Felis'={['rank'='genus', 'link'='Felis', 'parent'='Felinae'}
getting the data right at wikidata. There are three main reasons:
rank='genus'
instead of ['rank']='genus'
. Reducing 12-16 characters per entry adds up over 100,000 characters in the larger files. You could go further and not use keys at all for the properties:
'Felis'='genus', 'Felis', 'Felinae', "", "", ""
'Felis'
will only ever return 'genus'
. The value assigned to 'Felis'
needs to be a table so that rank, link, parent, etc can be fetched. I thought about doing more-or-less what you suggest but I wanted the lua tables to be as 'user-friendly' as possible because you wrote above You want the data to be editable by any editor in most cases. I may still shift to something similar:
'Felis'={'genus', 'Felis', 'Felinae'}
'Felis'={'genus', 'Felis', 'Felinae', nil, nil, 'reference'}
'Felis'= { rank='genus', link='Felis', parent='Felinae', refs='citation' }
rank=link=parent > refs > extinct > same_as
[Edit: the actual numbers are: rank=9417, link=9415, parent=9417, extinct=1396, same_as =5, refs =2926] —
Jts1882 |
talk 16:39, 11 October 2021 (UTC)
same as
, i.e. without the underscore, can also be used.)|always_display=
might also have an alias |always display=
. At the time I was more interested in getting the templates translated accurately than in the actual prettiness of the taxon tables so I simply copied the parameter names from the template, wrapped them, (['...']
), and added them to the new lua table in the order that they appeared in the source template. The next iteration of the script that reads the template can better organize the lua tables.|\'\'Rubus\'\' subg. \'\'Chamaemorus\'\'
. No idea if that helps in the byte section though.
Gonnym (
talk) 22:45, 13 October 2021 (UTC)
\'
. P is 1,676,975 bytes of which 1490 is a trivial amount. If it gets to the point that we have to worry about such a small number of bytes, this experiment is doomed.https://www.itis.gov/servlet/SingleRpt/SingleRpt?search_topic=TSN&search_value=
, with only the |search_value=
number being different. Maybe the ref can store only that number and in the main module handle the ref? That source would be bigger if it used the complete citation information.
Gonnym (
talk) 13:32, 14 October 2021 (UTC)
taxomap_t
and the function module_select()
in
Module:Sandbox/trappist the monk/taxonomy use the taxon name to select a module to load for that taxon.errors detected by script when converting taxonomy templates to lua data 2021-10-13/14
|
---|
|
{{
plainlist}}
and the unordered-list markup (*
) should go away. If you want two citations to appear on separate lines in the 'Taxonomic references' line of the template doc, put them on separate lines in the template code and that is all you need do.|pages={{#if:||312–529}}
doesn't make any sense. Essentially it means:
<nothing>
evaluates to <something>
then return <nothing>
else return 312–529
<nothing>
does not evaluate to <something>
, it returns 312–529
. Who thought that such a construct was a good idea? For this template, it should simply be |pages=312–529
.@
Trappist the monk: it's been a useful clean up, so thanks! As the citation(s) given by |refs=
aren't used by the system – and can't be, even if complete, for all the reasons that references in templates are problematic – I think it doesn't matter whether a limited amount of presentation code appears (e.g. list mark up, br tags), but I agree that templates, like {{
plainlist}}
shouldn't. The purpose of the citation(s) is to show other editors what classification system was used; they are woefully incomplete.
It's interesting, although not entirely surprising, how many creators of taxonomy templates left the HTML comment saying "don't use ref tags", and then did just that. Ideally the interface to the data currently in taxonomy templates would be done in the standard way for web interfaces to databases: generate a dynamic page from a backend, use Javascript to check the entries locally as far as possible, post to the backend for further checking and storage. This would bypass a lot of the current checking, which relies on regular monitoring of error-tracking categories, followed by manual corrections. Peter coxhead ( talk) 06:33, 16 October 2021 (UTC)
l.doShowRefs()
at
line 396: elseif refs:match ('\127[^\127]*UNIQ%-%-(%a+)%-[%a%d]+%-QINU[^\127]*\127') then
-- choose a better error message
-- and add an error category
error ('has stripmarker')
error()
function to format it and add a category to track these kinds of errors.errors detected by script when converting taxonomy templates to lua data 2021-10-22
|
---|
|
extinct=no
. —
Jts1882 |
talk 16:50, 23 October 2021 (UTC)
|exinct=
(empty or omitted) and explicit |extinct=no
or explicit |extinct=false
; see
Template:Automatic taxobox/editintro/preload and
Wikipedia:Automated taxobox system/taxonomy templates#extinct.no
/false
and explicitly stated no
/false
. If the extinction status of a taxon is not definitively yes
/true
and not definitively no
/false
, that distinction should be made by the use of a non-boolean keyword to indicate something other than extinct/not extinct: unknown
, dubious
, disputed
or some-such and the chosen keyword(s) and definitions should be specified in the template documentation.|extinct=
then use of a non-boolean keyword and an appropriate citation in |refs=
that supports that keyword choice is better than assuming emphasis where emphasis may or may not exist.|extinct=no
, |extinct=false
, |always_display=no
, and |always_display=false
because the template documentation does not distinguish between default and explicit and because it cannot 'know' that an explicit no
/false
is actually there as emphasis – I suspect that the same applies to most humans, even those who are expert in the intricacies of the automated taxobox system.|refs=
?Although converting taxonomy templates to entries in Lua tables is an interesting intellectual exercise, I have serious reservations about it ever being deployed. It solves one issue (moving taxonomy data to another language wiki) at the expense of creating problems that I see as major.
Peter coxhead ( talk) 09:05, 15 October 2021 (UTC)
issuesbut I have given some thought to them and will continue to do so.
{{
make cite iucn}}
that editors could add to
Module:New taxon data (or some such). A sufficiently clever template could read that module as wikitext, insert the new taxon data and then render the table from the new data module as wikitext so that editors simply replace to current module content with the new via copy/paste. When the number of entries in the new data module exceeds some threshold, its contents could be swept into the appropriate data modules by awb or somesuch. The new data module would always be consulted before each main data module is consulted when walking the taxon tree. We might also use it to mark 'deleted' taxa data by supporting 'obsolete taxon name'={deleted=true},
. The next time the taxa data are swept into the main data modules, the sweeping script would know to remove the deleted taxa data. Attempts to use taxa data that has been marked for deletion would cause an error message.{{#property:P...|from=Q...}}
so instead of {{#property:P105|from=Q228283}}
to get the taxon rank (genus) we would have a separate set of qids and perhaps some additional dedicated properties (
taxon name (P225),
taxon rank (P105),
parent taxon (P171) already exist) so we'd need P numbers for taxon link (and some mechanism to link to language appropriate targets?), extinct, always_display, refs, and same_as. We'd want a new qid for use with
instance of (P31) to identify autotaxobox taxa. No doubt, no doubt, there is stuff I haven't thought about here ...mw.wikibase.getSitelink ('Q228283', mw.getContentLanguage():getCode() .. 'wiki')
English Wikipedia Taxoboxbut rather, to make this 'All-Wikipedia Taxobox' (for all Wikipedias), then, to me, such a qualifier doesn't seem appropriate. And, we would also have to add properties to the generic taxa qids for stuff that the generic items don't need: extinct, always_display, refs, and same_as (to support ~/? and ~/skip). Isn't it better to create these data things cleanly without trying to shoehorn them into the existing data structure?
getTaxonInfoItem()
would need to change?The alternative is to make editing the taxonomy modules a restricted task, but this goes against the ethos of Wikipedia- being able to edit and see your changes at the same moment is not the same as not being able to edit at all. There are a great many of pages with restricted access for any number of reasons.
I monitor the main error-tracking categories for taxoboxes and taxonomy templates almost every day, and often more than once a day. It's rare for a day to pass without my needing to fix errors; some are trivial, others not- if the process of adding and modifying an entry revolves around an edit request (which can be created with some kind of preload template to make it user-friendly), then both above points are handled. Anyone can create or modify an entry and instead of going around fixing issues, those same issues can be handled before being deployed. Gonnym ( talk) 08:35, 21 October 2021 (UTC)
As it might help with portability to other wikipedias I've added the options to use data from Wikidata and the module data pages to the prototype Lua taxonbox, {{ biota infobox}} as an experiment.
{{
automatic taxobox}} |
{{
biota infobox|db=templates}} |
{{
biota infobox|db=module}} |
{{
biota infobox|db=wikidata}}
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
|
|
More examples, including species and subspecies can be found at User:Jts1882/taxobox. More taxoboxes with Wikidata can be found at User:Jts1882/taxobox/Wikidata.
The Wikidata versions are functional if just the major ranks are required, but lack flexibility. The big issue is what to do when multiple parents are presented. One can opt to take the first or last parent with quite different results. The following tables show an example (for Passer) selecting first or last parent when multiple parents are entered. The automated taxonomy version is shown to the right.
Using first parent when multiple parents on Wikidata | Using last parent when multiple parents on Wikidata | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
The main difference is the parent for Aves, which can be Tetrapoda or Paraves. The latter then gets a much more detailed taxonomy with all the archosaur classification. The first mimics the skip templates, but unfortunately there is no useful pattern to how the parents are entered on Wikidata, apart from first come first served.
Anyway, I thought I'd share the results of my experiments in case any one is interested. — Jts1882 | talk 15:33, 23 November 2021 (UTC)
|db=module
– pencil links to the template which for the module data won't exist, right?Because one of the big portability problems that I can see (beyond the sheer number of taxonomy templates and how to edit the data) is that the value assigned to |link=
is the name of an article at en.wiki. Editors at other-language wikis want the taxonomy templates to link to articles on their local wiki. I've been wondering of late if one thing that might be done is to replace the article name in the taxonomy templates' |link=
parameter with its wikidata qid. Then, we add a snippet of code to
l.makeLink()
just ahead of the current
line 512 that might look something like this:
if linkTarget:match ('^Q%d+$') then -- is |link= holding a wikidata qid?
linkTarget = mw.wikibase.getSitelink (linkTarget, mw.getContentLanguage():getCode() .. 'wiki') or ''; -- get this wiki's article title; empty string else; getSitelink() returns nil when no sitelink for language
end
When there is no qid or qid doesn't have an article title for the local language, use whatever is in |link=
or in the positional parameter for linking to the target (as l.makeLink()
does already).
A quick hunt through the
documentation does not show how to get the qid that matches an en.wiki article title... A bot can do it by reading the rendered en.wiki article html from which the qid can be extracted ("wgWikibaseItemId":"Q25314"
from
Flowering plant for example).
— Trappist the monk ( talk) 17:55, 23 November 2021 (UTC)
local qid = mw.wikibase.getEntityIdForTitle(link, 'enwiki') -- qid referred to by link in module data
local otherWikipediaPage = mw.wikibase.getSitelink(qid) -- page in local wikipedia
{{#invoke:Sandbox/trappist_the_monk/taxonomy|qids_get|<list selector>|<taxonomy module suffix>}}
<list selector>
– a keyword that selects one of three lists to render:
no links
– lists taxon names in the data module that do not have link values; these are most commonly taxon names that use |same_as=
to redirect to another nameno qids
– lists links that do not have qids and the associated taxon name; items in this list appear when there is no article matching the link name or when the link name exists as a redirect to another articleqids
– lists links, their associated qid, and their associated taxon name<taxonomy module suffix>
– the suffix that identifies the lua taxonomy data module of interest: Q
for
Module:Sandbox/trappist the monk/taxonomy Q{{#invoke:Sandbox/trappist_the_monk/taxonomy|qids_get|no qids|Q}}
failed to load: Module:Sandbox/trappist_the_monk/taxonomy_Q
'Ficus subg. Ficus'={rank='subgenus', parent='Ficus', link='Ficus#Subgenus Ficus|\'\'F.\'\' subg. \'\'Ficus\'\''},
|link=Q59798#Subgenus Ficus|''F.'' subg. ''Ficus''