2002-09-09 Bernhard Herzog * Greater/UI/application.py (main): Add the help menu. (main): Make the _api_interface the default DB interface * dbapiwrapper/genapiwrapper.py (Array.py_to_c): Take the terminating NUL into account when comparing the length of the python string to the length of the char array. 2002-09-09 Frank Koormann * Greater/Modules/session.py (close_session, new_session, open_session): Replaced da_cleanup_temp_sess() with explicit da_delete_sess( current session ). In conjunction with the following this is the fix of http://intevation.de/rt/webrt?serial_num=1269&display=History * Greater/UI/authenticate.py (AuthenticateDialog): Call da_cleanup_temp_sess() after successful connect to database. Store user name in upper case. 2002-09-09 Bernhard Herzog * Greater/Dialogs/editsession.py (EditSessionDialog.dialog_layout): Limit the length of the name to the length in the corresponding field of the db-api struct. (EditSessionDialog.check_values): New method to check the session name. (EditSessionDialog.OnOK): Call check_values. 2002-09-09 Thomas Koester * Greater/Dialogs/editdischargedata.py, Greater/Dialogs/editmarketdata.py, Greater/Dialogs/editmodelparameter.py, Greater/Dialogs/editsubstance.py, Greater/Dialogs/selectmodel.py: removed calls to SetDimensions(). * Greater/UI/mainwindow.py (GreaterMainWindow.About): added version information for GREAT-ER UI, SciParam and DB-API. 2002-09-09 Frank Koormann * Greater/Modules/session.py (edit_session): Added BusyCursor 2002-09-09 Frank Koormann * Greater/Modules/session.py (new_session, open_session, close_session): Updated changes management: Save changes to current session on request. 2002-09-09 Frank Koormann * Greater/Dialogs/editmodelparameter.py (editmodelparameter_dialog): Adapted window title to menu entry. * Greater/Dialogs/selectmodel.py (selectmodel_dialog): Adapted window title to menu entry. 2002-09-09 Frank Koormann * Greater/Modules/parameter.py (CreateParameter): As a workaround choice parameters are created as lists if they are not of type 42 (yes/no choices). 2002-09-09 Bernhard Herzog * Greater/UI/session.py (GreaterSession.rebind): Call the old value's Destroy method. 2002-09-06 Bernhard Herzog * Greater/UI/application.py (main): Remove the standard Thuban commands from the menu * Greater/Dialogs/editsession.py (EditSessionDialog.dialog_layout): Use wxChoice instead of wxComboBox. This fixes bug #1251 and is the right widget anyway because the user shouldn't be able to edit the name of the substance or catchment. * Greater/UI/session.py (GreaterSession.Destroy): New. Extend the inherited method to destroy the simulation_session too. * Greater/Modules/session.py (SimulationSession.Destroy): New. Extend the inherited method to destroy the other PUblisher instances owned by the SimulationSession instance. 2002-09-05 Bernhard Herzog * Greater/Dialogs/authenticate.py (AuthenticateDialog.dialog_layout): Give the database edit widget the initial focus * Greater/Dialogs/editsession.py (EditSessionDialog.__init__): Add the session's current substance as a choice too if it isn't a template anymore. 2002-09-05 Frank Koormann * Greater/Modules/catchment.py (edit_marketdata_tool, edit_dischargedata_tool): Corresponding record in DISCH_TAB to the selected shape of the discharge layer is looked up via the shapes "discharge" attribute. (Fix for Bug #1267) 2002-09-05 Frank Koormann * Resources/Bitmaps/edit_market.xpm: New icon * Resources/Bitmaps/edit_discharge.xpm: New icon * Greater/Modules/catchment.py: Adapted toolbar generation to new icons. 2002-09-05 Bernhard Herzog * Greater/Modules/catchment.py (select_catchment): Display busy cursor during DB operations. * Greater/Dialogs/authenticate.py (AuthenticateDialog.OnOK): Display busy cursor during DB operations. * Greater/Modules/model.py (start_simulation): Display busy cursor during DB operations and simulation. Add doc string * Greater/Modules/session.py (new_session, make_new_session): Split the actual creation of the new session into a separate function to make it easier to display a busy cursor. (edit_session, save_session_as, close_session, delete_session): Add/update doc-string. (disconnect, open_session, save_session, save_session_as) (close_session): Display busy cursor during DB operations 2002-09-05 Frank Koormann * Greater/Modules/session.py (open_session): If the current session is modified, ask the user to proceed before displaying the open dialog. 2002-09-04 Frank Koormann * Greater/Modules/session.py (new_session): Workaround to create a valid temp session (from an immediately deleted permanent one). 2002-09-04 Bernhard Herzog * Greater/Modules/discharge.py (Discharge.Sync): Convert the parameter values to the string representation. * Greater/Modules/model.py (Model.DBSync, Environment.DBSync): Insert the records if they're not in the database yet. 2002-09-04 Frank Koormann * Greater/Modules/session.py (save_session, save_session_as): On save change user ID to the current user. 2002-09-04 Bernhard Herzog * Greater/Modules/discharge.py (Discharge.DBSync): Yet another fix to corectly recognize an empty marketrecord. * Greater/UI/mainwindow.py (GreaterMainWindow.OnClose): Only clean up temp sessions if connected. 2002-09-04 Frank Koormann * Greater/Modules/discharge.py (Discharge.DBSync): Fixed recently introduced bug on if constructs * Greater/Modules/session.py (authenticate): * Greater/UI/application.py (main): Call session.UnsetModified() after session.SetDBConnection() since connecting to a database is performed before any session is open. 2002-09-04 Frank Koormann * simulwrapper/simul/greater_simul.py (simul): Delete cfg-file after simulation. * Greater/Modules/discharge.py (Discharge.DBSync): Insert market record only when changes were made. * Greater/Modules/model.py (Model.DBSync, Environment.DBSync): Check if structures really exist before update. * Greater/Modules/session.py (new_session): Replace fixed user_id by id for current user. Fixed is_temp_sess flag (was 'N' instead of 'Y') (save_session): If we have a new session (i.e. temp_sess_src_id = -1), make it a permanent session simply by changing is_temp_sess instead of calling da_make_temp_sess_permanent. (save_session_as): Fixed bug: unknown sess was used instead of sim.record. 2002-09-02 Bernhard Herzog * Greater/UI/mainwindow.py (GreaterMainWindow.About): Greater/UI/application.py (run_about_dialog): Move the implementation of the about command to the mainwindow. Overriding a method is simpler than redefining a command now that we have a GREAT-ER specific main window. * Greater/UI/mainwindow.py (GreaterMainWindow.OnClose): Override the inherited method to make sure that on a normal exit the temporary sessions are deleted from the database 2002-08-30 Bernhard Herzog * Greater/Modules/catchment.py (CatchmentMap.CanRemoveLayer): Override to disallow deletion of the special layers 2002-08-30 Jan-Oliver Wagner * dbapiwrapper/apispec.py: just added the forgotten update of which version of the API this refers to (it is 2.4). * Greater/Modules/session.py (SimulationSession.__get_results): fixed a bug (no. of params for da_get_res was wrong). (new_session): Now call da_cleanup_temp_sess before creating a new one. (open_session): Now call da_cleanup_temp_sess before opening a new one. (close_session): Now call da_cleanup_temp_sess. 2002-08-29 Jan-Oliver Wagner * Greater/Modules/parameterblock.py (ParameterBlock.SetParameters): new. An alternative to __init__ to set the parameters. * Greater/Modules/catchment.py (Catchment.DBSync): now always set the sess_id and market_id for each discharge before sync'ing it. (select_catchment): Fixed a bug. * Greater/Modules/model.py (Model.__init__, Environment.__init__): Now if mod_id/env_id is -1 an empty list of mod/env-details is used (and can be later set with the new ParameterBlock method SetParameters). (Model.DBSync, Environment.DBSync): Always set the mod_id (env_id) of the single detail-records since they can be -1 e.g. for new sessions. * Greater/Modules/session.py: Comprehensive rework! The basic change is towards a data manegement where session data are mainly kept in dynamic structure in the GREAT-ER GUI Client and only written to the database when it is really necessary to do so (save session, save session as and delete session and of course Start Simulation) 2002-08-29 Jan-Oliver Wagner * Greater/Modules/discharge.py (Discharge.__init__): two additional parameter sess_id and market_id which are required to work with market data. (Discharge.DBSync): Now calls da_insert_market if the corresponding record has ID = -1 (hence not yet in the database). (Discharge._creater_parameters): Fixed call of da_get_market and generalized code. * Greater/Modules/catchment.py (Catchment.__init__): two additional parameter sess_id and market_id which are required to work with market data. * Greater/Modules/session.py: removed dummy setting of cre_date and mod_date as this is fixed now with dagreater 2.5. Adapted to new init-Functions of Catchment. 2002-08-29 Jan-Oliver Wagner * doc/gui_styleguide.tex: Applied real emphasize instead of $$. 2002-08-28 Frank Koormann * simulwrapper/simul/io_dbapi.py: Default Consumption handling fixed. 2002-08-28 Frank Koormann * doc/greater-testplan.tex, doc/gui_styleguide.tex: Added \usepackages{times} for smarter pdf output. 2002-08-28 Jan-Oliver Wagner * doc/greater-testplan.tex: added prerequisit for Sim. 2002-08-28 Jan-Oliver Wagner * Greater/Modules/parameter.py (Parameter.TreeInfo): print data of record, not of SciParam. 2002-08-28 Frank Koormann * simulwrapper/simul/io_dbapi.py: Bugs in "unknown" handling fixed 2002-08-28 Frank Koormann * simulwrapper/simul/io_dbapi.py: Handling of "unknown" values fixed. 2002-08-28 Thomas Koester * doc/greater-testplan.tex: removed unnecessary directive. Changed 'Dialog' to lowercase. Added a 'press Cancel' directive. 2002-08-28 Jan-Oliver Wagner * Greater/UI/application.py (main): Removed default appearance of session tree. 2002-08-28 Frank Koormann * Greater/Dialogs/editdischargedata.py (editdischargedata_dialog): Added name as third parameter to display discharge name in title bar. * Greater/Dialogs/editmarketdata.py (editmarketdata_dialog): Added name as third parameter to display discharge name in title bar. * Greater/Modules/catchment.py (editdischargedata_tool, editmarketdata_tool): Call according dialog with discharge name. 2002-08-28 Jan-Oliver Wagner * Greater/Modules/substance.py (Substance.DBSync): Fixed bug 1252 (now test for record == None) 2002-08-28 Thomas Koester * doc/greater-testplan.tex: changed geometry, splitted two tests, corrected logical errors. * doc/greater-testplan.tex: reverted geometry to old width. 2002-08-28 Frank Koormann * Greater/Modules/model.py (start_simulation): Added DBSync. * Greater/Modules/session.py (SimulationSession.SetCatchment): When changing the catchment update SimulationSession.Results after deletion of results. 2002-08-28 Jan-Oliver Wagner * Greater/Modules/session.py (new_session): Fixed a bug (create only real parameters, not group-separators). * Greater/Modules/substance.py: Removed menu item Delete. * doc/greater-manual.tex: Removed menu item Delete. 2002-08-28 Thomas Koester * doc/greater-testplan.tex: fixed typos, inserted \pagebreak. 2002-08-28 Bernhard Herzog * Greater/Modules/catchment.py (EditTool.__init__, EditTool.MouseUp): fetch the discharge layer in MouseUp instead of specifying it as an instance variable. The layer may have been destroyed because the catchment was changed. layer may have changed (start_edit_tool, edit_marketdata, edit_dischargedata): No need to pass the layer around anymore. 2002-08-28 Jan-Oliver Wagner * doc/greater-testplan.tex: Added 'Session Management', 'Substance Management' and 'Simulation' section. Some typos fixed. 2002-08-28 Thomas Koester * doc/greater-testplan.tex: Added 'Parameter Dialogs' section. Fixed small typos and layout. * doc/greater-testplan.tex: Used \verb command for . * doc/greater-testplan.tex: Added 'Catchment/Discharge Management' section. * doc/greater-testplan.tex (Parameter Dialogs): added one test. * doc/greater-testplan.tex: Added 'Model' section. 2002-08-28 Jan-Oliver Wagner * doc/greater-testplan.tex: Rework. new enumeration, now with sections, and other face lifting. 2002-08-28 Thomas Koester * doc/greater-testplan.tex: Added usage and failure report guide. 2002-08-28 Frank Koormann * Greater/Modules/model.py (start_simulation): Start simulation and upload results on success. * simulwrapper/simul/greater_simul.py: Changed import path. * Greater/Dialogs/authenticate.py (AuthenticateDialog.OnOK): Added password to the returned values. * Greater/Modules/results.py: import da_get_res_stretch, da_get_res_disch. * Greater/Modules/session.py (DBConnection.__init__): Added password. * Greater/UI/application.py (main): Added password to DBConnection. 2002-08-28 Jan-Oliver Wagner * Greater/Modules/substance.py (Substance.__init__): now if the substance record is a template, a copy is created in the database and used for the instance of Substance. Of course all substance details are copied as well. * Greater/Modules/session.py (new_session): Fixed bug for results. (SimulationSession.SetXXX, XXX=Substance, Model, Environment, Results): fixed to handle None. 2002-08-28 Frank Koormann * Greater/Modules/session.py (SimulationSession.SetCatchment): Fixed handling of result deletion. Currently only reset the session.res_id to -1 (SimulationSession.CopySession): Updated insert of session to API v2.5 * simulwrapper/simul/greater_simul.py (greaterSimul): Updated da_get_sess to API v2.5, fixed handling of MCshots represented in exponential notation. * simulwrapper/simul/io_dbapi.py (rewriteResults): Fixed handling of result deletion. Currently only reset the session.res_id to -1. Updates to API v2.5 (Substance): Fixed handling of "unknown" values * simulwrapper/simul/io_core.py (RiverClass): Fixed SS_VAL bug 2002-08-27 Jan-Oliver Wagner * Greater/Modules/catchment.py (Catchment.DBSync): new. update all discharge data to database * Greater/Modules/discharge.py (Discharge.DBSync): new. this method does not update the database yet - read the comments. * Greater/Modules/parameter.py (Parameter.Sync): fixed bug. * Greater/Modules/parameter.py (Substance.DBSync): new. update substance and all substance details to database. * Greater/Modules/session.py (SimulationSession.Sync): new. update record from component data. (SimulationSession.DBSync): new. update session and all its components to database. (save_session): call Sync and DBSync; sync-code moved to Sync(). * Greater/Modules/model.py (Model.DBSync, Environment.DBSync): new. update details to database. 2002-08-27 Jan-Oliver Wagner * Greater/Modules/catchment.py: Sync SciParam and DB record after dialogs returned with OK. * Greater/Modules/substance.py (Substance.Sync): new. copy back inputs from SciParams to the records * Greater/Modules/discharge.py (Discharge.TreeInfo): Also print the contents of the marketrecord. (Discharge.Sync): new. copy back inputs from SciParams to the records. (Discharge._create_parameters): build self.disch_parameter_dict and self.market_parameter_dict to support Sync(). * Greater/Modules/parameterblock.py (ParameterBlock.Sync): new. copy back inputs from SciParams to the records. * Greater/Modules/parametergroup.py (ParameterGroup.Sync): new. copy back inputs from SciParams to the records. * Greater/Modules/parameter.py (Parameter.Sync): new. copy back inputs from SciParams to the records. (distrib_ids): new (CreateParameter): use distrib_ids. * Greater/Modules/model.py: call Sync() after Dialogs are finished with OK. 2002-08-27 Bernhard Herzog * setup.py (GenerateWrapper.run): Also check oracle_interface_lib when deciding whether to create _api_interface.c 2002-08-27 Thomas Koester * doc/greater-testplan.tex: Use \CVSRevision command. * doc/Makefile, doc/greater-testplan.tex: Added test plan. * doc/Makefile: Removed references to old documents. Changed DOCUMENTS to greater-manual and gui_styleguide. 2002-08-26 Bernhard Herzog * Greater/UI/mainwindow.py: New module with a GREAT-ER specific mainwindow class * Greater/UI/application.py (GreaterApplication.CreateMainWindow): Use th new mainwindow class 2002-08-26 Frank Koormann * doc/greater-manual.tex: Added "\usepackage{times}" for readable pdf-documents. 2002-08-26 Frank Koormann * doc/greater-manual.tex: Fixed some typos. * doc/Makefile: new. 2002-08-26 Jan-Oliver Wagner * Greater/UI/application.py (main): Added option --alpha which will enable the alpha module. * Greater/Modules/alpha.py: new. module for alpha-test code. * Greater/Modules/catchment.py: Now loads stretch and discharge records explicitely (to easily show them in tables). * Greater/Modules/results.py (Results._get_stretch_results, Results._get_stretch_results): new. Load corresponding records from the database. * Greater/Modules/datatable.py: Now records is assumed to contain database records directly instead of assuming each record contains a component 'record'. * Greater/Modules/session.py (SimulationSession.Results): new 2002-08-26 Bernhard Herzog * Greater/Modules/datatable.py: New module for a table class holding greater DB records. 2002-08-26 Jan-Oliver Wagner * Greater/Modules/results.py: new 2002-08-26 Jan-Oliver Wagner * Greater/Modules/session.py (SimulationSession.SetCatchment): Fixed bug to handle as catchment. Avoid -1 for da_get_catch as already improved for the other da_get functions. 2002-08-24 Jan-Oliver Wagner * Greater/Modules/analysis.py: menus now have sensitivitiy to context_results_exist. * Greater/Modules/model.py: Added ID of model and environment to the TreeInfo. * Greater/Modules/session.py: Added handling of Results. Bug fix for selecting no substance. Improvement for da_get_-functions where id of -1 occurs as indicator for no record: Avoid to call da_get_ with -1 as this will retrieve all records. Removed ID output from TreeInfo (it is no in the corresponding sub-classes). * Greater/Modules/substance.py: Added ID of substance to the TreeInfo. * Greater/UI/context.py: Added context_results_exist. * Greater/Dialogs/opensubstance.py: Fixed bug on pre-selection. 2002-08-23 Bernhard Herzog * Greater/UI/application.py: Replace Thuban's about box with a GREAT-ER one (run_about_dialog): Implement the about box. 2002-08-23 Jan-Oliver Wagner * doc/screenshots/mcshots-dlg.eps: removed * doc/screenshots/backgroundconcentration-dlg.eps: removed * doc/greater-manual.tex: removed menues for bg-conc and mc-shots 2002-08-23 Jan-Oliver Wagner * dbapiwrapper/apispec.py: various fixes in stub data * Greater/Modules/discharge.py: renamed parameter key CONSUMPTION to SITE_CONSUMPTION 2002-08-23 Frank Koormann * Greater/Dialogs/selectcatchment.py (_TestApp.OnInit): Print the returned catch_id instead of the instance. * Greater/Modules/session.py (SimulationSession.SetCatchment): On change delete market and result data, update record and sync database. (SimulationSession.SetSubstance), (SimulationSession.SetModel), (SimulationSession.SetEnvironment): update record and sync database. (SimulationSession.CopySession): Fixed bug in market data copying: market_id was not set to new ID. (SimulationSession.TreeInfo): Added catch_id, subst_id, mod_id and end_id to the tree. (save_session_as): replaced da_insert_sess with da_update_sess: The second insert with same references caused the problems under delete_session. 2002-08-23 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (DBInsertFunction.py_wrapper): Handle insert functions with more parameters than the struct DA_S_err 2002-08-23 Frank Koormann * Greater/Modules/session.py: Adapted call of da_create_temp_sess() to new wrapper implemenation. (delete_session): Bug fixed: changed "none" to "None" 2002-08-22 Frank Koormann * Greater/Dialogs/opensession.py: Added title paramater to open the dialog with variable title. (OpenSessionDialog.dialog_layout): Fixed API call to get substance list, corrected hanling of "None" values for substance and catchment. * Greater/Dialogs/savesessionas.py: Fixed handling of "None" values for catchment and substance. * Greater/Modules/catchment.py (Catchment.TreeInfo): catch_id added to the list. * Greater/Modules/session.py: Session handling added. (SimulationSession.CopySession): New method to return a full copy of the current session. Create new entries in the SESS_TAB and all related tables (substance, environment, model, market, result). (SimulationSession.TreeInfo): sess_id added to the list. (new_session): Rewritten to create new session with name, remark, catchment and substance depending on user inputs and environment and model structures filled with default values. (open_session): Added handling of temporary sessions and title feature. (save_session): Added handling of temporary sessions and "None" values. (delete_session): New feature. 2002-08-22 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (SpecialFunction.__init__): New parameter output_params for lParameters of the C function that are really output functions and should not be parameters of the python wrapper function. * dbapiwrapper/apispec.py (da_create_temp_sess): Add output_params parameter to ignore sess_id_tmp in the python wrapper. 2002-08-22 Jan-Oliver Wagner * Greater/Modules/parameter.py (Parameter.TreeInfo): fixed output so that now the value, dist-type and required are shown based on the SciParam and not the record. * Greater/Modules/substance.py (Substance.__init__): bugfix to allow None as record. * Greater/Modules/model.py (Model.__init__, Environment.__init__): bugfix to allow None as record. * dbapiwrapper/apispec.py: various fixes in stub-data of para_tree_def_tab 2002-08-22 Bernhard Herzog * Greater/UI/application.py (main): Also pass the toolbar to the init_menu functions. * Greater/Modules/substance.py (init_menu), Greater/Modules/session.py (init_menu), Greater/Modules/model.py (init_menu), Greater/Modules/analysis.py (init_menu): Add the toolbar parameter * Greater/Modules/catchment.py (init_menu): Add the toolbar parameter adnd add the edit_marketdata and edit_dischargedata commands to the toolbar as well. (Commands edit_marketdata, edit_dischargedata): Turn them into tools by adding an icon and a "checked" callback * Greater/Modules/session.py (save_session_as): Remove the XML debug code. 2002-08-22 Jan-Oliver Wagner * Greater/Modules/parametergroup.py: new (Class ParameterGroup) * Greater/Modules/parameterblock.py: new (Class ParameterBlock) * Greater/Modules/parameter.py (is_param_greater): new (Parameter.TreeInfo): Removed Group and Block-ID * Greater/Modules/model.py: Model and Environment now derived from class ParameterBlock. * Greater/Modules/substance.py: Substance now derived from class ParameterBlock. * dbapiwrapper/apispec.py: Group GENERAL of MOD added. 2002-08-22 Bernhard Herzog * Greater/Modules/catchment.py (GreaterLayer): New class for the greater specific layers for a catchment's shapefiles. (CatchmentMap): The shapefiles are now retrieved from the db outside of the catchment map and the catchment map may be constructed from a (sort of) thuban session file. This means that: (CatchmentMap.__init__): New parameters for the shapefile names and the temporary directory (CatchmentMap.make_temp_dir, CatchmentMap.SetCatchment) (CatchmentMap.build_layers): Removed. (catchment_map_from_catchment): New function to create a CatchmentMap from the database information * Greater/UI/session.py (GreaterSession.update_map): Always create a new Catchment map if there is a catchment and don't update in place. (GreaterSession.Serialize): New method to return an XML representation of the session * Greater/UI/serialize.py: New module to create and parse the greater/thuban session XML representation. * Greater/UI/application.py (main): Remove some debug prints and add newlines to the messages written to stderr. * dbapiwrapper/genapiwrapper.py (SpecialFunction): New class for wrappers that are code completely by hand. * dbapiwrapper/apispec.py: Implement da_create_temp_sess, da_make_temp_sess_permanent and da_cleanup_temp_sess 2002-08-21 Jan-Oliver Wagner * Greater/Modules/discharge.py, Greater/Modules/parameter.py, Greater/Modules/substance.py: replaced "UNKNOWN" by "%" as required by the new dagreater 2.4 * Greater/Modules/session.py: replaced "Y" by "%" as required by the new dagreater 2.4 2002-08-21 Jan-Oliver Wagner * Greater/Dialogs/opensession.py: adaption to new dagreater 2.4: da_get_sess and da_get_subst * Greater/Modules/model.py: adaption to new dagreater 2.4: da_get_para_tree * Greater/Modules/parameter.py: adaption to new dagreater 2.4: da_get_para_tree * Greater/Modules/substance.py: adaption to new dagreater 2.4: da_get_para_tree 2002-08-21 Frank Koormann * Greater/UI/application.py main(): DB connection infos were mixed up for the session tree when connecting via db-auto-login. 2002-08-21 Jan-Oliver Wagner * Greater/Dialogs/mcshots.py: removed (now part of model parameters) * Greater/Dialogs/backgroundconcentration.py: removed (now part of model parameters) * dbapiwrapper/apispec.py: added several group headers for stub da_get_para_tree now can deliver group headers. Phrase Yes/no now offers 'Y'/'N' instead of '1'/'0'. * Greater/Modules/substance.py: Groups are now automatically build from the database. * Greater/Modules/model.py: Groups are now automatically build from the database. Removed menu item and asociated functions for mc-shots and background-concentration. Renamed the remaining two menu items of Model. 2002-08-21 Bernhard Herzog * dbapiwrapper/parse_function_proto.py (parse_prototype): lowercase the parameter names. (format_function): Remove the superfluous open paren from the default function case. * dbapiwrapper/apispec.py: Update for API Specification 2.4 * Greater/UI/application.py (main): Add db-auto-login commandline option (requires env. var GREATER_DB_PARAMS to be set to USERNAME:PASSWORD:DBNAME). 2002-08-21 Frank Koormann * Greater/UI/session.py (GreaterSession.update_map): Work around Greater.Modules.catchment.CatchmentMap.SetCatchment() since current_map can also be an instance of Thuban.Model.map.Map 2002-08-21 Frank Koormann * Greater/Dialogs/savesessionas.py: New * Greater/Dialogs/editsession.py: Added variable window title. * Greater/Modules/model.py: Added handling of None for Model and Environment * Greater/Modules/session.py: Added save session features (new_session): Call run_editsession_dialog() and create new session. Currently not functional due to DB API limits. (SimulationSession._get_catchment), (SimulationSession._get_substance), (SimulationSession._get_model), (SimulationSession._get_environment): Handling of empty DB query results (SimulationSession.SetModel),(SimulationSession.SetEnvironemnt): added (edit_session): Dialog Title added (save_session): Execute da_db_commit (save_session_as): Call run_savesessionas_dialog() and insert new session record into database, execute da_db_commit * Greater/UI/session.py (GreaterSession.update_map): Handling of catchment.record == None added. 2002-08-20 Jan-Oliver Wagner * doc/greater-manual.tex: updated menu File description according to recent changes * Greater/Modules/catchment.py: Introduced default colors for the default layers. * Greater/Modules/session.py: fixed a bug in open_session 2002-08-20 Jan-Oliver Wagner * Greater/UI/context.py: added context_substance_open and context_catchment_open * Greater/Dialogs/authenticate.py: Now dialog returns a tupel (database and username). Fixed dialog-test. * Greater/Dialogs/selectcatchment.py: Now allows to handle as an option for the selection. Fixed dialog-test. * Greater/Dialogs/opensubstance.py: Now allows to handle as an option for the selection. Fixed dialog-test. * Greater/Dialogs/editsession.py: Now allows to handle as an option for the selections of substance and catchment. Fixed dialog-test. * Greater/Modules/catchment.py: Menu items now sensitive to whether there is no current catchment. Added handling for the opportunity to have no catchment selected. * Greater/Modules/substance.py: Menu item Edit Substance now sensitive to whether there is no current substance. Added handling for the opportunity to have no substance selected. * Greater/Modules/session.py: Added call of da_db_disconnect. Added info about connected database in TreeInfo. Fixed edit_session: now full extent is shown automatically to show the newly selected catchment. 2002-08-19 Jan-Oliver Wagner * Greater/UI/context.py: removed context_session_unmodified (not required anymore). * Greater/Modules/session.py: Implemented disconnect. Reworked close_session (now launches a confirmation dialog). 2002-08-19 Jan-Oliver Wagner * dbapiwrapper/apispec.py: Various changes in the stub data * Greater/UI/context.py: Added context_session_modified and context_session_unmodified * Greater/UI/session.py(GreaterSession.SetSimulationSession): Now handles None as parameter that indidicates to remove the session. * Greater/Modules/session.py: Added further menu sensitivity to context states. Implemented close_session. * Greater/Modules/parameter.py: Fixed a small bug in calling da_get_phrase_grp(). 2002-08-19 Frank Koormann * simulwrapper/simul/greater_simul.py (greaterSimul): Fixed access to mod_tab-values. * simulwrapper/simul/io_core.py (Substance): Handling of K_MAX and distributed values fixed. * simulwrapper/simul/io_dbapi.py (Substance): Processing of distributed parameters fixed. (rewriteResults): Session handling fixed. * simulwrapper/simul/io_dbf.py (River): Cast river length to string. * Greater/Dialogs/opensession.py: Dialog title changed. 2002-08-17 Frank Koormann * simulwrapper/simul/io_dbapi.py: new * simulwrapper/simul/io_core.py, simulwrapper/simul/greater_simul.py: Adaptions to the specific requirements for the DB API 2002-08-15 Jan-Oliver Wagner * dbapiwrapper/apispec.py: Various changes in the stub data to harmoinize with TDs Oracle contents. * Greater/Modules/model.py: Split up class Model into Model and Environment. * Greater/Modules/session.py: New menu items disconnect and close session. New component environment of session. * Greater/UI/context.py: new context context_db_closed * Greater/Dialogs/editsession.py: fixed upcase/lowercase bug * Greater/Dialogs/opensubstance.py: fixed upcase/lowercase bug * Greater/Dialogs/opensession.py: import statement shifted to the top 2002-08-15 Bernhard Herzog * Greater/Modules/catchment.py (CatchmentMap.__del__) (CatchmentMap.Destroy): Call remove_temp_dir after calling the inherited method. On windows we have to be sure that all files are closed before we try to remove them as open files can't be closed. * dbapiwrapper/genapiwrapper.py (ListStruct.from_dict_impl): Revert the changes to return value of the generated from_dict function. (DBInsertFunction.c_method_impl, DBUpdateFunction.c_method_impl): Create an exception object when the argument isn't a dictionary. 2002-08-14 Jan-Oliver Wagner * Greater/Dialogs/errordialogs.py: new * Greater/Dialogs/opensession.py: intermediate fix for calling da_get_subst * Greater/Modules/parameter.py (CreateParameter): Added error handling * Greater/Modules/session.py: intermediate fix for calling da_get_subst * Greater/Modules/discharge.py: replaced DUMMY by UNKNOWN for all calls of CreateParameter * dbapiwrapper/apispec.py: Added functions da_db_commit, da_db_rollback; Added substance parameter K_SED for stub; Adapted some field_id's to be compatible with TechniData; Temporarily deactived params of da_delete_market 2002-08-14 Frank Koormann * simulwrapper/simul/io_dbf.py: fixed indention error in function Discharge 2002-08-14 Bernhard Herzog * setup.py (GenerateWrapper.initialize_options) (greater_build.initialize_options) (GenerateWrapper.finalize_options): New option oracle-interface-lib to build the API wrapper linked to a DLL (GenerateWrapper.add_oracle_interface) (GenerateWrapper.oracle_extension_from_file) (GenerateWrapper.oracle_extension_from_lib): Split add_oracle_interface into two new methods one for building with a single extra C-file and one for building with a DLL. * Greater/UI/application.py (main): Fix bug in option processing. * dbapiwrapper/genapiwrapper.py (format_py_module) (generate_wrapper): Make the generated python module more flexible with regard to which cmodule to use so that it can be used with both the stub and the real DB API interface. (WrappedFunction.py_wrapper): Generate a real python function so that it's dispatched to the c-module at runtime. * setup.py (GenerateWrapper.run): Only generate the python wrapper module once as Greater/DB/pyinterface.py. * Greater/DB/interface.py: The python module of the API implementation is now called pyinteface (set_api_interface): New function to select an implementation of the DB interface. * Greater/UI/application.py (main): New command line argument to specify the DB API module to use. 2002-08-13 Bernhard Herzog * setup.py (GenerateWrapper.user_options) (GenerateWrapper.initialize_options) (GenerateWrapper.finalize_options): Add oracle-interface-file option to specify the C-api implementation to use. (GenerateWrapper.add_oracle_interface): Method to create the real API wrapper module definition (GenerateWrapper.run): Only generate the real wrapper if the oracle-interface-file options was given. (greater_build): Our own build command to pass the oracle-interface-file through. 2002-08-13 Jan-Oliver Wagner * Greater/Dialogs/opensession.py: added some debug code 2002-08-13 Jan-Oliver Wagner * Greater/Dialogs/authenticate.py: Added third text entry field: Database. Added SPACE for Styleguide compliance. 2002-08-13 Bernhard Herzog * setup.py (GenerateWrapper.run): Generate the files for both the stub implementation and the actual API wrapper. * dbapiwrapper/apispec.py (da_db_connect, da_get_sess): err_type is a simple char now (DA_S_group_priv): Fix spelling of group_priv_id (DA_S_res): river_factor now char[41] (DA_S_group_priv): Add a _priv suffix to create, read, write and delete * dbapiwrapper/genapiwrapper.py (Struct.c_definition): Optionally generate a typedef for the struct as well. (Struct.typedef_name): New method to provide a suitable typedef name (format_c_header): Generate the typedefs for the structs as well. (WrappedFunction.c_method_impl, DBGetFunction.c_method_impl) (DBInsertFunction.c_method_impl, DBUpdateFunction.c_method_impl) (DBDeleteFunction.c_method_impl): Use DA_T_errinfo instead of DA_S_errinfo (WrappedFunction.c_method_impl, DBGetFunction.c_method_impl) (DBGetFunction.c_stub, DBInsertFunction.c_method_impl) (DBUpdateFunction.c_method_impl, DBDeleteFunction.c_method_impl): err_type is a simple char now (read_specification): Only read specification once. (format_api_module): New parameter for additional header files. (generate_wrapper): New parameters to specify whether the c header should actually be written and for additional headers. (DBGetFunction.c_stub): Call the correct function when escaping strings and convert string values to string explicitly because some start as Python numbers 2002-08-13 Bernhard Herzog * Greater/DB/interface.py: New module to select one of the DB api implementations. Use this module to access the interface, not one of the actual implementations. * Greater/Dialogs/opensession.py (OpenSessionDialog.__init__) (OpenSessionDialog.dialog_layout, OpenSessionDialog.EvtListBox), Greater/Modules/substance.py, Greater/Modules/session.py, Greater/Modules/parameter.py, Greater/Modules/model.py, Greater/Modules/discharge.py, Greater/Modules/catchment.py, Greater/Dialogs/selectcatchment.py, Greater/Dialogs/opensubstance.py, Greater/Dialogs/editsession.py (EditSessionDialog.dialog_layout), Greater/Dialogs/authenticate.py: Use the new AB-API interface module 2002-08-13 Jan-Oliver Wagner * Greater/Dialogs/authenticate.py: db_connect: renamed to da_db_connect * Greater/Modules/parameter.py: da_get_phrase replaced by da_get_phrase_grp * Greater/Modules/session.py: removed output of is_templ * dbapiwrapper/genapiwrapper.py: renamed err_code to success and swithed logics accordingly. * dbapiwrapper/apispec.py: renamed db_connect to da_db_connect; fixed forgotten upcase variables STRETCH_ID, SESS_ID to lower case; deactivated da_get_phrase with comment 2002-08-13 Jan-Oliver Wagner * dbapiwrapper/apispec.py: exchange 1 and 0 in all returns; (da_get_group_priv): rename modul to module (da_get_message): disable this function with comment * dbapiwrapper/genapiwrapper.py: exchanged 1 and 0 in all returns 2002-08-12 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (VoidType): Implement a void type (Pointer.parse_tuple_char): New. We have char* function parameters now (DBGetFunction.c_method_impl): The free functions now return void, so don't check their return values. (DBUpdateFunction.struct_parameter_type): There's no errinfo parameter anymore. (DBFreeFunction.c_stub): Don't return a value in the generated code. 2002-08-12 Jan-Oliver Wagner * dbapiwrapper/apispec.py: updated for API 2.3 2002-08-12 Jan-Oliver Wagner * dbapiwrapper/apispec.py: cleaned up stub data for discharges * Greater/Modules/analysis.py: all menus now only active when a session is open; all menus will launch an information dialog 'no implemented' * Greater/Modules/substance.py: new and delete substance now show dialog 'not implemented'. * Greater/Modules/session.py: 'not implemented' dialogs for not implemented menu items; added save as and delete * Greater/Modules/model.py: all menus now only active when a session is open; 'not implemented' dialogs for not implemented menu items * Greater/Modules/catchment.py: renamed a menu item titel * Greater/Modules/discharge.py: removed a discharge parameter; added TODO * doc/greater-manual.tex: renamed a menu item 2002-08-12 Jan-Oliver Wagner * GREAT-ER/dbapiwrapper/apispec.py: renamed market parameter * Greater/Modules/discharge.py: renamed market parameter 2002-08-12 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added market parameters and a missing phrase * Greater/Dialogs/editmarketdata.py: replaced run_editmarketdata_dialog by test_editmarketdata_dialog * Greater/Dialogs/editsession.py: fixed bug (lower case record elements) * Greater/Dialogs/selectcatchment.py: fixed bug (lower case record elements) * Greater/Modules/parameter.py: new function CreateParameter() allows to create scientific parameters even without a detail-Parameter (e.g. as required for discharge site data) * Greater/Modules/discharge.py: now retrieves discharge and market parameter details from database * Greater/Modules/catchment.py: turned edit market data dialog into a tool 2002-08-09 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added model selection parameters to stub * Greater/Modules/model.py: now builds selection dialog with parameter from DB 2002-08-09 Jan-Oliver Wagner * dbapiwrapper/apispec.py: fixed/improved phrases * Greater/Modules/parameter.py(_create_parameter): Now retrieves phrases from database 2002-08-09 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added various model parameters for the stub * Greater/Modules/model.py: model parameters now retrieved from the database 2002-08-09 Jan-Oliver Wagner * Greater/Dialogs/selectmodel.py: replaced run_selectmodel_dialog by test_selectmodel_dialog; import from SciParam now explicit * Greater/Dialogs/editmodelparameter.py: replaced run_editmodelparameter_dialog by test_editmodelparameter_dialog; import from SciParam now explicit * Greater/Modules/model.py: (temporarily) added explicitly parameters for parameter and selection dialogs. All dialog now set 'model.changed(CHANGED)' accordingly. * Greater/Modules/substance.py: removed import of SciParam 2002-08-08 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (format_c_files): Ignore all files that contain "CVS". Open files in binary mode. Make the size of the arrays explicit so that it won't contain an additionall NUL byte. Split long files into several string literals to work around limitations in MSVC * Greater/Modules/catchment.py (CatchmentMap.build_layers): Write the temporary files in binary mode. 2002-08-08 Jan-Oliver Wagner * dbapiwrapper/apispec.py: numerous substance data added to stub; activated phrases * Greater/Modules/parameter.py: added handling of DISTRIB parameters; raw handling of ChoiceParams; group_id now shown in tree; removed some debug-prints; added error-handling for unknown var-types * Greater/Modules/substance.py: now gets all its parameters from the database 2002-08-08 Frank Koormann * simulwrapper/lib/dbfpy/binnum.py, simulwrapper/lib/dbfpy/dbfload.py, simulwrapper/lib/dbfpy/dbfnew.py, simulwrapper/lib/dbfpy/dbf.py, simulwrapper/lib/dbfpy/__init__.py, simulwrapper/lib/dbfpy/strutil.py, simulwrapper/lib/dbfpy/CHANGES, simulwrapper/lib/dbfpy/README: dbfpy Module (http://www.fiby.at/dbfpy/index.html) added. * simulwrapper/simul/greater_simul.py, simulwrapper/simul/io_core.py, simulwrapper/simul/io_dbf.py: GREAT-ER 1.0 simulator wrapper added. * simulwrapper/simul/simul, simulwrapper/simul/simul.exe: GREAT-ER 1.0 simulator binaries added. 2002-08-08 Thomas Koester * doc/gui_styleguide.tex: added * doc/gui_styleguide.tex: Yes, No, Cancel is a valid combination of buttons, too. 2002-08-07 Jan-Oliver Wagner * dbapiwrapper/apispec.py, dbapiwrapper/genapiwrapper.py: updated according to API Spec 2.2 v2 * Greater/Modules/substance.py, Greater/Modules/catchment.py, Greater/Modules/parameter.py, Greater/Modules/recordwrapper.py, Greater/Modules/session.py, Greater/Modules/discharge.py, Greater/Modules/model.py, Greater/Dialogs/opensession.py: made compliant with API Spec 2.2 v2 (record elements now lower case) 2002-08-05 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (format_c_files): Make the strings static but non-const (non-const to avoid lots of compiler warnings). * Greater/Modules/parameter.py (Parameter.TreeInfo): Take the tree info items from the parameter object so that it reflects the values the user entered. * Greater/Modules/substance.py (edit_substance): Use the public method to get the substance 2002-08-01 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added parameter MC_SHOTS, added specific C stub for da_get_mod_det. Greater/Dialogs/mcshots.py (run_mc_shots_dialog): replaced by test_mc_shots_dialog * Greater/Modules/parameter.py: added handling of VAR_TYPE INT. Now also considers default values. * Greater/Modules/model.py: added handling of MC-Shots 2002-07-31 Jan-Oliver Wagner * dbapiwrapper/apispec.py: more stub data and c_body * Dialogs/backgroundconcentration.py: replaced run_background_concentration_dialog by test_background_concentration_dialog * Greater/Modules/session.py: added class element model * Greater/Modules/model.py: added class Model * Greater/Modules/parameter.py: now retrievs parameter description from DB; extended tree info 2002-07-30 Bernhard Herzog * Greater/UI/application.py (main): Parse command line options. Only one option so far: --stub-auto-login to ease testing. * Greater/Modules/catchment.py (CatchmentMap.clear_layers) (CatchmentMap.build_layers): Removed clear_layers. It's now implemented in the base class under the name ClearLayers. * Greater/UI/application.py (GreaterApplication.OnExit, main): OnExit is now handled in Thuban. 2002-07-30 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added some DA_S_subst_det stubs, explicit c_body for da_get_subst_det * Greater/Modules/parameter.py: new * Greater/Modules/substance.py: added handling of parameters (work not finished) * Greater/Modules/catchment.py: discharges in tree now at last; edit_dischargedata_dialog: renamed to edit_dischargedata_tool * Greater/Dialogs/editdischargedata.py: run_editdischargedata_dialog removed. some clean-ups * Greater/Dialogs/editsubstance.py: run_editsubstance_dialog removed. some clean-ups 2002-07-30 Jan-Oliver Wagner * dbapiwrapper/apispec.py: explicit c_body for da_get_disch * Greater/Modules/discharge.py: new * Greater/Modules/catchment.py: added handling of discharges * Greater/Dialogs/editdischargedata.py (run_editdischargedata_dialog): now receives discharge object to use for the dialog * Greater/Dialogs/editdischargedata.py (test_editdischargedata_dialog): former run_editdischargedata_dialog, but now always outputs debug info 2002-07-29 Bernhard Herzog * Greater/Modules/session.py (open_authenticate, session): Remove debug prints. * Greater/Modules/catchment.py (CatchmentMap.clear_layers): Don't loop over a list while modifying it. * Greater/UI/application.py (main): Switch positions of Substance and Catchment menus * Greater/Modules/model.py (init_menu): Swich positions of Model and Simulation menus * Greater/UI/application.py (GreaterApplication.OnExit, main): New cleanup method that has to be called in main. * Greater/Modules/recordwrapper.py (RecordWrapper.__init__): Call the base class' constructor as well. * Greater/Modules/catchment.py: Rework the tempfile handling. Now we create one temporary directory in which all our files will be placed. (CatchmentMap.__init__): New instance variable temp_dir. (CatchmentMap.remove_temp_dir): New method to remove the temporary directory and all the files in it. (CatchmentMap.Destroy, CatchmentMap.__del__): Make sure the temp dir is removed. (CatchmentMap.make_temp_dir): Create the temporary directory. (CatchmentMap.build_layers): Create the temporary files in the temoprary directory. Bind the layer with the discharges to an instance variable so that we can easily refer to it. (CatchmentMap.DischargeLayer): New method to return the layer containing the discharges. (EditTool): New tool to select a shape and start a dialog. (start_edit_tool): Helper function to start the edit tool (edit_dischargedata): This command now starts the edit tool which later runs the dialog. (edit_dischargedata_dialog): Helper function for edit_dischargedata to run the dialog 2002-07-29 Jan-Oliver Wagner * dbapiwrapper/genapiwrapper.py, dbapiwrapper/apispec.py: update according to new API 2.2 * Greater/Modules/catchment.py: replaced calls of da_get_bin_obj_file by new version of da_get_bin_obj (as required by new API 2.2) 2002-07-29 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added stub-data for discharges * dbapiwrapper/apispec.py: added Ems as second demo catchment * dbapiwrapper/stub_files/ems/*: new 2002-07-26 Bernhard Herzog * dbapiwrapper/genapiwrapper.py (format_c_files): Fix glob pattern to not match the CVS subdirectories * Greater/Modules/substance.py: Make the menu items available only when a session is open 2002-07-26 Jan-Oliver Wagner * Greater/Modules/session.py (SimulationSession.TreeInfo): more verbose * Greater/Modules/catchment.py (Catchment.TreeInfo): more verbose * Greater/Modules/catchment.py (CatchmentMap.build_layers): now gets all layer files from the db api. * setup.py (GenerateWrapper.run): added handling of cfiles * dbapiwrapper/stub_files/*: new * dbapiwrapper/genapiwrapper.py: new arg cfiles * dbapiwrapper/genapiwrapper.py (make_escapes, escape, format_c_files): new * dbapiwrapper/genapiwrapper.py (DBGetFunction:c_stub): explicit treatment of FILE * dbapiwrapper/genapiwrapper.py (Pointer:py_from_c): explicit treatment of FILE * dbapiwrapper/apispec.py (DA_S_catch): replaced Aire by Hase. * dbapiwrapper/apispec.py (DA_S_bin_obj, DA_S_bin_obj_file): Added 4 shapefile layers for Hase (12 files in total). * dbapiwrapper/apispec.py (da_get_bin_obj, da_get_bin_obj_file): explicit c_body's. 2002-07-25 Bernhard Herzog * Greater/Dialogs/opensession.py (CommentBox): Removed. Use the one in widgets now. * Greater/Dialogs/widgets.py (CommentBox): New implementation of CommentBox * Greater/Dialogs/selectcatchment.py, Greater/Dialogs/opensubstance.py, Greater/Dialogs/opensession.py: Use the new CommentBox from widget * Greater/Dialogs/opensubstance.py (OpenSubstanceDialog.dialog_layout): Add the comment box. (OpenSubstanceDialog.EvtListBox): New method to update the comment box. * Greater/Dialogs/selectcatchment.py (SelectCatchmentDialog.dialog_layout): Add the comment box. (SelectCatchmentDialog.EvtListBox): New method to update the comment box. * Greater/Modules/catchment.py (CatchmentMap): Fix spelling of CatchmentMap. Update the places where it's used. * Greater/UI/session.py (GreaterSession.rebind): Also subscribe child_changed to the CHANGED channel. (GreaterSession.child_changed): New method to call update_map whenever the simulation session has changed (GreaterSession.update_map): New. Create or update the map. * Greater/Modules/catchment.py: Some code rearrangements. (CatchementMap): New class for the map associated with a catchment. * Greater/UI/session.py (context_session_open, context_db_open), * Greater/UI/context.py (context_session_open, context_db_open): Move these functions to a separate module to avoid circular imports. Update the modules importing these functions. 2002-07-25 Jan-Oliver Wagner * Greater/Modules/model.py: now calling select model dlg * Greater/Dialogs/selectmodel.py: new * doc/greater-manual.tex: finished menu model * doc/screenshots/editmodelparameters-dlg-as.eps: new * doc/screenshots/editmodelparameters-dlg-environment.eps: new * doc/screenshots/editmodelparameters-dlg-primary.eps: new * doc/screenshots/editmodelparameters-dlg-river.eps: new * doc/screenshots/editmodelparameters-dlg-secondary.eps: new * doc/screenshots/editmodelparameters-dlg-sewer.eps: new * doc/screenshots/editmodelparameters-dlg-wwtp.eps: new * doc/screenshots/selectmodel-dlg-as.eps: new * doc/screenshots/selectmodel-dlg-sewer.eps: new * doc/screenshots/selectmodel-dlg-river.eps: new * doc/screenshots/selectmodel-dlg-tf.eps: new 2002-07-24 Jan-Oliver Wagner * Greater/Dialogs/editmodelparameter.py: completed refinement of parameters 2002-07-24 Bernhard Herzog * Greater/UI/application.py (GreaterApplication.CreateMainWindow): Set the inital window size to something more useful for Greater. 2002-07-23 Bernhard Herzog * Greater/Dialogs/opensubstance.py (OpenSubstanceDialog.dialog_layout): Remove some debug prints * Greater/UI/application.py (main): Put the GREAT-ER commands into the menu * Greater/__init__.py (main): All that's left to do here is to call UI.application.main * Greater/Modules/analysis.py (init_menu): * Greater/Modules/catchment.py (init_menu): * Greater/Modules/model.py (init_menu ): * Greater/Modules/substance.py (init_menu): Put the menu initialization into separate functions to get more control over when and in which order the menus are added. * Greater/Modules/session.py (replace_file_menu, init_menu): Rename replace_file_menu to init_menu 2002-07-23 Jan-Oliver Wagner * doc/screenshots/backgroundconcentration-dlg.eps: new * doc/screenshots/mcshots-dlg.eps: new * doc/greater-manual.tex: further menu documentation (model&simulation) * Greater/Dialogs/editmodelparameter.py: refined some parameters * Greater/Dialogs/backgroundconcentration.py: fixed typo * Greater/Dialogs/editmarketdata.py: refined parameter entries * Greater/Dialogs/editdischargedata.py: refined parameter entries * doc/screenshots/editmarketdata-dlg.eps: new * doc/screenshots/editdischargedata-dlg: new * doc/greater-manual.tex: completed menu catchment * Greater/Dialogs/editsubstance.py: refined all parameter entries * doc/screenshots/substance-dlg-degradation.eps: new * doc/screenshots/substance-dlg-identification.eps: new * doc/screenshots/substance-dlg-instreamremoval.eps: new * doc/screenshots/substance-dlg-marketinformation.eps: new * doc/screenshots/substance-dlg-partitioning.eps: new * doc/screenshots/substance-dlg-physicochemical.eps: new * doc/screenshots/substance-dlg-sewagetreatmentremoval.eps: new * doc/greater-manual.tex: further work on substance menu, started catchment menu 2002-07-23 Bernhard Herzog * Greater/UI/application.py (GreaterApplication.CreateMainWindow): Override this method to change the title and omit the initial statusbar message * Greater/UI/session.py (context_session_open, context_db_open): New functions for use as sensitivity callbacks * Greater/Modules/session.py (SimulationSession.rebind): Call changed. (db_connection_open, can_edit_session): Removed. Use context_session_open and context_db_open instead * Greater/Dialogs/selectcatchment.py (run_selectcatchment_dialog, SelectCatchmentDialog.__init__): New parameter for the initial catchment. (SelectCatchmentDialog.dialog_layout): select the intial value. (SelectCatchmentDialog.EvtListBoxDClick): Simply call OnOK (SelectCatchmentDialog.OnOK): We only need to handle the OK part. * Greater/Dialogs/opensubstance.py (OpenSubstanceDialog.__init__, run_opensubstance_dialog): New parameter for the initial value. (OpenSubstanceDialog.dialog_layout): Select the initial substance. (OpenSubstanceDialog.EvtListBoxDClick): Simply call OnOK (OpenSubstanceDialog.OnOK): We only need to handle the OK part. * Greater/Modules/catchment.py: Add sensitivity callbacks to the commands (select_catchment): We can now just call the session's SetCatchment method * Greater/Modules/substance.py (open_substance): We can now just call the session's SetSubstance method 2002-07-22 Jan-Oliver Wagner * Greater/Dialogs/editsubstance.py: params of some pages more precisely defined * doc/greater-manual.tex: first texts for menu substance. 2002-07-22 Bernhard Herzog * Greater/Modules/recordwrapper.py: New module with a base class for the classes that extend the records returned by the DB API * Greater/Modules/catchment.py (Catchment): Completely different now. Derived from RecordWrapper * Greater/Modules/substance.py (Substance): Completely different now. Derived from RecordWrapper * Greater/Modules/session.py (SimulationSession): Substantial extensions. SimulationSession is now derived from RecordWrapper and allows modifying various parts of a session such as substance, catchement etc. (can_edit_session, edit_session): Implement new command greater_edit_session (replace_file_menu): Add the greater_edit_session command * Greater/Dialogs/editsession.py (EditCommentBox.GetValue): New method to return the current content of the box (EditSessionDialog.__init__): New arguments for the start values to use in the editor. Correct the title (EditSessionDialog.dialog_layout): Fill the controls with the correct initial values (EditSessionDialog.OnOK): Build a meaningful result value (run_editsession_dialog): Accept the initial values and pass them on to hte dialog * Greater/UI/session.py (GreaterSession.rebind): New method to make it easier to manage subscriptions to child object's channels (GreaterSession.SetSimulationSession): rebind channels (GreaterSession.SimulationSession): New accessor method 2002-07-22 Jan-Oliver Wagner * Greater/Modules/substance.py: rearranged menu * doc/screenshots/sessioninfotree-win.eps: new * doc/greater-manual.tex: completed Menu Session 2002-07-19 Bernhard Herzog * Greater/UI/session.py (GreaterSession.TreeInfo): New. Extend the tree items with the db-connection and the simulation session (GreaterSession.SetSimulationSession) (GreaterSession.SetDBConnection): Call self.changed * Greater/Modules/session.py (DBConnection.TreeInfo): New. (SimulationSession): New class wrapping the DA_S_sess record. * Greater/Dialogs/opensession.py (OpenSessionDialog.EvtListBoxDClick) (OpenSessionDialog.OnOK): Use the entire struct as the result of the dialog and not just the ID 2002-07-19 Jan-Oliver Wagner * Greater/Dialogs/editsession.py: new * doc/greater-manual.tex: further text on session menu * doc/screenshots/editsession-dlg.eps: new 2002-07-19 Bernhard Herzog * Greater/UI/application.py (GreaterApplication.create_session): Fix a typo that caused a SyntaxError * Greater/UI/session.py: New module with a GREAT-ER specific Thuban session * Greater/UI/application.py (GreaterApplication.create_session): New method to create a greater session in stead of the standard thuban session * Greater/Modules/session.py (DBConnection): New class representing an open GREAT-ER DB connection (db_connection_open): New function usable as the sensitivity callback in command objects. Use it in the command instances for greater_new_session, greater_open_session and greater_save_session * doc/greater-manual.tex (subsection{Open Session}): Fix typo 2002-07-19 Jan-Oliver Wagner * dbapiwrapper/apispec.py: added sample stub_data for ListStructs * dbapiwrapper/genapiwrapper.py (DBGetFunction): now generates entries from stub_data and handles requests for certain elements * Greater/Dialogs/opensession.py: now handles session browsing and returns session id * doc/greater-manual.tex: added section for menu item Open Session * doc/screenshots/opensession-dlg.eps: new 2002-07-18 Bernhard Herzog * Greater/UI: New package for the more generic UI code * Greater/UI/application.py: New. Application class for GREAT-ER * Greater/__init__.py: Add some CVS keywords. (main): Use the Greater application now. * Greater/Modules/session.py (open_session): Execute the dialog 2002-07-18 Jan-Oliver Wagner * Greater/Dialogs/authenticate.py: wrong userid now raises error message * dbapiwrapper/apispec.py: updated according to API spec 2.1 * dbapiwrapper/genapiwrapper.py (DBFreeFunction): removed second basetype as required for API spec 2.1 * Greater/Dialogs/opensession.py: new 2002-07-18 Bernhard Herzog * Greater/Modules/substance.py (open_substance, edit_substance), Greater/Modules/session.py (authenticate), Greater/Modules/model.py (edit_modelparameter, background_concentration, mc_shots), Greater/Modules/catchment.py (select_catchment, edit_marketdata, edit_dischargedata): Handle the new context implementation of Thuban 2002-07-18 Thomas Koester * Greater/Dialogs/backgroundconcentration.py, Greater/Dialogs/editdischargedata.py, Greater/Dialogs/editmarketdata.py, Greater/Dialogs/editmodelparameter.py, Greater/Dialogs/editsubstance.py, Greater/Dialogs/mcshots.py: from SciParam import * 2002-07-17 Jan-Oliver Wagner * doc: New directory with a raw manual skeleton. * dbapiwrapper/genapiwrapper.py (Function and WrappedFunction): added alternative insertion of a specified C body * dbapiwrapper/apispec.py: added a stub behaviour for db_connect * Greater/Dialogs/authenticate.py (AuthenticateDialog): added use of db api stub 2002-07-17 Thomas Koester * Greater/Dialogs/editsubstance.py, Greater/Dialogs/editdischargedata.py, Greater/Dialogs/editmarketdata.py, Greater/Dialogs/editmodelparameter.py: seperated parameter list from dialog function; changed parameter list to use new classes. 2002-07-17 Bernhard Herzog * Greater/Modules/session.py (replace_file_menu): Add commands show_session_tree and exit (authenticate): Run the authenticate dialog * Greater/Modules/session.py: Add some CVS keywords 2002-07-16 Bernhard Herzog * Greater/__init__.py: Don't use * in import statement (main): New. Main function for GREAT-ER. * GREAT-ER.py: All GREAT-ER initialization is now in Greater/__init__.py * Greater/Modules/session.py: New module for the commands in the File/Session menu * dbapiwrapper/genapiwrapper.py (WrappedFunction.py_wrapper): New method so that all functions are available in the python module as well. 2002-07-16 Thomas Koester * Greater/Dialogs/mcshots.py: use IntParam and seperated parameter list from dialog function 2002-07-16 Jan-Oliver Wagner * Greater/Dialogs/selectcatchment.py: now uses DB.stub_interface * Greater/Dialogs/opensubstance.py: now uses DB.stub_interface * Greater/DB/api_stub.py: removed * Greater/Dialogs/widgets.py: removed import of api_stub * Greater/Dialogs/authenticate.py: new 2002-07-15 Thomas Koester * Greater/Dialogs/editmarketdata.py, Greater/Dialogs/editdischargedata.py: import SciParam.control instead of SciParam.notebook. * Greater/Dialogs/mcshots.py: use IntParameter class. 2002-07-15 Bernhard Herzog * dbapiwrapper/README, dbapiwrapper/apispec.py, dbapiwrapper/genapiwrapper.py, dbapiwrapper/parse_struct_spec.py, dbapiwrapper/parse_function_proto.py: New files to generate the DB API wrapper. * setup.py, setup.cfg: Distutils setup. So far it can only build the db api wrapper. 2002-07-15 Jan-Oliver Wagner * Greater/Dialogs/mcshots.py: new * Greater/Dialogs/backgroundconcentration.py: new * Greater/Modules/model.py: added call of dialogs mcshots and backgroundconcentration * Greater/__init__.py, Greater/Modules/catchment.py, Greater/Modules/substance.py, greater.py: Moved contents of greater.py to Greater.__init__.py and removed greater.py 2002-07-11 Jan-Oliver Wagner * Greater/Dialogs/editdischargedata.py: improved default definition for parameters 2002-07-11 Thomas Koester * Greater/Dialogs/selectcatchment.py (run_selectcatchment_dialog): call dialog.Destroy() to end _test application * Greater/Dialogs/widgets.py (wxFindPrefixListBox): ripped from selectcatchment.py to be used by other dialogs * Greater/Dialogs/selectcatchment.py, Greater/Dialogs/opensubstance.py: use wxFindPrefixListBox from widgets.py * Greater/Dialogs/opensubstance.py: prepared for running dialog on its own for tests * Greater/Dialogs/editdischargedata.py: added input fields * Greater/Dialogs/editmarketdata.py: added as copy of editdischargedata.py * Greater/Dialogs/editmodelparameter.py: added as copy of editsubstance.py * Greater/Modules/catchment.py: activated editmarketdata * Greater/Modules/model.py: activated editmodelparameter * Greater/Dialogs/editmodelparameter.py: two pages of input fields * Greater/Dialogs/editdischargedata.py, editmarketdata.py, editmodelparameter.py, editsubstance.py: show debug output only when started as script 2002-07-11 Jan-Oliver Wagner * Greater/Dialogs/selectcatchment.py: prepared for running dialog on its own for tests 2002-07-11 Jan-Oliver Wagner * Greater/Dialogs/selectcatchment.py: prepared for running dialog on its own for tests 2002-07-10 Jan-Oliver Wagner * ChangeLog: started