Wikipedia:Automated taxobox system/notes: Difference between revisions
No edit summary Tag: Reverted |
m Reverted edits by 2001:5B0:9280:1980:A001:6E38:C2C3:9625 (talk): nonconstructive edits (HG) (3.4.12) |
||
Line 1: | Line 1: | ||
{{Autotaxobox system navbox}} |
|||
==Notes for "old hands"== |
==Notes for "old hands"== |
||
Major changes to the system were made from the middle of 2016 onwards. There were two motivations: |
Major changes to the automated taxobox system were made from the middle of 2016 onwards. There were two motivations: |
||
#to remove expansion depth overflows, caused by the constant addition of clades to some taxonomic hierarchies, especially dinosaur taxa |
|||
#to clarify and simplify the system, both for maintaining editors and for editors creating and editing taxonomy templates. |
|||
===Use of Lua=== |
===Use of Lua=== |
||
All traversals of the taxonomic hierarchy are now coded in Lua, in [[Module: |
All traversals of the taxonomic hierarchy are now coded in Lua, in [[Module:Autotaxobox]]. This completely removes the need for clever tricks to get round the absence of iteration and recursion in the template language, as well as expansion depth issues caused by these tricks. Hierarchies with {{#invoke:Autotaxobox|getMaxSearchLevels}} levels can now be handled without problems (a figure that can probably be increased). |
||
See [[Wikipedia: |
See [[Wikipedia:Automated_taxobox_system/map#Detailed_map|Detailed map]] for a map of the code as it is now. |
||
===Taxonomy |
===Taxonomy templates simplified=== |
||
" |
"Duplicate" templates – templates with essentially the same function but different names – were previously needed to avoid loops forbidden in the template language. These are no longer necessary. This allows a major simplification to taxonomy templates. Previously, a variant taxonomy template that obtained some of its information from another taxonomy template (the "same as" taxonomy template) had to contain a different internal template (such as <code>Taxon variant</code> rather than <code>Don't edit this line</code>). |
||
(Had both the variant and "same as" taxonomy templates contained <code>Don't edit this line <nowiki>{{{machine code|}}}</nowiki></code>, then to obtain, for example, the value of <code>parent</code> for a variant taxonomy template would have involved the variant taxonomy template calling <code>Don't edit this line parent</code>, which then called <code>Don't edit this line parent</code> again, this time from the "same as" taxonomy template. This would have created a loop, which is forbidden. By converting to Lua, the loop problem has been avoided.) |
(Had both the variant and "same as" taxonomy templates contained <code>Don't edit this line <nowiki>{{{machine code|}}}</nowiki></code>, then to obtain, for example, the value of <code>parent</code> for a variant taxonomy template would have involved the variant taxonomy template calling <code>Don't edit this line parent</code>, which then called <code>Don't edit this line parent</code> again, this time from the "same as" taxonomy template. This would have created a loop, which is forbidden. By converting to Lua, the loop problem has been avoided.) |
||
<em>All</em> taxonomy |
*<em>All</em> taxonomy templates should now begin |
||
:<code><nowiki>{{Don't edit this line {{{machine code|}}}</nowiki></code> |
:<code><nowiki>{{Don't edit this line {{{machine code|}}}</nowiki></code> |
||
<em>Any</em> taxonomy |
*<em>Any</em> taxonomy template can contain {{para|same_as}}; any information missing from that taxonomy template (i.e. blank) will be looked up in the "same as" taxonomy template. This only works once, i.e. the "same as" taxonomy template must not contain a {{para|same_as}}. |
||
:Hence /skip and /? templates are now coded using <code>Don't edit this line</code> and <code>same_as</code>. |
:Hence /skip and /? templates are now coded using <code>Don't edit this line</code> and <code>same_as</code>. |
||
The <code>|{{{1}}}</code> in a taxonomy |
*The <code>|{{{1}}}</code> bit in a taxonomy template has long been redundant to the use of the <code>machine code</code> parameter, but until late 2016 was still used in a few places. These uses have all been removed, so this <code>|{{{1}}}</code> is no longer needed, and a bot has removed all occurrences from taxonomy templates. |
||
[[Category:Wikipedia automated taxobox documentation]] |
[[Category:Wikipedia automated taxobox documentation]] |
||
07:14, 7 January 2024 (UTC)07:14, 7 January 2024 (UTC)07:14, 7 January 2024 (UTC)~ |
Revision as of 09:53, 7 January 2024
Taxonomy templates
Taxobox templates
- Which should be used?
- Changing the taxa displayed
- Convert a taxobox to an automated taxobox
- Glossary of automated taxobox parameters
- Automatic taxobox – mainly for genera and higher taxa
- Speciesbox – for a species
- Subspeciesbox – for an animal subspecies
- Infraspeciesbox – for a plant subspecies or variety
- Hybridbox – for an animal hybrid within a genus
- Ichnobox – for a trace fossil
- Oobox – for a fossil egg
- Virusbox – for viruses and non-cellular life
- Paraphyletic group – for concepts that do not correspond to a monophyletic clade
- Population taxobox - for notable populations of subspecies of animals
Notes for "old hands"
Major changes to the automated taxobox system were made from the middle of 2016 onwards. There were two motivations:
- to remove expansion depth overflows, caused by the constant addition of clades to some taxonomic hierarchies, especially dinosaur taxa
- to clarify and simplify the system, both for maintaining editors and for editors creating and editing taxonomy templates.
Use of Lua
All traversals of the taxonomic hierarchy are now coded in Lua, in Module:Autotaxobox. This completely removes the need for clever tricks to get round the absence of iteration and recursion in the template language, as well as expansion depth issues caused by these tricks. Hierarchies with 100 levels can now be handled without problems (a figure that can probably be increased).
See Detailed map for a map of the code as it is now.
Taxonomy templates simplified
"Duplicate" templates – templates with essentially the same function but different names – were previously needed to avoid loops forbidden in the template language. These are no longer necessary. This allows a major simplification to taxonomy templates. Previously, a variant taxonomy template that obtained some of its information from another taxonomy template (the "same as" taxonomy template) had to contain a different internal template (such as Taxon variant
rather than Don't edit this line
).
(Had both the variant and "same as" taxonomy templates contained Don't edit this line {{{machine code|}}}
, then to obtain, for example, the value of parent
for a variant taxonomy template would have involved the variant taxonomy template calling Don't edit this line parent
, which then called Don't edit this line parent
again, this time from the "same as" taxonomy template. This would have created a loop, which is forbidden. By converting to Lua, the loop problem has been avoided.)
- All taxonomy templates should now begin
{{Don't edit this line {{{machine code|}}}
- Any taxonomy template can contain
|same_as=
; any information missing from that taxonomy template (i.e. blank) will be looked up in the "same as" taxonomy template. This only works once, i.e. the "same as" taxonomy template must not contain a|same_as=
.
- Hence /skip and /? templates are now coded using
Don't edit this line
andsame_as
.
- The
|{{{1}}}
bit in a taxonomy template has long been redundant to the use of themachine code
parameter, but until late 2016 was still used in a few places. These uses have all been removed, so this|{{{1}}}
is no longer needed, and a bot has removed all occurrences from taxonomy templates.