Difference between revisions of "Template:Chembox parametercheck/test"

From blackwiki
Jump to navigation Jump to search
imported>DePiep
imported>DePiep
Line 1: Line 1:
needed{{collapsible list
+
{{collapsible list
 
| title      = Test: categories (identifiers)
 
| title      = Test: categories (identifiers)
 
| bullets    = yes
 
| bullets    = yes
Line 20: Line 20:
 
|<!-- multiple IDs. Has indexes? -->{{#ifexpr:{{{_countIndex_label|-1}}}<=0
 
|<!-- multiple IDs. Has indexes? -->{{#ifexpr:{{{_countIndex_label|-1}}}<=0
 
|[[:Category:Multiple chemicals in an infobox that need indexing|Label_indexes needed]]
 
|[[:Category:Multiple chemicals in an infobox that need indexing|Label_indexes needed]]
|<!-- no need, no cat -->}}
+
|<!-- no need, no cat (cat:chemicals using indexlabels) -->}}<!--
  
{{#switch:{{#invoke:math|max|-1 |{{{_countCASNo|0}}} |{{{_countPubChemCID|0}}}
+
NONE: Options 'none'
|{{{_countChemSpiderID|0}}} |{{{_countChEBI|0}}} |{{{_countInChI|0}}} |{{{_countInChIKey|0}}} |{{{_countSMILES|0}}} }}
 
 
 
}}<!--
 
 
<!-- now: option 'none' only checked for main params (not the indexed 1-5 ones), for now
 
<!-- now: option 'none' only checked for main params (not the indexed 1-5 ones), for now
 
-->|5={{#if:{{{_hasCASnone|}}} |[[:Category:Chemicals that do not have a CAS registry number assigned]] }}<!--
 
-->|5={{#if:{{{_hasCASnone|}}} |[[:Category:Chemicals that do not have a CAS registry number assigned]] }}<!--
Line 31: Line 28:
 
-->|7={{#if:{{{_hasChemSpiderIDnone|}}} |[[:Category:Chemicals that do not have a ChemSpider ID assigned]] }}<!--
 
-->|7={{#if:{{{_hasChemSpiderIDnone|}}} |[[:Category:Chemicals that do not have a ChemSpider ID assigned]] }}<!--
  
 +
CAS NUMBER
 
-->|10={{#switch:{{{_countCASNo|-1}}}
 
-->|10={{#switch:{{{_countCASNo|-1}}}
 
|0=[[:Category:Chemical articles without CAS registry number]]
 
|0=[[:Category:Chemical articles without CAS registry number]]
Line 41: Line 39:
 
|#default=<!-- other/err = no tracking -->
 
|#default=<!-- other/err = no tracking -->
 
}}<!--
 
}}<!--
 +
 +
PUBCHEM
 
-->|11={{#switch:{{{_countPubChemCID|-1}}}
 
-->|11={{#switch:{{{_countPubChemCID|-1}}}
 
|0=[[:Category:Chemicals without a PubChem CID]]<!-- new. drugbox to follow. Mar 2017 -->
 
|0=[[:Category:Chemicals without a PubChem CID]]<!-- new. drugbox to follow. Mar 2017 -->
Line 52: Line 52:
 
}}<!--
 
}}<!--
  
 +
CHEBI
 
-->|12={{#switch:{{{_countChEBI|-1}}}
 
-->|12={{#switch:{{{_countChEBI|-1}}}
 
|0|1=
 
|0|1=
Line 62: Line 63:
 
}}<!--
 
}}<!--
  
 +
INCHI (skipped: StdInChI)
 
-->|13={{#switch:{{{_countInChI|-1}}}
 
-->|13={{#switch:{{{_countInChI|-1}}}
 
|0=[[:Category:Articles without InChI source]]
 
|0=[[:Category:Articles without InChI source]]
Line 74: Line 76:
 
  todo: check/compare with number of InChIKeys/use max.
 
  todo: check/compare with number of InChIKeys/use max.
  
 +
CHEMSPIDER
 
-->|14={{#switch:{{{_countChemSpiderID|-1}}}
 
-->|14={{#switch:{{{_countChemSpiderID|-1}}}
 
|0=[[:Category:Chemical pages without ChemSpiderID]]
 
|0=[[:Category:Chemical pages without ChemSpiderID]]
Line 85: Line 88:
 
}}<!--
 
}}<!--
  
 +
SMILES
 
-->|15={{#switch:{{{_countSMILES|-1}}}
 
-->|15={{#switch:{{{_countSMILES|-1}}}
 
|0=<!-- [[:Category:Chemical articles without SMILES]] -->
 
|0=<!-- [[:Category:Chemical articles without SMILES]] -->
Line 96: Line 100:
 
}}<!--
 
}}<!--
  
  positives:
+
  JMOL
 
-->|20={{#if:{{{_hasJmol|}}} |[[:Category:Chemical articles having Jmol set]]}}<!--
 
-->|20={{#if:{{{_hasJmol|}}} |[[:Category:Chemical articles having Jmol set]]}}<!--
 
<!--
 
<!--
  
  negatives:
+
  OTHER IDS
 
-->|21={{#if:{{{_hasChEBIChEMBL|unk}}}  ||[[:Category:Articles without EBI source]]}}<!--
 
-->|21={{#if:{{{_hasChEBIChEMBL|unk}}}  ||[[:Category:Articles without EBI source]]}}<!--
 
-->|23={{#if:{{{_hasKEGG|unk}}}      ||[[:Category:Articles without KEGG source]]}}<!--
 
-->|23={{#if:{{{_hasKEGG|unk}}}      ||[[:Category:Articles without KEGG source]]}}<!--
Line 109: Line 113:
 
-->|28={{#if:{{{_hasOtherInput|unk}}} |<!--ok1 -->|{{#ifexpr:{{{_countCAS|0}}}+{{{_countPubChem|0}}}+{{{_countChEBI|0}}}>0|<!--ok2 -->|{{#if:{{{_hasChEBIChEMBL|}}}{{{_hasChemSpiderID|}}}{{{_hasKEGG|}}}{{{_hasInChI|}}}{{{_hasUNII|}}}{{{_hasInChIorKey|}}} |<!--ok3 -->|[[:Category:Chemical infoboxes with tracked parameters|I]]}}}}}}<!--
 
-->|28={{#if:{{{_hasOtherInput|unk}}} |<!--ok1 -->|{{#ifexpr:{{{_countCAS|0}}}+{{{_countPubChem|0}}}+{{{_countChEBI|0}}}>0|<!--ok2 -->|{{#if:{{{_hasChEBIChEMBL|}}}{{{_hasChemSpiderID|}}}{{{_hasKEGG|}}}{{{_hasInChI|}}}{{{_hasUNII|}}}{{{_hasInChIorKey|}}} |<!--ok3 -->|[[:Category:Chemical infoboxes with tracked parameters|I]]}}}}}}<!--
  
  indexes, QIDs:
+
  QIDs:
 
-->|30={{#if:{{{_hasQID|}}}|[[:Category:Chemicals having QID set]]}}<!--
 
-->|30={{#if:{{{_hasQID|}}}|[[:Category:Chemicals having QID set]]}}<!--
 
-->|31={{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[:Category:Chemicals (indexed) having QID set]]}}<!--
 
-->|31={{#ifexpr:{{{_countQIDindexed|0}}}>0 |[[:Category:Chemicals (indexed) having QID set]]}}<!--
-->|32={{#ifexpr:{{{_countIndexlabel|0}}}>0 |[[:Category:Chemicals using indexlabels]]}}<!--
 
  
 
-->}}<noinclude>{{documentation}}</noinclude>
 
-->}}<noinclude>{{documentation}}</noinclude>

Revision as of 15:39, 7 March 2017

Template documentation[view] [edit] [history] [purge]

Use /test for development. To make sure all testsettings show in /testcases, and won't show in mainspace. When going live, copy to regular /sandbox, change settings fit for Mainspace, then copy /sandbox into live.

Difference with live, when developing:

  • In {{Chembox Identifers/sandbox}}, set
|addTESTdata=Chembox parametercheck/test
|addMAINdata=<blank>
This sets {{main other|1=|2=(all categories to test)}} for all returned input ({{Chembox headerbar}})
  • In /test:
Set [[COLON:Category:Category name]] (do show not categorise; required to not pollute the categories with testpages)
Format /test visuals, eg by making it a collapsible list.
Optionally, set [[COLON:Category:Category name|Label To Show]] (shows wl label).

Diff

See also