MantisBT - Rosetta
View Issue Details
0000038Rosetta[All Projects] Bad Codingpublic2012-07-03 14:072012-07-03 15:31
smlewis 
 
lowmajoralways
newopen 
 
 
any with executable-defined options; AnchoredPDBCreator is the first example I found
AnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb
0000038: Executable-defined options cannot be namespaced
The option system allows you to define options in basic/options_rosetta.py. This works great. Options defined in this way have C++ namespaces, and "option namespaces" such that they are namespaced on command line (like the in and file in -in:file:s).

The options system forbids you from definition options elsewhere, mostly. This works great.

The options system allows you to define options in executable files that can be referenced only within the code in that same file (global variable, but scoped to that file). This only sort-of works. You CAN C++ namespace options, but they do NOT acquire "option namespace" options. Options created in an executable cannot have namespace prefixes when used, and as a consequence cannot name-clash with any other options already existing. If this is intended behavior, it may not be the best design choice, because it forces suboptimal option names in executable-defined options. If this is unintended, then it's a bug.

Example: AnchoredPDBCreator's options. The code defining the options namespaces them in text and in C++:
interface_design/anchored_design/AnchoredPDBCreator.cc
53-namespace basic{ namespace options{ namespace OptionKeys{
54-namespace AnchoredPDBCreator{
55:basic::options::FileOptionKey const scaffold_loop("AnchoredPDBCreator::scaffold_loop");
56:basic::options::FileOptionKey const scaffold_pdb("AnchoredPDBCreator::scaffold_pdb");
57:basic::options::FileOptionKey const anchor_pdb("AnchoredPDBCreator::anchor_pdb");
58:basic::options::FileOptionKey const target_pdb("AnchoredPDBCreator::target_pdb");
59:basic::options::IntegerOptionKey const APDBC_cycles("AnchoredPDBCreator::APDBC_cycles");
60-}//AnchoredPDBCreator
61-}}}//basic::options::OptionKeys

Despite this clear namespacing to an AnchoredPDBCreator "options namespace", ONLY -anchor_pdb is accepted by Rosetta; -AnchoredPDBCreator:anchor_pdb is not accepted as a valid option.

The second consequence of this unnamespaceability is that executable-defined options cannot have their name conflict with other existing options, as the options system is unable to discriminate them properly.
namespace the options in the AnchoredPDBCreator integration test and watch it fail
No tags attached.
Issue History
2012-07-03 14:07smlewisNew Issue
2012-07-03 15:31smlewisApplication(s) Affectedany => any with executable-defined options; AnchoredPDBCreator is the first example I found
2012-07-03 15:31smlewisCommand Line Usedall => AnchoredPDBCreator -AnchoredPDBCreator:anchor_pdb
2012-07-03 15:31smlewisDescription Updatedbug_revision_view_page.php?rev_id=8#r8
2012-07-03 15:31smlewisSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=10#r10

There are no notes attached to this issue.