2003-05-22 Thomas Koester * SciParam/range.py (Range.SetRange): Renamed to _SetRange, Range class is immutible now. * test/test_range.py (RangeTest.test_equal): Replaced call to SetRange with creating a new Range instance. 2003-05-22 Thomas Koester * SciParam/range.py (Range.SetRange): Don't convert range to string and back to Range, but use GetRange method. (Range.float): Added doc string and use better variable name. 2003-05-20 Thomas Koester * SciParam/range.py (Range.SetRange), test/test_range.py (RangeTest.test_equal, RangeTest.test_contains, RangeTest.test_bad_ranges): Allow 4-tuples for setting ranges. 2003-05-12 Thomas Koester * SciParam/range.py (Range.number_re), test/test_range.py (RangeTest.test_equal): Allow decimal numbers to be written as ".5" and "-.123". 2003-03-07 Thomas Koester * doc/sciparam-manual-gui.tex: New file. * doc/sciparam-manual.tex: Moved chapter "SciParam GUI" to seperate file sciparam-manual-gui.tex. 2003-03-06 Thomas Koester * doc/Makefile, doc/gnufdl.tex doc/sciparam-manual.tex, doc/screenshots/choice_long.eps, doc/screenshots/choice_short.eps, doc/screenshots/details.eps, doc/screenshots/dialog.eps, doc/screenshots/distribution.eps, doc/screenshots/groups.eps, doc/screenshots/missing.eps, doc/screenshots/notebook.eps, doc/screenshots/required.eps, doc/screenshots/usualrange.eps, doc/screenshots/validrange.eps: New files for Latex documentation. 2003-03-03 Thomas Koester * SciParam/version.py: Set version to 0.9.2pre2 without append_date. * tagged as SCIPARAM_0_9_2pre2 * SciParam/version.py: Set version back to 0.9.2cvs with append_date. 2003-03-03 Thomas Koester * SciParam/UI/detailsbox.py: DISTRIBUTION_CHOICE defaults to false. (ParameterDistributionDialog): Rewritten using the new features 'disabled' and 'hook_updated' of ParameterLongChoice; fixes bug #1645. * test/test_detailsbox.py (ParameterDistributionDialogTest.test_distdialog): Updated to match new ParameterDistributionDialog implementation. * SciParam/UI/control.py (ParameterLongChoice.SetValue): Only set valid values, ignore invalid ones. 2003-03-03 Thomas Koester * SciParam/UI/pargrid.py (ParameterColumn.__init__, ParameterColumn.Add, ParameterGrid.__init__, ParameterGrid.AddParameter): Creating of label, icon and unit is now done in ParameterColumn. Setting them to correct values is done with a call to control.UpdateFromParameter(). 2003-03-03 Thomas Koester * SciParam/range.py (Range._float2string): Fixed typo in doc string. * SciParam/parameter.py (SciParam._attr, SciParam.__setattr__), test/test_parameter.py (SciParamTest.test_common): New parameters 'disabled' and 'hook_updated'. * SciParam/parameter.py (SciParam.isvalid, SciParam.isusual), test/test_parameter.py (SciParamTest.test_hook_valid_usual): Hooks are now called with the parameter as the first argument. * SciParam/parameter.py (_test_FloatParam, _test_DistParam, _test_IntParam, _test_StringParam, _test_ChoiceParam, _test_notunknown, _test): Removed. * SciParam/UI/control.py (ParameterCtrlMixin, ParameterCtrl, ParameterChoice, ParameterLongChoice): New mixin class. (ParameterValidator.Validate, ParameterValidator.TransferFromWindow, ParameterRadioButtonValidator.Validate, ParameterRadioButtonValidator.TransferFromWindow, ParameterLongChoiceValidator.Validate, ParameterLongChoiceValidator.TransferFromWindow): Use 'disable' attribute. (ParameterChoice.OnRadioButton, ParameterLongChoice.OnChoice): Use 'hook_updated' attribute. (ParameterChoice.GetValue, ParameterChoice.Enable, ParameterLongChoice.GetValue): New methods. (ParameterLongChoiceValidator.TransferFromWindow, ParameterLongChoiceValidator.Validate): Use SetValue and GetValue. 2003-02-26 Thomas Koester * SciParam/UI/dialog.py (ParameterDialog.__init__, ParameterDialog.add_content), SciParam/UI/notebook.py (ParameterNotebookPage.__init__): Optionally disable details box. * SciParam/UI/control.py, test/test_detailsbox.py (ParameterDistributionDialogTest), SciParam/UI/pargrid.py (ParameterGrid.__init__, ParameterGrid.AddParameter, ParameterGrid.refocus), SciParam/UI/detailsbox.py (ParameterDistributionDialog.__init__, ParameterDistributionDialog.hook_isvalid, ParameterDistributionDialog.hook_isusual, ParameterDetailsBox.ValidateComment, DistChoice.__init__): Many small changes to use pargrid where details were used before. * SciParam/UI/pargrid.py (ParameterGrid.connect, ParameterGrid.connect_distribution, ParameterGrid.ValidateComment, ParameterGrid.CtrlOnKeyDown): New methods from ParameterDetailsBox. * SciParam/UI/detailsbox.py (ParameterDistributionDialog.connect, ParameterDistributionDialog.ValidateComment, ParameterDistributionDialog.CtrlOnKeyDown): Removed, because now ParameterDistributionDialog doesn't need to behave like a details box. * SciParam/UI/detailsbox.py (DistChoice.OnChoice): Don't use ParameterDistributionDialog. (ParameterDetailsBox.__init__): New button to start dialog for editing distribution; fixes bug #1660. Optionally make distribution type selection a static text. Length of 'Default: not available' is now calculated at most one time. (ParameterDetailsBox.get_dist): New method. (ParameterDetailsBox.get_default, ParameterDetailsBox.connect): get_default now is only called with the default instead of parameter. (ParameterDetailsBox.connect): Use connect_distribution method instead of distChoice.connect. (ParameterDetailsBox.connect_distribution): New method. (ParameterDetailsBox.OnDistButton): New method. (ParameterDetailsBox.CtrlOnKeyDown): Set focus to 'Edit Distribution' button if there is no distribution type selection control. 2003-02-24 Thomas Koester * SciParam/UI/detailsbox.py (ParameterDetailsBox.CommentOnChar): Allow typing if text is selected even if comment is too long. * SciParam/UI/detailsbox.py (DistChoice): New class. (ParameterDetailsBox.connect_distribution, ParameterDetailsBox.OnDistChoice): Moved to DistChoice.connect and DistChoice.OnChoice. (ParameterDetailsBox.__init__): Use DistChoice instead of wxChoice. * SciParam/UI/detailsbox.py (ParameterDetailsBox.connect), SciParam/UI/control.py (ParameterCtrl.SetValue): Use connect method of DistChoice instead of connect_distribution of details box. 2003-02-18 Thomas Koester * SciParam/UI/dialog.py (ParameterDialog.parse_param): More detailed error checking on grouped parameters. * test/test_detailsbox.py (ParameterDistributionDialogTest.wxappSetUp, ParameterDistributionDialogTest.tearDown, ParameterDistributionDialogTest.test_distdialog), test/test_dialog.py (ParameterDialogTest.test_column_number), test/test_notebook.py (ParameterNotebookDialogTest.test_column_number): Use Show(), Close() and Destroy() on wxDialog objects. * test/test_dialog.py (ParameterDialogTest.test_first_control): New test case. 2003-02-18 Thomas Koester * SciParam/version.py: Set version to 0.9.2pre1 without append_date. * tagged as SCIPARAM_0_9_2pre1 * SciParam/version.py: Set version back to 0.9.2cvs with append_date. 2003-02-14 Thomas Koester * SciParam/UI/detailsbox.py (ParameterDistributionDialog.hook_isvalid): Replaced 'red' with 'orange red' to match control.py. 2003-02-13 Thomas Koester * SciParam/UI/test_parameter_list.py: Added a DistParam with an upper limit. * SciParam/UI/control.py (ParameterRadioButtonValidator.Validate, ParameterValidator.Validate, ParameterLongChoiceValidator.Validate): Use window titles without parameter name to make error messages of ParameterDistributionDialog consistent. 2003-02-07 Thomas Koester * SciParam/control.py, SciParam/detailsbox.py, SciParam/dialog.py, SciParam/notebook.py, SciParam/pargrid.py, SciParam/required.xpm, SciParam/test_parameter_list.py: Moved to directory SciParam/UI/ and fixed imports. * SciParam/dialog.py, SciParam/notebook.py: Use sciparampath.py. * SciParam/UI/sciparampath.py, SciParam/UI/__init__.py: New files. * MANIFEST.in: include SciParam/*.py, SciParam/UI/{*.py,*.xpm} * setup.py: Package SciParam/UI/required.xpm * SciParam/__init__.py: Moved imports of ParameterDialog and ParameterNotebookDialog to SciParam/UI/__init__.py. * test/test_detailsbox.py, test/test_dialog.py, test/test_notebook.py: Fixed imports. * test/runtests.py (main): Removed reference to Thuban. * SciParam/distribution.py (Distribution.confidence_interval): Return list name/value pairs which should be inside this distribution. * SciParam/parameter.py (DistParam.is1inrange): Use new confidence_interval method; check for math errors (OverflowError). * test/test_distribution.py: Use new confidence_interval method. 2003-02-06 Thomas Koester * SciParam/distribution.py (Distribution.isvalid, Distribution.isusual), SciParam/parameter.py (SciParam.isvalid, SciParam.is1valid, SciParam.isusual, SciParam.is1usual, FloatParam.is1valid, FloatParam.is1usual, FloatParam.is1inrange, DistParam.is1inrange, StringParam.is1valid, ChoiceParam.is1valid): Append error messages to optional errors list. * test/test_distribution.py (DistributionTest.test_valid_usual): Test error messages. * SciParam/parameter.py (Nothing): New class. (SciParam.isvalid, SciParam.isusual, SciParam.isunknown): Use Nothing class to see if a value is given as an argument. * SciParam/parameter.py (SciParam.__init__): Force parameter name. * test/test_parameter.py (DistParamTest.test_dist_object, ChoiceParamTest.test_long): Add a name for each parameter. (SciParamTest.test_common): Test if parameter name is forced. * SciParam/control.py (ParameterValidator.Validate): Make dialog title conform to other dialogs. * SciParam/parameter.py (SciParam._attr, SciParam.isvalid, SciParam.isusual): New attributes 'hook_isvalid' and 'hook_isusual' to allow additional tests for isvalid and isusual. * test/test_parameter.py (SciParamTest.test_hook_valid_usual): New. (SciParamTest.test_bad_common): Fixed to allow more parameters. * SciParam/detailsbox.py (ParameterDistributionDialog.__init__): Descriptives have a unit and may not be unknown. * SciParam/parameter.py (SciParam.__setattr__): Fix setting hook_isvalid and hook_isusual from __init__. * test/test_detailsbox.py (ParameterDistributionDialogTest.wxappSetUp): Make sure the distribution is always valid. * SciParam/detailsbox.py (ParameterDistributionDialog.__init__): Added hooks for valid/usual checks for the full distribution. (ParameterDistributionDialog.hook_isvalid, ParameterDistributionDialog.hook_isusual): New. 2003-02-05 Thomas Koester * SciParam/control.py (ParameterValidator): Removed minctrl. * SciParam/detailsbox.py: Removed import of ParameterValidator. * SciParam/range.py: Changed some doc strings. * SciParam/distribution.py (Distribution.__setattr__): Make sure that descriptives are always a tuple and of the correct length. (Distribution.confidence_interval, Distribution.isvalid, Distribution.isusual): New methods. * test/test_distribution.py (DistributionTest.test_types): Test descriptives length and content after changing distribution type. (DistributionTest.test_confidence_interval, DistributionTest.test_valid_usual): New test cases. * SciParam/stochastic.py: New module. * SciParam/parameter.py (FloatParam.is1valid, FloatParam.is1usual, FloatParam.is1inrange): Handling of valid/usual status is now done in is1inrange(). (DistParam.is1valid, DistParam.is1usual, DistParam.is1distinrange): Removed methods. (DistParam.is1inrange): Rewritten to handle new Distribution methods confidence_interval, isvalid and isusual. * test/test_parameter.py: Updated copyright notice. 2003-02-04 Thomas Koester * SciParam/distribution.py, SciParam/parameter.py (DistParam.convert, DistParam.string): Rewritten to handle all (and a variable number of) descriptives of a distribution. * test/test_distribution.py: Rewritten to test the above change. * SciParam/parameter.py (SciParam.__init__, FloatParam, DistParam, StringParam, ChoiceParam): Use *args and **kwargs to handle list of attributes. Subclasses extend _attr to allow new attributes. * SciParam/parameter.py (SciParam.__setattr__, ChoiceParam.__setattr__): Updated for **kwargs change. * SciParam/parameter.py: Changed some doc strings. * SciParam/control.py (ParameterValidator.TransferFromWindow, ParameterCtrl.__init__, ParameterCtrl.SetValue), SciParam/detailsbox.py (ParameterDistributionDialog.__init__, ParameterDetailsBox.connect_distribution, ParameterDetailsBox.OnDistChoice), test/test_detailsbox.py (ParameterDistributionDialogTest.test_distdialog), test_parameter_list.py: Updated to handle new-style DistParam. * SciParam/detailsbox.py (ParameterDistributionDialog.getDistribution): New method. * test/test_parameter.py (SciParamTest.setUp, FloatParamTest.setUp, DistParamTest.setUp, IntParamTest.setUp, StringParamTest.setUp, ChoiceParamTest.setUp, SciParamTest.test_unknown, StringParamTest.test_maxlength): Instanciate a new parameter for each test. (SciParamTest.test_common, SciParamTest.test_bad_common, DistParamTest.test_dist_object): New tests. 2003-01-31 Thomas Koester * test/test_distribution.py: New file. * SciParam/distribution.py (Distribution.__setattr__): Raise a ValueError if distribution type is not a string. * test/test_parameter.py (StringParamTest.test_maxlength): Test isusual method, too. * SciParam/parameter.py (StringParam.is1usual): New method. * test/support.py (wxTestCase.setUp): New method. * test/test_detailsbox.py (ParameterDistributionDialogTest.setUp): Renamed to wxappSetUp and removed app initialization. * test/test_dialog.py (ParameterDialogTest.setUp), test/test_notebook.py (ParameterNotebookDialogTest.setUp): Removed. * test/test_parameter.py (SciParamTest, FloatParamTest, DistParamTest, IntParamTest): New classes. (StringParamTest): Now derived from SciParamTest. * SciParam/parameter.py (SciParam.is1usual): Default to is1valid(). (DistParam.is1inrange): Allow float and int to be in range, too. (StringParam.is1usual): Removed. * MANIFEST.in: include test/README test/*.py * test/test_parameter.py (SciParamTest.setUp): SciParam('aSciParam'). (DistParamTest.setUp): Use float instead of integer as known value. 2003-01-30 Thomas Koester * test/test_detailsbox.py (ParameterDistributionDialogTest.tearDown): Added doc string. (ParameterDistributionDialogTest.test_distdialog): Choose the correct parameter control independently from setUp(). * test/support.py (FloatTestCase): New class. * test/test_range.py (RangeTest): Derive from support.FloatTestCase. (RangeTest.test_float): Use assertFloatEqual(). * test/support.py (FloatTestCase.assertFloatEqual): Forward msg to assertEqual() and assert_(). (wxTestCase): New class. * test/test_detailsbox.py (ParameterDistributionDialogTest): Now derived from support.wxTestCase. (ParameterDistributionDialogTest.test_distdialog): Check if distribution dialog is centered on its parent. * SciParam/detailsbox.py (ParameterDistributionDialog.__init__): Center distribution dialog on its parent. * test/support.py (wxTestCase.assertCenteredOnParent): Manually compare wxSize objects to maintain compatibility with wxPython 2.2. * SciParam/detailsbox.py (ParameterDetailsBox.OnDistChoice): Always ask for distribution parameters, if a distribution is chosen. * test/support.py (wxTestCase.assertCenteredOnParent): Tolerate a difference of one pixel. * test/test_detailsbox.py (ParameterDistributionDialogTest.tearDown): Use self.dialog.Close() instead of Destroy(). 2003-01-29 Thomas Koester * SciParam/detailsbox.py (ParameterDistributionDialog.__init__): ParameterGrid now expects a parsed parameter list and no rows. * test/test_detailsbox.py: New file to test previous bug fix. * SciParam/detailsbox.py (ParameterDistributionDialog.ValidateComment): New dummy method to behave like detailsbox class. * test/test_detailsbox.py (ParameterDistributionDialogTest.setUp): Initialize dialog. (ParameterDistributionDialogTest.test_distdialog): Initialize/destroy distdialog; added more asserts. 2003-01-28 Thomas Koester * SciParam/test_parameter_list.py: Mix groups of parameters with single parameters. * SciParam/pargrid.py (ParameterColumn): Rewritten to do some work formerly done in ParameterGrid. (ParameterGrid.__init__): Removed storage of columns list; Use ParameterColumn.AddGroup() to group parameters. (ParameterGrid.AddParameter): Use ParameterColumn.Add() instead of doing many column.something.Add() calls. * test/runtests.py: Make 'python runtests.py' work. * README, SciParam/detailsbox.py, SciParam/dialog.py, SciParam/distribution.py, SciParam/notebook.py, SciParam/pargrid.py, test/runtests.py, test/test_dialog.py, test/test_notebook.py: Updated copyright notice. * TODO: updated. * SciParam/range.py (Range.SetRange): Allow Range(instance_of_Range) to make a copy of an existing range; Raise a ValueError if a lower limit is greater than upper limit or if limits are equal, but interval is (half) open. * test/test_range.py (RangeTest): New class. 2003-01-24 Thomas Koester * SciParam/test_parameter_list.py: Don't use COLUMN_BREAK, because it will be removed. * SciParam/test_parameter_list.py: Different groups of parameters. * test/test_dialog.py, test/test_notebook.py: New files. * SciParam/dialog.py (ParameterDialog), SciParam/notebook.py (ParameterNotebookDialog): New method parse_param(); removed method count_rows(). * SciParam/dialog.py (ParameterDialog.get_parameters): Return self.parameter_list which is build by method parse_param(). * SciParam/notebook.py (ParameterNotebookDialog.get_parameters): Removed; inheriting ParameterDialog.get_parameters works. * SciParam/dialog.py (_TestApp.OnInit), SciParam/notebook.py (_TestApp.OnInit): Use columns=2, because support for COLUMN_BREAK was removed. * SciParam/dialog.py (ParameterDialog.add_content), SciParam/notebook.py (ParameterNotebookDialog.add_content, ParameterNotebookPage.__init__, ParameterNotebook.__init__), SciParam/pargrid.py (ParameterColumn.__init__, ParameterGrid.__init__): Removed passing around 'rows', because it is no longer needed. * SciParam/pargrid.py (ParameterGrid.__init__): Removed support for COLUMN_BREAK and use new parameter list format. (ParameterGrid.AddParameter, ParameterGrid.AddEmptyEntry): Directly use column, it is the sizer now. 2003-01-20 Thomas Koester * SciParam/dialog.py (ParameterDialog.count_rows, ParameterDialog.get_parameters, _TestApp.OnInit), SciParam/notebook.py (ParameterNotebook.count_rows, ParameterNotebook.get_parameters, _TestApp.OnInit), SciParam/pargrid.py (ParameterGrid.__init__): Allow parameter list to contain grouping information. * SciParam/test_parameter_list.py (parameter3): Example for grouping information. 2003-01-13 Thomas Koester * SciParam/dialog.py, SciParam/notebook.py, SciParam/detailsbox.py: Use "import module" instead of "from module import foo" to fix problem with mutual import. * SciParam/dialog.py (ParameterDialog.add_content), SciParam/notebook.py (ParameterNotebookPage.__init__): Use detailsbox.ParameterDetailsBox instead of ParameterDetailsBox. * SciParam/detailsbox.py (ParameterDistributionDialog.__init__): Use dialog.ParameterGrid; fixes bug #1510. * SciParam/distribution.py (Distribution, _test): Renamed 'log-normal' to 'lognormal'. * SciParam/pargrid.py: New file. * SciParam/dialog.py: Moved ParameterGrid and ParameterColumn to pargrid.py; Revert to using ParameterDetailsBox. * SciParam/detailsbox.py: Use ParameterGrid from pargrid.py. * SciParam/notebook.py: Revert to using ParameterDetailsBox. 2002-12-16 Thomas Koester * SciParam/parameter.py (SciParam.__init__, FloatParam.__init__, DistParam.__init__, ChoiceParam.__init__, SciParam.__setattr__): Use None as default value for required and notunknown and handle setting the real default (0) in __setattr__. * test/test_parameter.py: New file. * SciParam/parameter.py (StringParam.__init__, StringParam.is1valid, StringParam.__setattr__): New methods: handle 'maxlength'. * SciParam/parameter.py (StringParam.range): New method; mentions the maximum length. * SciParam/control.py (ParameterCtrl.__init__): Use TextCtrl.SetMaxLength to enforce maxlength attribute. * SciParam/test_parameter_list.py: Use maxlength. * SciParam/control.py (ParameterRadioButtonValidator.__init__, ParameterLongChoiceValidator.__init__, ParameterValidator.__init__): Connect dummy OnChar methods to make wxPython 2.2.9 happy. (ParameterValidator.OnChar, ParameterRadioButtonValidator.OnChar, ParameterLongChoiceValidator.OnChar): New methods. * README, doc/install.html: Now only wxPython 2.2.9 is required. 2002-12-13 Thomas Koester * SciParam/dialog.py (ParameterDistributionDialog, ParameterDetailsBox): Moved to new file SciParam/detailsbox.py. * SciParam/detailsbox.py: New file. * SciParam/detailsbox.py (ParameterDetailsBox.CommentOnChar): Fixed behaviour if comment_length is None or 0. * SciParam/parameter.py (IntParam.range): Replaced 'Float' with 'Decimal' to match FloatParam.range. * SciParam/test: New directory. * SciParam/test/README, SciParam/test/runtests.py, SciParam/test/support.py, SciParam/test/test_range.py: new files. * Makefile: New targes 'test' executes runtests.py. Target 'dist' depends on this. 2002-12-12 Thomas Koester * SciParam/dialog.py (ParameterColumn.__init__, _TestApp.OnInit), SciParam/notebook.py (_TestApp.OnInit): Use comment_length. * SciParam/dialog.py (ParameterDetailsBox.connect, ParameterDetailsBox.OnKillFocus): Store comment in parameter control when connecting to a new control. This way it doesn't depend on focus kill events being sent when switching to other controls (like wxChoice). (ParameterDetailsBox.CommentOnChar): New method. (ParameterDetailsBox.__init__): Connect OnChar event of comment box to ParameterDetailsBox.CommentOnChar. (ParameterDetailsBox.ValidateComment): New method. * SciParam/control.py (ParameterRadioButtonValidator.Validate, ParameterLongChoiceValidator.Validate, ParameterValidator.Validate): Call ValidateComment to verify comment length. 2002-12-10 Thomas Koester * doc/create_parameters.html, doc/classes.html: Documented the notunknown flag. 2002-12-06 Thomas Koester * SciParam/parameter.py (_test_notunknown, _test), SciParam/test_parameter_list.py: Added test for notunknown. * SciParam/parameter.py (SciParam._attr, SciParam.__init__, FloatParam.__init__, DistParam.__init__, ChoiceParam.__init__): New attribute 'notunknown'. (SciParam.isvalid, SciParam.isusual): Handle notunknown condition. * SciParam/control.py (ParameterRadioButtonValidator.Validate, ParameterLongChoiceValidator.Validate, ParameterValidator.Validate): Added error messages for unknown values which must be given. 2002-12-04 Thomas Koester * SciParam/dialog.py: DETAILS_KEY = 'D' instead of 4. (ParameterDetailsBox.__init__): Use DETAILS_KEY for toggle text. (ParameterDistributionDialog.CtrlOnChar, ParameterDetailsBox.CtrlOnChar, ParameterDetailsBox.OnChar): Renamed to CtrlOnKeyDown and OnKeyDown; Check for Alt-key in combination with ord(DETAILS_KEY). * SciParam/control.py (ParameterCtrl.__init__, ParameterChoice.__init__, ParameterLongChoice.__init__), SciParam/dialog.py (ParameterDetailsBox.__init__): Connect EVT_KEY_DOWN instead of EVT_CHAR. * SciParam/notebook.py: Disabled wxNB_MULTILINE because of bug #1441. 2002-12-03 Thomas Koester * doc/classes.html (ParameterDialog.__init__, ParameterNotebookDialog.__init__): Updated. 2002-12-02 Thomas Koester * SciParam/dialog.py: import ParameterValidator which is used by ParameterDistributionDialog.__init__ * SciParam/control.py (ParameterCtrl.__init__, ParameterChoice.__init__, ParameterLongChoice.__init__): Connect OnChar event to CtrlOnChar method of details box. * SciParam/dialog.py: New global variable DETAILS_KEY. (ParameterDetailsBox.CtrlOnChar, ParameterDetailsBox.OnChar, ParameterDistributionDialog.CtrlOnChar): New methods. (ParameterDetailsBox.__init__): Connect OnChar events for comment box, distribution choice and default button to OnChar method. (ParameterDetailsBox.init_comment): Removed; moved init of comment box back to __init__ method to change order of tab traversal. * SciParam/dialog.py (ParameterDetailsBox.__init__): Add hint how to toggle focus between parameter control and details box. * TODO: keyboard navigation works now. * SciParam/test_parameter_list.py: Added two more dummy pages to test bug #1441. 2002-11-29 Thomas Koester * SciParam/control.py (ParameterValidator.__init__): Removed connection to OnChar event. (ParameterValidator.OnChar): Removed method. 2002-11-28 Thomas Koester * SciParam/dialog.py (ParameterDetailsBox.__init__): Use font descent value for calculating height of static text. 2002-11-28 Frank Koormann * SciParam/parameter.py (FloatParam.range): Replaced IT jargon "Float" with "Decimal". 2002-11-28 Thomas Koester * SciParam/test_parameter_list.py: New file. * SciParam/dialog.py (_TestApp.OnInit), SciParam/notebook.py (_TestApp.OnInit): Use list of parameters from SciParam/test_parameter_list.py for GUI test. * SciParam/dialog.py (ParameterDialog.get_parameters), SciParam/notebook.py (ParameterNotebookDialog.get_parameters): New method. * SciParam/dialog.py (ParameterDetailsBox.connect): Don't try to adjust layout for long names, descriptions and defaults. (ParameterDetailsBox.__init__): Calculate maximum sizes for names, descriptions and defaults, and set these as initial minimum sizes. (ParameterDetailsBox.get_name_desc, ParameterDetailsBox.get_default): New methods used by __init__() and connect(). 2002-11-27 Thomas Koester * SciParam/dialog.py: Added a second set of parameters for testing. 2002-11-26 Thomas Koester * SciParam/notebook.py: Define wxNB_MULTILINE if not available. * SciParam/notebook.py (_TestApp): Added LongChoiceParameter as first control on the second notebook page, c.f. bug #1443. * SciParam/control.py (ParameterLongChoice.OnIdle): New method fixing bug #1443. (ParameterLongChoice.__init__): initialize self.refocus and connect OnIdle method. * SciParam/notebook.py (_TestApp): Added dummy pages to test multiline notebook style on wxMSW. See bug #1441. * SciParam/notebook.py (_TestApp): Added long strings to test resizing of the details box. * SciParam/notebook.py (ParameterGrid): Now inherits from wxGridSizer instead of wxBoxSizer. * SciParam/dialog.py: New file. * SciParam/control.py (ParameterDialog, ParameterDistributionDialog, ParameterDetailsBox, ParameterColumn, ParameterGrid, _TestApp): Moved to SciParam/dialog.py. * SciParam/__init__.py, SciParam/notebook.py: Changed imports from control to dialog. * SciParam/version.py: optionally append date of newest file to version string. 2002-11-25 Thomas Koester * doc/gpl.txt, doc/fdl.txt: New documents; fetched from www.gnu.org. * doc/index.html: Applied GNU FDL version 1.2. * COPYING: updated to be identical to doc/gpl.txt. * SciParam/control.py (ParameterLongChoice.SetValue): New method fixing bug #1384. (_TestApp): Added test for ParameterLongChoice.SetValue. 2002-11-05 Bernhard Herzog * SciParam/notebook.py (ParameterNotebook.__init__): Use multiline tabs. Only works on wxMSW apparently. 2002-09-18 Thomas Koester * doc/index.html: Shortened URL for bug tracker. * doc/guielements.html: Fixed typos. * doc/classes.html: "float in range" instead of "float is in range". * doc/create_parameters.html, doc/create_gui.html: Note that "from SciParam import *" is deprecated. 2002-09-13 Thomas Koester * SciParam/control.py (ParameterColumn): New class. * SciParam/control.py (ParameterDialog.count_rows), SciParam/notebook.py (ParameterNotebookDialog.count_rows): New function. (ParameterGrid): Rewritten to use ParameterColumn and ParameterDialog.count_rows(). Ordering of parameters is now: fill current column, then use next column. * SciParam/control.py (ParameterGrid.__init__, ParameterDialog.count_rows): A SciParam with label 'COLUMN_BREAK' now forces switching to a new column. * SciParam/control.py (ParameterDistributionDialog.__init__), SciParam/notebook.py (ParameterNotebookPage.__init__, ParameterNotebook.__init__, ParameterNotebookDialog.add_content): Changed to fit new ParameterGrid arguments. * SciParam/control.py (_TestApp), SciParam/notebook.py (_TestApp): Added tests for COLUMN_BREAK. 2002-09-12 Frank Koormann * SciParam/notebook.py (ParameterNotebook.OnNotebookPageChanged): Removed debug output (OnNotebookPageChanged). 2002-09-11 Thomas Koester * SciParam/control.py (ParameterDialog.GetControls): Removed. * SciParam/control.py (ParameterDialog.__init__): Moved parts into new method add_content(). Added OnSetFocus like in notebook.py. * SciParam/notebook.py (ParameterNotebookDialog): Rewritten; now derived from ParameterDialog. * SciParam/control.py (ParameterDialog.__init__): New argument "show_comment" (default: true). * SciParam/control.py (ParameterDetailsBox): Show comment box only if show_comment is true. 2002-09-10 Thomas Koester * SciParam/control.py, SciParam/notebook.py: _SPACE = 10 again. Make OK the default button. 2002-09-09 Thomas Koester * SciParam/control.py (ParameterDialog.__init__), SciParam/notebook.py (ParameterNotebookPage.__init__): don't resize details box. * SciParam/version.py: new file containig current version number. * setup.py, SciParam/__init__.py: use version number from version.py. * SciParam/version.py: added great-er_20020909 tag to longversion. * tagged as great-er_20020909 * SciParam/version.py: removed great-er_20020909 tag from longversion. 2002-09-05 Thomas Koester * SciParam/parameter.py (ChoiceParam.__setattr__): let SciParam.__setattr__ set the default again. (SciParam.normalize): return default (usually None) if value is unknown. This prevents the default value becoming 'unknown' all the time. (_test_ChoiceParam): added test for the above change. * SciParam/control.py (_TestApp), SciParam/notebook.py (_TestApp): added default value for ChoiceParam to test the above change. 2002-09-04 Thomas Koester * SciParam/parameter.py (SciParam.__setattr__): pass default value through normalize() instead of convert(). 2002-08-28 Thomas Koester * SciParam/range.py (Range.string, Range._float2string): new functions. (Range.__str__): use Range.string() to yield more readable results. * SciParam/parameter.py (SciParam.__setattr__): pass default value through convert() to make it look nicer. * SciParam/parameter.py (ChoiceParam.__setattr__): use the old behaviour for setting default value. 2002-08-21 Jan-Oliver Wagner * SciParam/range.py (Range): Extended number_re to allow nE+nn which is equal to nEnn. (_test): Added test for such numbers. * SciParam/parameter.py (IntParam.convert): first make a float from the string to catch numbers like 1E+02 for 100 2002-08-16 Jan-Oliver Wagner * SciParam/parameter.py: added Unknown with capital U as unknown-string 2002-08-09 Jan-Oliver Wagner * SciParam/parameter.py (ChoiceParam.convert): Added name of parameter to ValueError info. 2002-08-08 Thomas Koester * SciParam/control.py: removed obsolete "import inspect". * SciParam/control.py, SciParam/notebook.py: _SPACE = 8 instead of 10. * SciParam/parameter.py (DistParam.__init__): if dist is not given or None, allow a distribution given in value. * SciParam/range.py (Range.SetRange): Range('') == Range() now. * SciParam/parameter.py (SciParam.__setattr__): if default is '', set it to None. 2002-08-07 Thomas Koester * SciParam/control.py (ParameterDistributionDialog): center Ok and Cancel button. 2002-07-31 Thomas Koester * setup.py: bumped version to "0.9.1cvs". * SciParam/control.py, SciParam/notebook.py, doc/create_gui.html, doc/create_parameters.html, doc/examples/notebook_example.py, doc/examples/parameter_example.py: use ...;oo[ instead of ...;oo] * doc/create_gui.html, doc/create_parameters.html: linked to examples. * doc/examples/notebook_example.py, doc/examples/parameter_example.py: removed CVS tags to match documentation. * MANIFEST.in: include .py examples in doc/examples. * doc/shots/win_small_warning.png, doc/index.html: windows screenshot. * README, doc/index.html, setup.py: new homepage url. * setup.py: bumped version to "0.9.1". * setup.py: bumped version to "0.9.2cvs". 2002-07-30 Thomas Koester * SciParam/control.py (ParameterDialog), SciParam/notebook.py (ParameterNotebookDialog): added pos and size arguments, removed vbox.Fit(self) to stay at given size, style is now passed correctly to wxDialog. * doc/classes.html: documented modules control and notebook. * SciParam/range.py (SetRange): don't convert range to lowercase. (GetRange): return internal representation of range. (__eq__): use new GetRange(). (__str__): don't use new GetRange(). (_test): test __eq__(). * doc/classes.html: documented modules range, distribution, parameter. * setup.py: bumped version to "0.9.0", tagged as SCIPARAM_0_9_0 2002-07-29 Thomas Koester * doc/guielements.html: description of features. * SciParam/parameter.py (SciParam): description is now optional. * doc/create_parameters.html: added some content. * TODO: new todos. * SciParam/notebook.py (ParameterNotebookDialog): don't use SetDimensions. (_TestApp): use list of tuples instead of lists for pages. * SciParam/control.py (ParameterGrid, ParameterDialog), SciParam/notebook.py (ParameterNotebookPage, ParameterNotebook, ParameterNotebookDialog): number of columns defaults to 1 now. * doc/examples/parameter_example.py, doc/examples/notebook_example.py, doc/create_parameters.html, doc/create_gui.html: added sample code. * doc/classes.html, doc/create_gui.html, doc/create_parameters.html, doc/guielements.html, doc/index.html, doc/install.html: added colors for html page and syntax highlighting. 2002-07-26 Thomas Koester * doc/index.html: Page listing documentation and links. Added license section. * setup.py: changed thuban reference to 'the software', added CVS keywords. * doc/install.html: installation instructions * doc/guielements.html, doc/create_parameters.html, doc/create_gui.html, doc/classes.html: documentation templates * SciParam/control.py (ParameterGrid): find location of required.xpm via __file__ variable. Set __file__ = sys.argv[0] if run as script. * doc/guielements.html: added screenshots and descriptions. * doc/index.html, doc/install.html, doc/create_parameters.html, doc/guielements.html: changed "Using the GUI elements" to "SciParam GUI features". * doc/shots/choice_long.png, doc/shots/choice_short.png, doc/shots/details.png, doc/shots/dialog.png, doc/shots/distributed.png, doc/shots/error.png, doc/shots/notebook.png, doc/shots/required_icon.png, doc/shots/warning.png: new linux screenshots. 2002-07-25 Bernhard Herzog * setup.py: Add SciParam/required.xpm (sciparam_install_data): Our own install_data command to put the xpm-file into the package directory on installation 2002-07-25 Thomas Koester * SciParam/control.py (ParameterGrid): always load required.xpm from package directory. * TODO: new file * MANIFEST.in: added TODO, doc/ and SciParam/required.xpm * README: filled with content. * SciParam/control.py, SciParam/notebook.py: moved declaration of sample parameters to _TestApp.OnInit(), to make setlocale happen before reading floats. 2002-07-24 Thomas Koester * SciParam/control.py (ParameterDetailsBox.connect_distribution): don't resize distChoice, because this doesn't look good with wxPython 2.2.9 on Linux. * SciParam/parameter.py (SciParam), SciParam/control.py (ParameterGrid): added a required flag to parameters, which will be displayed in front of the entry controls. * SciParam/required.xpm: new bitmap to show required flag. * SciParam/control.py (ParameterGrid): added tooltip to icon. * SciParam/control.py, SciParam/notebook.py: new sample parameters. 2002-07-23 Thomas Koester * SciParam/distribution.py (Distribution.parameter): mapping from distribution type to texts for needed parameters. * SciParam/parameter.py (convert): now raises ValueError if it can't convert a string or number to internal representation. (normalize): convert string to normalized string or return default. (DistParam): many fixes. (ChoiceParam): now keys and (unique) values are valid for setting a value. * SciParam/control.py (ParameterDistributionDialog): new dialog: input of distribution parameters like mean value and std. deviation (ParameterDetailsBox.OnDistChoice): call ParameterDistributionDialog for new distribution parameters. (ParameterValidator.Validate): check for minimum value in another TextCtrl; needed for uniform distribution. (ParameterCtrl.OnKillFocus, ParameterCtrl.SetValue): new handling for changes in parameter module. (ParameterChoice1): removed. * SciParam/control.py (ParameterValidator.Validate): catch exceptions for invalid characters and display an error dialog. Add distribution type where appropriate. Removed ranges from error/warning dialog to keep it simple. * SciParam/parameter.py (DistParam.is1distinrange): check if distribution is valid/usual; called by is1inrange. * SciParam/parameter.py (ChoiceParam): support for long lists. * SciParam/control.py (ParameterLongChoice): revived ParameterChoice1 to support lists of choices which are too long for radiobuttons. (ParameterDetailsBox): initialize distChoice with long list of Distribution.types, because Windows doesn't resize it later. Resize distChoice after changing the list of choices. 2002-07-19 Thomas Koester * SciParam/control.py, SciParam/notebook.py: adjust Layout for long names and descriptions of parameters. * SciParam/control.py: preliminary support for selecting distribution type with DistParam parameters. * SciParam/__init__.py: added DistParam and Distribution. * SciParam/notebook.py: added tests for DistParam. * SciParam/distribution.py: when initialized with another instance as argument, return a copy of this Distribution instance. * SciParam/parameter.py: many changes for DistParam.convert() and DistParam.string(). is1valid and is1usual now call is1inrange(). * SciParam/control.py (ParameterCtrl.SetValue): more support for DistParam. * SciParam/parameter.py: don't return 'unknown' for converting of invalid values. 2002-07-18 Thomas Koester * SciParam/__init__.py: import only needed classes. * SciParam/parameter.py, SciParam/control.py: removed support for obsolete Parameter class. * SciParam/distribution.py: new class Distribution * SciParam/parameter.py: new class DistParam * SciParam/control.py: tests for DistParam * SciParam/control.py, SciParam/notebook.py: find parameters from list instead of from controls in test. 2002-07-17 Thomas Koester * SciParam/control.py: alternative implementation of ParameterChoice and ParameterChoiceValidator with wxRadioButton; check if using ParameterChoiceValidator is safe. * SciParam/control.py (ChoiceParam): made refocus work. 2002-07-16 Thomas Koester * SciParam/parameter.py: renamed xyzParameter to xyzParam. * SciParam/control.py (_TestApp), SciParam/notebook.py (_TestApp): tests with FloatParam and IntParam. * SciParam/control.py (ParameterDetailsBox): don't use wxID_APPLY as ID for 'Apply Default', because this makes Validate shout. * SciParam/parameter.py (SciParam): moved convert() from FloatParam, __setattr__() always calls convert() for setting value now. * SciParam/parameter.py (FloatParam, IntParam): now support long integer values. * SciParam/parameter.py (ChoiceParam): implemented * SciParam/control.py (_TestApp), SciParam/notebook.py (_TestApp): tests with ChoiceParam. * SciParam/control.py (ParameterGrid): use ParameterChoiceCtrl. (ParameterChoiceCtrl): Control for ChoiceParam. (ParameterChoiceValidator): Validator for ParameterChoiceCtrl, this still crashes with wxWindows 2.2.9.2, but works with 2.3.x * SciParam/parameter.py (ChoiceParam): use self.string() instead of str() to handle unknown values. 2002-07-15 Thomas Koester * SciParam/parameter.py (_test): use english instead of german. * SciParam/range.py, SciParam/parameter.py: seperated Range class from parameter module. * SciParam/parameter.py: rewritten to support more than just floats: FloatParameter and StringParameter should already work. New methods: isvalid(), isusual(), range() * SciParam/control.py (ParameterDetailsBox.connect): use new Parameter method range (ParameterValidator.Validate): use new methods isvalid, isusual * SciParam/parameter.py: use empty string as default for unit and comment. (SciParameter.isunknown): new method; isvalid and isusual now return true if value is unknown. (SciParameter.isunknown): FloatParameter will now convert strings on it's own. * SciParam/control.py (ParameterCtrl.GetValue): removed, this is handled by FloatParameter now. (ParameterCtrl.SetValue): removed float conversion. (ParameterDetailsBox.OnButton): use str(default) for SetValue * SciParam/control.py (ParameterGrid.AddParameter): now handles real parameters in a list. * SciParam/control.py (_TestApp), SciParam/notebook.py (_TestApp): added test with StringParameter. * SciParam/control.py (ParameterValidator.Validate, ParameterCtrl.SetValue, ParameterCtrl.OnKillFocus): update "unknown" and warning/error colors in SetValue, not in Validate. * SciParam/parameter.py (IntParameter): new class for integers. * SciParam/range.py (Range): added support for scientific notation. 2002-07-13 Thomas Koester * SciParam/control.py (ParameterGrid.__init__): replaced ugly while loop with for+range(). 2002-07-11 Thomas Koester * SciParam/control.py (ParameterValidator.Validate): optional argument 'errordialog' to disable popup windows on errors/warnings. (ParameterCtrl.OnKillFocus): do validation without popups here to change the control background color to yellow/red on warning/error. (ParameterCtrl.OnSetFocus): removed validation. * SciParam/notebook.py (ParameterNotebookDialog.OnButtonOK): handle validation inside the dialog because automatic recursive validation is currently broken in wxPython. * SciParam/control.py (ParameterCtrl.OnKillFocus): unset selection when control looses focus. * SciParam/notebook.py (ParameterNotebookDialog.OnSetFocus): set input focus to a ParameterCtrl when the notebook gets focus. * SciParam/control.py (ParameterDetailsBox.OnKillFocus): check if there already is a ParameterCtrl. * SciParam/parameter.py: use float("1e1000") instead of 1e1000 for infinity to make Windows Python bytecode compiler happy. * SciParam/control.py (ParameterDetailsBox.connect): don't show empty descriptions. * SciParam/parameter.py (Range.__eq__, Range.__ne__): added equal and not-equal comparison methods. * SciParam/control.py (ParameterDetailsBox.connect): don't show unlimited ranges. 2002-07-10 Bernhard Herzog * MANIFEST.in, setup.py: New files for distutils * MANIFEST.in: Add ChangeLog * SciParam/__init__.py: Turn SciParam into an actual Python package 2002-07-10 Thomas Koester * SciParam/control.py (ParameterDialog): number of columns changable * SciParam/notebook.py: Place Ok and Cancel buttons outside notebook. (_TestNotebook): renamed to ParameterNotebook; loop to generate more than one notebook page. (_TestFrame, _TestPanel): dropped in favour of ParameterNotebookDialog. (ParameterNotebookDialog): do things the right way * SciParam/control.py (ParameterGrid.refocus), SciParam/notebook.py (ParameterNotebook.OnNotebookPageChanged): Set focus to the previously active control, if it is available. * SciParam/notebook.py (ParameterNotebookPage.__init__): call InitDialog to send parameter values to their controls. (ParameterNotebook.OnNotebookPageChanging): Validate parameters before changing tabs. (ParameterNotebookDialog): added third sample notebook page. * SciParam/control.py (ParameterCtrl.OnSetFocus): set focus to next control after warning range error message is answered with 'Yes'. * SciParam/notebook.py (ParameterNotebookDialog.__init__, _TestApp.OnInit): Print parameter values returned by dialog. 2002-07-09 Thomas Koester * SciParam/control.py (_TestFrame): dropped in favour of ParameterDialog. (_TestApp): use ParameterDialog to handle parameter list. (ParameterDialog): use vbox.Fit method to make Windows draw the window correctly. 2002-06-20 Jan-Oliver Wagner * ChangeLog: started