@@ -26,7 +26,59 @@ Indices and Tables
26
26
27
27
Overview
28
28
========
29
- TODO: This needs to be expanded for RTD.
29
+ The ``SetProgramOptions `` package extends the
30
+ `ConfigParserEnhanced <https://pypi.org/project/configparserenhanced/ >`_
31
+ package by adding additional *operations * for handling command-line
32
+ options.
33
+
34
+ The primary use case that provided the impetus to develop SetProgramOptions
35
+ was to support complex configuration environments for a software project that
36
+ is tested on a variety of platforms and architectures, including GPUs and HPC
37
+ systems. This project is several million lines of code and has hundreds of
38
+ CMake options in its configuration space.
39
+
40
+ We developed SetProgramOptions and SetProgramOptions to allow our build system
41
+ to use optimized .ini files to manage our configuration space.
42
+
43
+ This package includes two classes:
44
+
45
+ 1. SetProgramOptions - A general purpose command line handler that handles
46
+ generic command line options.
47
+ 2. SetProgramOptionsCMake - A subclass of SetProgramOptions, this class further
48
+ extends SetProgramOptions by adding CMake-specific operations to provide
49
+ ease of use for CMake specific options. It also adds an additional generator
50
+ option to allow the generation of either *bash * style command line options
51
+ or a *CMake * source fragment file.
52
+
53
+ An example .ini file using ``SetProgramOptions `` might look like:
54
+
55
+ .. code-block :: ini
56
+ :linenos:
57
+
58
+ [Directory *nix]
59
+ opt-set ls
60
+
61
+ This configuration is the SetProgramOptions version of a hello world example.
62
+ Here, the ``opt-set ls `` option is specifying a single command line option
63
+ which in this case is the command `ls `.
64
+
65
+ We can expand this to add additional entries:
66
+
67
+ .. code-block :: ini
68
+ :linenos:
69
+
70
+ [Directory *nix]
71
+ opt-set ls
72
+ opt-set -l
73
+ opt-set -r
74
+ opt-set -t
75
+ opt-remove -r
76
+
77
+ When processed, this example would result in a concactenated string containing
78
+ the command ``ls -l -t ``. We threw in the ``opt-remove -r `` operation which
79
+ *removed * the `-r ` entry.
80
+
81
+ For more details on how this is used, see the Examples section below.
30
82
31
83
32
84
Examples
0 commit comments