geminiplanetimager / gpi_pipeline

Gemini Planet Imager Data Reduction Pipeline
Other
8 stars 6 forks source link

make_primitives_config should error check #9

Open dsavransky opened 8 years ago

dsavransky commented 8 years ago

I was able to get an error like the following by attempting to create a primitive that had an '&' character in its description, which confused the XML parser. The make_drsconfig script should (1) check that only valid characters are present in names, and (2) immediately after finishing, attempt to parse the XML file to determine its validity and alert the user if it is unparsable.

@ % Compiled module: GPIDRSCONFIGPARSER__DEFINE. % Loaded DLM: XML. % IDLFFXMLSAX::PARSEFILE: Parser SAX fatal error: File: /Users/mperrin/GPI/sw/pipeline/local_config/gpi_pipeline_primi tives.xml, line: 92, column: 51 :: Unterminated entity reference @

dsavransky commented 8 years ago

Recovering rm journals for issue:

mperrin: See also issue #266 which is a duplicate of this one. Added protection against ampersand characters in revision r1506. But that doesn't address point (2) of the above, the idea that the make_primitives_config script should try parsing its output upon completion, so I'll leave this issue open.

mperrin: Another error check we should add is the case of duplicate PIPELINE ARGUMENT specs in a given primitive, or PIPELINE ARGUMENTs with default values that are not valid in their specified range.