BioLegato Helper Applications
From Bioinformatics.Org Wiki
[return to Release_To_Do_list]
A directory has been created to hold files related to the BioLegato Helper Application project:
/home/psgendb/BIRCHDEV/doc/bioLegato/HelperApps.
Tasks needed to prevent mucking up BIRCH before we implement
- Modify birch_install.py to create empty default values for environment variables.
BL_TextEdit=""
BL_ImageViewer=""
BL_PDFViewer=""
BL_PostScriptViewer=""
BL_WebBrowser=""
BL_SpreadSheet=""
BL_Terminal=""
It may not be a foregone conclusion that these variables are stored in BIRCH.properties. The problem is that for multiple platforms, you would need a separate BIRCH.properties file. Maybe we have a separate file just for helper applications.
The other question is regarding the assumption that on a multiplatform system, we set helper apps by platform. It is just as reasonable to set them by host. This is why the local.profile.source file idea was good, because you could do anything in this file.
Maybe the best option is to cover the main case in admin/profile.source, and still keep local.profile.source for more complex cases. In complex cases, the BIRCH administrator would have the skills to do what needed to be done anyway.
Do tasks that can't hurt the current function of BioLegato
This sounds like a job for a Python package.
- create code that lets you read these variables within a shell script or Python script
- create code that tries to find programs on the system to set these variables
This code reads a file that has a list of choices for each platform. The first item in the list is the default. What is the best format for this file? XML, or something like BoulderIO?
- birchinstall.py
- add code to install-scripts to choose and test helper applications; probably call which to see if there is an executable for a program before testing. Testing is done by calling reading a sample file from admin/BLHelper eg. sample.png.
- 1. read local defaults from local.profile.source (alternatively, read them from the environment)
- 2. find first installed helper for each category
- 3. rewrite HelperApp.blmenu
- 4. rewrite setblenv.source
- update_local.py -
- 1. read local.profile.source (alternatively, read them from the environment)
- 2. comment out GDE_ lines
- 3. read BL_ lines, if they are there
- add code to install-scripts to choose and test helper applications; probably call which to see if there is an executable for a program before testing. Testing is done by calling reading a sample file from admin/BLHelper eg. sample.png.
- the birchadmin bash script calls BLHelper.py to build HelperApplications.blmenu each time birchadmin launches. (This won't be possible if the user is not the administrator.)
- create a BioLegato-based menu for birchadmin that lets user set variables. There should be a way to insert a custom command. This could be done in a single BioLegato menu.
Each variable has to have a chooser, custom commad box, Set button and Test button. One problem with the chooser is that there may not be a way to populate it with choices from a file.
- BLHelper.py::write_blmenu()
- has to remember current choices, and default to that choice
- has to accommodate a custom command
- longer term goal: add feature to PCD language to read choice values from a file, specified in the .blmenu declaration.
There are two possibilities:
- one tab per variable,
- all variables have a panel within a single big pane, but still have individual Set and Test buttons
In principal, this could be done by a wizard, but it's so easy to implement using BioLegato that we do that first. The wizard may not be necessary, because during a new install we just find the programs, and the only other time to change these variables is when we want to change them, and a wizard is probably overkill in this case.
Then, do those tasks that will implement the changes
- write a script that can read .blmenu files and replace an environment variable eg. change $GDE_TEXTEDIT to $BL_TextEdit (before we do this we could add code to profile.source etc. to just set the old variables to the value of the new variables. The script should also be able to make these changes in BIRCH/local. If there isn't a value for BL_variable in BIRCH.properties, look for it in one of the GDE_ environment variables, in local.profile.source.
- New BL_ variables are only relevant in BioLegato and ACeDB (I'm pretty sure).
- we also need to worry about scripts that set these variables
- modify GetBirch to run these during a new install. This won't be run on an update, because we assume there are already good values for these. The user can always run birchadmin to change these.