cloudy-astrophysics / bug-tracker-migration-test

Trial run for importing the nublado.org Trac tickets as GitHub issues
0 stars 0 forks source link

SPECIES command issues (trac #340) #342

Closed cloudy-bot closed 5 years ago

cloudy-bot commented 9 years ago

reported by: @CloudyLex

The SPECIES command allows details of the treatment of database species to be changed. Tests show the following:


The command is not defended against user error. The command

species "ty3" lvls 3

does not result in any error message, even though the species name is invalid, and the option is misspelled. This is especially important because we now are case sensitive. It will be common for a user to make a mistake with the species name, since we were not case sensitive in the past.


The command parser does the following

species "Si+" levels 10
species "Si+" levels all
species "Si+" levels=all

The first and last work as expected while the middle does not work and does not result in an error.


species level does not work for Fe, probably because we use more levels for this element, as explained in Lykins+13, section 2.9.

Migrated from https://www.nublado.org/ticket/340

{
    "status": "closed",
    "changetime": "2019-02-04T12:08:14Z",
    "_ts": "1549282094687722",
    "description": "The SPECIES command allows details of the treatment of database species to be changed.  Tests show the following:\n\n-------\n\nThe command is not defended against user error.  The command\n\n{{{\nspecies \"ty3\" lvls 3\n}}}\n\ndoes not result  in any error message, even though the species name is invalid, and the option is misspelled.  This is especially important because\nwe now are case sensitive.  It will be common for a user to make a \nmistake with the species name, since we were not case sensitive in the past.\n\n---------\n\nThe command parser does the following\n\n{{{\nspecies \"Si+\" levels 10\nspecies \"Si+\" levels all\nspecies \"Si+\" levels=all\n}}}\n\nThe first and last work as expected while the middle does not work\nand does not result in an error. \n\n----------------\n\n{{{ species level }}} does not work for Fe, probably because we use\nmore levels for this element, as explained in Lykins+13, section 2.9.\n",
    "reporter": "gary",
    "cc": "",
    "resolution": "fixed",
    "time": "2015-08-21T17:49:25Z",
    "component": "etc",
    "summary": "SPECIES command issues",
    "priority": "blocker",
    "keywords": "",
    "version": "trunk",
    "milestone": "c17 branch",
    "owner": "nobody",
    "type": "defect - wrong answer"
}
cloudy-bot commented 9 years ago

@rjrw commented:

species "Si+" levels all

in fact prints the diagnostic

Incorrect type for 'LEVELS' option to species

I'll make this more chatty.

The problem in parsing 'levels all' (as against 'levels=all') is to distinguish whether in

levels <word>

is an argument to the 'levels' option, or a distinct option (such as 'lte') with the argument to 'levels' missing in error. Requiring an '=' in the case of text arguments disambiguates this. This could grouping be achieved in different ways, e.g. using commas.


species level certainly doesn't work for Fe II. This has been waiting on the merge of the stout6 branch for a little while.

cloudy-bot commented 9 years ago
cloudy-bot commented 9 years ago

Milestone renamed