diff --git a/README.rst b/README.rst index e63529e4fa89556187dc347060f21a3fc7a32694..878696548d1d133edf4ae940564907019e1aa35f 100644 --- a/README.rst +++ b/README.rst @@ -141,6 +141,14 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Change history -------------- +Version 2.29.19 (07/20/2018) + +- Merged pull request that makes generated enums for each simpleType + uppercase. Thanks to Mustafa Åženol CoÅŸar for this enhancement. +- Added new command line option "--mixed-case-enums" to control + whether simpleType enums are changed to upper case. The default + is True. + Version 2.29.18 (07/19/2018) - Fixes to the example code underneath `Demos/`. Thanks to Witold diff --git a/generateDS.html b/generateDS.html index 99cb2b2b60a23d995eb964ddbe9248087923bedc..7f2bbe47b2c486991563c28235e0b56c9856918c 100644 --- a/generateDS.html +++ b/generateDS.html @@ -220,7 +220,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.19</td> </tr> </tbody> </table> @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">July 11, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">July 20, 2018</td> </tr> </tbody> </table> @@ -659,6 +659,8 @@ Options: search pattern and second is a replacement. Example: "[('[-:.]', '_'), ('^__', 'Special')]" Default: "[('[-:.]', '_')]" + --mixed-case-enums If used, do not uppercase simpleType enums names. + Default is to make enum names uppercase. -q, --no-questions Do not ask questions, for example, force overwrite. --no-warnings Do not print warning messages. @@ -973,6 +975,10 @@ characters. Example: <tt class="docutils literal"><span class="pre">[(':',</span> <span class="pre">'colon'),</span> <span class="pre">('-',</span> <span class="pre">'dash'),</span> <span class="pre">('.',</span> <span class="pre">'dot')]</span></tt>.</p> <p class="last">The default when omitted is <tt class="docutils literal"><span class="pre">[('[-:.]',</span> <span class="pre">'_')]</span></tt>.</p> </dd> +<dt>mixed-case-enums</dt> +<dd>Do not uppercase the names of simpleType enums. The default (if +this option is omitted) is to make generated enum names +uppercase.</dd> <dt>q, no-questions</dt> <dd>Do not ask questions. For example, if the "-f" command line option is omitted and the ouput file exists, then generateDS.py @@ -3386,7 +3392,7 @@ following among others:</p> <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateDS.txt">View document source</a>. -Generated on: 2018-07-11 18:42 UTC. +Generated on: 2018-07-20 18:42 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/generateDS.py b/generateDS.py index 74b86916a2d8449bcd3f89e3d11c2f8ec93fc47b..cc8f48938be10deb94fe3c07f74b885e005f2c6a 100755 --- a/generateDS.py +++ b/generateDS.py @@ -124,6 +124,8 @@ Options: search pattern and second is a replacement. Example: "[('[-:.]', '_'), ('^__', 'Special')]" Default: "[('[-:.]', '_')]" + --mixed-case-enums If used, do not uppercase simpleType enums names. + Default is to make enum names uppercase. -q, --no-questions Do not ask questions, for example, force overwrite. --no-warnings Do not print warning messages. @@ -225,7 +227,7 @@ _log = logging.getLogger(__name__) # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.18' +VERSION = '2.29.19' ##VERSION## BaseStrTypes = six.string_types @@ -7253,7 +7255,8 @@ def main(): ModuleSuffix, UseOldSimpleTypeValidators, \ UseGeneratedssuperLookup, UseSourceFileAsModuleName, \ PreserveCdataTags, CleanupNameList, \ - NoWarnings, AlwaysExportDefault + NoWarnings, AlwaysExportDefault, \ + UppercaseEnums outputText = True args = sys.argv[1:] try: @@ -7275,7 +7278,7 @@ def main(): 'use-source-file-as-module-name', 'no-warnings', 'no-collect-includes', 'no-redefine-groups', - 'always-export-default', + 'always-export-default', 'mixed-case-enums', ]) except getopt.GetoptError: usage() @@ -7298,6 +7301,7 @@ def main(): catalogFilename = None noCollectIncludes = False noRedefineGroups = False + UppercaseEnums = True for option in options: if option[0] == '--session': sessionFilename = option[1] @@ -7480,6 +7484,8 @@ def main(): noRedefineGroups = True elif option[0] == '--always-export-default': AlwaysExportDefault = True + elif option[0] == '--mixed-case-enums': + UppercaseEnums = False if showVersion: print('generateDS.py version %s' % VERSION) sys.exit(0) diff --git a/generateDS.txt b/generateDS.txt index ca608772ee1049c235cecf211b0134c61ab76d5d..dd81f02a0ffb5e920641d4eb5a4027c30f431040 100644 --- a/generateDS.txt +++ b/generateDS.txt @@ -12,7 +12,7 @@ generateDS -- Generate Data Structures from XML Schema .. version -:revision: 2.29.18 +:revision: 2.29.19 .. version @@ -346,6 +346,8 @@ Here is the usage message displayed by ``generateDS.py``:: search pattern and second is a replacement. Example: "[('[-:.]', '_'), ('^__', 'Special')]" Default: "[('[-:.]', '_')]" + --mixed-case-enums If used, do not uppercase simpleType enums names. + Default is to make enum names uppercase. -q, --no-questions Do not ask questions, for example, force overwrite. --no-warnings Do not print warning messages. @@ -694,6 +696,11 @@ cleanup-name-list=<replacement-map> The default when omitted is ``[('[-:.]', '_')]``. +mixed-case-enums + Do not uppercase the names of simpleType enums. The default (if + this option is omitted) is to make generated enum names + uppercase. + q, no-questions Do not ask questions. For example, if the "-f" command line option is omitted and the ouput file exists, then generateDS.py diff --git a/generateds_gui_notes.html b/generateds_gui_notes.html index 586d5ca184573d45bff4d7095462ab909cf0c1fe..523b5b62762f0ed5beb9489e67e62687fc1d8398 100644 --- a/generateds_gui_notes.html +++ b/generateds_gui_notes.html @@ -220,7 +220,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.19</td> </tr> </tbody> </table> @@ -229,7 +229,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">July 11, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">July 20, 2018</td> </tr> </tbody> </table> @@ -401,7 +401,7 @@ $ mv generateds_gui.mo locale/ru/LC_MESSAGES/ <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_gui_notes.txt">View document source</a>. -Generated on: 2018-07-11 18:42 UTC. +Generated on: 2018-07-20 18:42 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/generateds_gui_notes.txt b/generateds_gui_notes.txt index 8eb6a5bbe4ab71beb96cda1839d3ff6da5f340d4..5c8dd2e410da98928230b2d71c630f5852481eba 100644 --- a/generateds_gui_notes.txt +++ b/generateds_gui_notes.txt @@ -12,7 +12,7 @@ GenerateDS GUI Notes .. version -:revision: 2.29.18 +:revision: 2.29.19 .. version diff --git a/gui/generateds_gui.py b/gui/generateds_gui.py index 03b8d9e27113f2a45f175342eeb3838c6921f348..ea1c7d0b71447ca711d536c22724118f5ace210b 100644 --- a/gui/generateds_gui.py +++ b/gui/generateds_gui.py @@ -41,7 +41,7 @@ from libgenerateDS.gui import generateds_gui_session # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.18' +VERSION = '2.29.19' ##VERSION## diff --git a/librarytemplate_howto.html b/librarytemplate_howto.html index d7102315ad118228a17e6ff42e570a8d14780881..c46cf831188355cc508a1f5fe82d599260dde16d 100644 --- a/librarytemplate_howto.html +++ b/librarytemplate_howto.html @@ -217,7 +217,7 @@ dkuhlman (at) davekuhlman (dot) org <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.19</td> </tr> </tbody> </table> @@ -226,7 +226,7 @@ dkuhlman (at) davekuhlman (dot) org <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">July 11, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">July 20, 2018</td> </tr> </tbody> </table> @@ -380,7 +380,7 @@ this command for your needs. For example, you may need to use <div class="footer"> <hr class="footer" /> <a class="reference external" href="librarytemplate_howto.txt">View document source</a>. -Generated on: 2018-07-11 18:42 UTC. +Generated on: 2018-07-20 18:42 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/librarytemplate_howto.txt b/librarytemplate_howto.txt index deb8be97eda4522f353e0b8919e0ce4883e6e68b..66936b4150a9f9a4ce69aece94d1bb520b22c9f1 100644 --- a/librarytemplate_howto.txt +++ b/librarytemplate_howto.txt @@ -8,7 +8,7 @@ How to package a generateDS.py generated library .. version -:revision: 2.29.18 +:revision: 2.29.19 .. version diff --git a/process_includes.py b/process_includes.py index 6bbf3f9aa27d96738a8c7172b661493ffa5c6fa5..6ab3cf3c8cdfb85b898dca23684988ce1f74b62e 100755 --- a/process_includes.py +++ b/process_includes.py @@ -40,7 +40,7 @@ except ImportError: # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## -VERSION = '2.29.18' +VERSION = '2.29.19' ##VERSION## CatalogDict = {} diff --git a/setup.py b/setup.py index ee9a65afd50356ecdb6ce77c91b7e742fd296c85..f9696e438ea53c4e69963236ff44fc62eb83bb07 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup( # Do not modify the following VERSION comments. # Used by updateversion.py. ##VERSION## - version="2.29.18", + version="2.29.19", ##VERSION## author="Dave Kuhlman", author_email="dkuhlman@davekuhlman.org", diff --git a/tests/defaults_cases_always2_sub.py b/tests/defaults_cases_always2_sub.py index 96c5e2eca4b4ce222c0511648a539b60e11f2bec..ed21b92bbf86f095218d7ef2f20e88690f021e91 100644 --- a/tests/defaults_cases_always2_sub.py +++ b/tests/defaults_cases_always2_sub.py @@ -2,7 +2,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/defaults_cases_always2_sup.py b/tests/defaults_cases_always2_sup.py index 3c31508a456d717947069d3a31c3657523c04ed9..6e0f64042e49c273fe70267194e0fb1089e3adde 100644 --- a/tests/defaults_cases_always2_sup.py +++ b/tests/defaults_cases_always2_sup.py @@ -3,7 +3,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/ipo2_sub.py b/tests/ipo2_sub.py index ff9ee9211b75b7f0c91b55f86553c3782cdf76e3..708a162a7ac579ce314242d243151f8d0c497cae 100644 --- a/tests/ipo2_sub.py +++ b/tests/ipo2_sub.py @@ -2,7 +2,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/ipo2_sup.py b/tests/ipo2_sup.py index 25d8dc2f9fb382b85f1c87ed2d319bbf4c12f854..3e3d8da939291bd8b715feb9be4010c7d9b1e748 100644 --- a/tests/ipo2_sup.py +++ b/tests/ipo2_sup.py @@ -3,7 +3,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/mixedcontent2_sub.py b/tests/mixedcontent2_sub.py index 688d154786ab7a7554700ae13d1fbb2ec038f2fc..86f0a3669e870eaaa5d2a9b039bc2fb26b526752 100644 --- a/tests/mixedcontent2_sub.py +++ b/tests/mixedcontent2_sub.py @@ -2,7 +2,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/mixedcontent2_sup.py b/tests/mixedcontent2_sup.py index ce649d7ba35d4c28b1b96cfaa72573f8d35b2eb8..4e7999e5691e44a67ec371307de5019bc2b095db 100644 --- a/tests/mixedcontent2_sup.py +++ b/tests/mixedcontent2_sup.py @@ -3,7 +3,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/validate_simpletypes2_sub.py b/tests/validate_simpletypes2_sub.py index ae4de018aa586b51422339792d0be8b3c80d8ced..b029b320228eb19e5d892b0c90f0aa813497ec95 100644 --- a/tests/validate_simpletypes2_sub.py +++ b/tests/validate_simpletypes2_sub.py @@ -2,7 +2,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tests/validate_simpletypes2_sup.py b/tests/validate_simpletypes2_sup.py index b9a98fdf118d2aa5d011093ccee88a13eb923926..f8ae99f4090a751e2e5b87c590012a320cd38e16 100644 --- a/tests/validate_simpletypes2_sup.py +++ b/tests/validate_simpletypes2_sup.py @@ -3,7 +3,7 @@ # # Generated by generateDS.py. -# Python 2.7.15 |Anaconda, Inc.| (default, May 1 2018, 23:32:55) [GCC 7.2.0] +# Python 2.7.15 |Anaconda custom (64-bit)| (default, May 1 2018, 23:32:55) [GCC 7.2.0] # # Command line options: # ('--no-dates', '') diff --git a/tutorial/generateds_tutorial.html b/tutorial/generateds_tutorial.html index 3e32c2dd737afe1de90c48e8f2f8dccacfe8c02d..28269767c30b7070465a1d7b703772a6c8d5e84d 100644 --- a/tutorial/generateds_tutorial.html +++ b/tutorial/generateds_tutorial.html @@ -219,7 +219,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.17</td> +<tr class="field"><th class="field-name">revision:</th><td class="field-body">2.29.19</td> </tr> </tbody> </table> @@ -228,7 +228,7 @@ They are used by updateversion.py. --> <col class="field-name" /> <col class="field-body" /> <tbody valign="top"> -<tr class="field"><th class="field-name">date:</th><td class="field-body">July 11, 2018</td> +<tr class="field"><th class="field-name">date:</th><td class="field-body">July 20, 2018</td> </tr> </tbody> </table> @@ -1210,7 +1210,7 @@ named <tt class="docutils literal">garden_api.py</tt>, you can create an instanc <div class="footer"> <hr class="footer" /> <a class="reference external" href="generateds_tutorial.txt">View document source</a>. -Generated on: 2018-07-11 18:42 UTC. +Generated on: 2018-07-20 18:42 UTC. Generated by <a class="reference external" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference external" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. </div> diff --git a/tutorial/generateds_tutorial.txt b/tutorial/generateds_tutorial.txt index 29795adc3cc304002e6e44f3545985982621327b..0d34942a3474996bf5c11a6df3b000092ebea753 100644 --- a/tutorial/generateds_tutorial.txt +++ b/tutorial/generateds_tutorial.txt @@ -11,7 +11,7 @@ generateDS -- Introduction and Tutorial .. version -:revision: 2.29.18 +:revision: 2.29.19 .. version diff --git a/tutorial/generateds_tutorial.zip b/tutorial/generateds_tutorial.zip index 34c49b42f2bf3fe038f042be0ac8a728f9b047ae..4b10e8fb4c2b56caa234ce090a2137aab831f6a0 100644 Binary files a/tutorial/generateds_tutorial.zip and b/tutorial/generateds_tutorial.zip differ