OpenTEA 2 installation instructions
This is a guide for installation. For more, see the documentation online.
Before you start
There are a couple of dependancies with OpenTEA 2.X, namely:
- wish v8.5+ (except for the starpack).
- python 2.6+ but not 3.X
- numpy v1.10 or higher
- scipy v0.15 or higher
- h5py v2.6 or higher
OpenTEA is tasked with executing locally and on distant servers many shell
commands. This process is guaranteed only for the bash
shell in OpenTEA
to date.
The installation is described for an installation with everything in your
home directory ~/
. Please adapt according to your needs and permissions.
.bashrc
file setup
Copy the following in your .bashrc
. Don’t forget to source this file
again when you are done.
export OPENTEA_HOME="~/opentea"
function opentea {
wish $OPENTEA_HOME/tcl/opentea.tcl -custom ~/opentea_custom.ini $* &
}
Configuration file setup
There are two configuration files for opentea: an xml file and an ini file. A default ini file is provided in the repository. For the xml, you have to create it and paste the following in it:
Content of the opentea_config.xml:
<?xml version="1.0" encoding="utf-8"?><dataset>
<config value="">
<accounts value="">
<tool_plugins value="local_mac">
<local_mac value="">
<nbprocs value="1"/>
</local_mac>
</tool_plugins>
</accounts>
</config>
<meta/></dataset>
For this installation in your home directory do:
cp $OPENTEA_HOME/opentea_custom.ini ~/
cp $OPENTEA_HOME/opentea_config.xml ~/
The opentea command line only reads the opentea_custom.ini
file, which is a user
editable configuration file for your OpenTEA installation. The default “opentea_custom.ini”
file is thereafter displayed. This file can be changed by the user to adapt to its installation.
[localEnvironmentVariables]
# all optional entries
OPENTEA_HOME=~/opentea
AVBP_HOME=~/avbp
[openteaConfiguration]
# all compulsory entries
configPath=$OPENTEA_HOME/opentea_config.xml
pluginsPath=$OPENTEA_HOME/plugins
pythonExec=/usr/bin/env python
guiWidth=1200
guiHeight=680
focusCorrection=0
themeTk=clam
autoSave=1
[openteaCustomAppearance]
# all optional entries
#menuBackgroundGif=$OPENTEA_HOME/tcl/IMAGES/openbkg.gif
#guiBottomLeftImageGif=$OPENTEA_HOME/tcl/IMAGES/logo_cerfacs.gif
[externalApps]
# all optional entries
avbp=$AVBP_HOME/OPENTEA/opentea2.X/avbp
projeteur2=$AVBP_HOME/OPENTEA/opentea2.X/projeteur2
[customAppClusters]
# all optional entries
OutilsMetiersSafran="coolant" "catsim" "simpleblade" "simplecad"
LES="avbp" "yales2" "projeteur2" "adiab2colo"
acoustic="avsp_simple" "avsp_complex" "flametransfer"
Note that the opentea_custom.ini
file contains a link to the opentea_config.xml
file. It must be
edited by starting the config
app from inside any opentea app.
- localEnvironmentVariables: adding or replacing your environment variables in the OpenTEA processus. See environment variables.
- openteaConfiguration: the core configuration elements.
- openteaCustomAppearance: to set the background image of the main menu and the icon at the bottomleft of applications.
- externalApps: add new apps to opentea. The path to the application (containing both XML and scripts folder) is required. See adding New apps.
- customAppClusters: set up the clusters of apps diplayed in the main menu and in the topbar “Applications” menu. An app must be at least in one cluster to be reachable.
Environment variables
OpenTEA cannot affect your terminal environment. Do set the environment variables that can influence OpenTEA in a single, well identified file. Use $FOOBAR in .ini file or self.env[“FOOBAR”] in python plugins to rely on environment variables
If you declare these environment variables in the .ini file (localEnvironementVariables), only OpenTEA processes (GUI) and subprocesses (when hitting Process buttons) will use these variable. By doing so, OpenTEA cannot be affected by your terminal enironement.
You also can use the general declared variables (e.g. what you have in your .bashrc) . By doing so, your terminal environment is given to OpenTEA at its startup. If you change the environment of your terminal, OpenTEA will not propagate the changes.
Last information: The PYTHONPATH environment variable used by OpenTEA is reset at startup to avoid history hazards.
Recommended arborescence
Using Git to switch between versions
If you are using git to organize your OpenTEA workplace, the recomended arobsence for your instalation is the following
GITLAB/
opentea/ # git repository
avbp/ # git repository
avsp/ # git repository
plugins/ # set your custom XML and .py plugins here
opentea_custom.ini # your .ini file
opentea_custom.xml # your .xml file
Keeping several versions, without Git
If you do not use git, and need a tracability of your versions, the recommended arboressence for your installation is the following
GITLAB/
opentea/opentea2.1.0-rc.6/ # the archives, keeping the tag name
opentea2.1.0-rc.7/
opentea2.1.0-rc.8/
avbp/avbp7.0.1-SEPT2017-rc/ # the archives, keeping the tag name
avbp7.0.1-SEPT2017-rc.2/
plugins/ # set your custom XML and .py plugins here
opentea_custom.ini # your .ini file
opentea_custom.xml # your .xml file
In both cases, the GITLAB/plugins/ folder is a copy of the template folder /plugins/ shipped with the opentea archive. Feel free to remove our .xml templates, but keep the no_plugin.xml in both tool_plugins and code_plugins
Checking your installation
To check everything went well, fire up the “playstation” menu:
opentea
You should be able to open the app of your choice from the list. Once the
app is launched, reach for the Config
menu to start the config
app.
There you can edit and personnalize your config file (saved as
config.xml
). Please setup your plugin according to your platform. This
determines where the setup tools will be run (not the codes, only the
setup / post-processing tools).
You can try out some of the example applications:
example
: A simple one tab calculator
example_lite
: A multitab exemple with inputs and outputs
example_complex
: A complex application that uses various options and display 3D
At startup, please read carefully the console output, which should be like:
Local environment variables:
|OPENTEA_HOME : /Users/dauptain/GITLAB/opentea
|AVBP_HOME : /Users/dauptain/GITLAB/avbp
|AVSP_HOME : /Users/dauptain/GITLAB/avsp
Opentea configuration:
|focusCorrection : 0
|autoSave : 1
|guiWidth : 1200
|guiHeight : 680
|themeTk : clam
|configPath : /Users/dauptain/GITLAB/opentea/opentea_config.xml
|pluginsPath : /Users/dauptain/GITLAB/opentea/plugins
|pythonExec : /usr/bin/env python
Opentea appearance:
|
Boot with :
|customPath : /Users/dauptain/GITLAB/custom.ini
|topPath : /Users/dauptain/GITLAB/opentea
Here PE is /Users/dauptain/GITLAB/opentea/tcl
local PYTHONPATH:
|/Users/dauptain/GITLAB/avbp/OPENTEA/opentea2.X
|/Users/dauptain/GITLAB/avsp/OPENTEA/opentea2.X
|/Users/dauptain/GITLAB/opentea
|/Users/dauptain/GITLAB/opentea/library
## GRAFTING SOLVER runmanager
Grafting branch {root XMLplugins code_plugins} in runmanager finalize
Pruning branch root XMLplugins code_plugins
(-_- ;) application -simplecad- not found
(-_- ;) application -yales2- not found
(-_- ;) application -flametransfer- not found
This output will show how OpenTEA is responding to your configuration.
For example, the startup log explain which and why some application were not loaded.
If minor errors are presents, there will be warning statement (-_- ;)
(breaking a sweat).
In case of major error, the is an exit statement t(-,-t)
(fck ff).
Adding new apps
When a code has a built-in OpenTEA interface, the engine needs to know how to find it on startup. This is done using the `custom.ini file:
[externalApps]
my_app=~/my_app
Note that the my_app
folder should contain at least the two following folders:
XML/
scripts/
In case of complex apps that can be called by other apps, an __init__.py
file can also be present in this directory.
Faster startup
The OpenTEA command line call accepts some additional arguments:
-code my_app
: startmy_app
directly-file project.xml
: load a project on startup
You are welcome to define new aliases for the commands you use often.
Feedback
Please direct all feedback to the CERFACS team in charge of OpenTEA.