legumeinfo / datastore-specifications

Specifications for directory naming, file naming, file contents in the LIS datastore

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Propose "weight" field in description_genus_species to allow control of display order

StevenCannon-USDA opened this issue · comments

I propose adding a field, probably "weight", to the description_genus_species.yml files to control the order in which species are presented in web displays. Default value 1; integer values allowed. When data files are created that combine information for several species, this value could be used by that program for sorting or categorizing the species. Weights could be applied as 0 and 1, with 1 sorting below 0 (and then alphabetical given those weights). Example in spec:

species: max
abbrev: glyma
weight: 0

This would be desirable for species where alphabetical spring is not what a user likely expects to want: a user probably wants "max" rather than "cyrtoloba" in Glycine; and "hypogaea" rather than "cardenasii" in Arachis; and "vulgaris" rather than "acutifolius" in Phaseolus.

I've hacked a solution for Glycine (special-casing "max" and "soja"), but that won't scale.
https://dev.soybase.org/resources/

This is not needed. The order in which species are listed in the description_Genus YAML determines the order on the web page. I just put max and soja up front, now look at http://dev.lis.ncgr.org:50030/taxa/glycine/.

In general, we should consider the description files to be strictly informative, not instructions on how to display content on a web site. So far we can avoid that because of the above.

OK. I buy that.