Bug #1783
closedleginon.cfg, sinedon.cfg, and instruments.cfg are often lost when installation changes
0%
Description
This happens so frequently now since we have three versions of appion processing on three non-totally interactive login systems and two clusters that spread to many nodes. Need a better solution such as searching these as last resort a place on the computer outside the installation.
Any thought where this should be?
If Jim and Sargis can agree on a place, I volunteer to add it in if Jim does not want to. We need it now.
Updated by Jim Pulokas over 12 years ago
- Status changed from New to In Test
- Assignee changed from Jim Pulokas to Anchi Cheng
I had sinedon looking in /etc/ for a config file, but I suggest for best organization we have a special directory where we can put any myami configs (leginon,sinedon,etc.):
/etc/myami/
Fixed sinedon to look in /etc/myami/ for a config file: r16611
Fixed leginon to look in /etc/myami/ for config file: r16613
Updated by Jim Pulokas over 12 years ago
r16617: Also pyscope will look for instruments.cfg in /etc/myami/. Unlike the other config parsers, pyscope will not read the config files just by importing the module. To check what config files were successfully read by pyscope, you have to import, then run the parse function, then check, like this:
import pyscope.config pyscope.config.parse() pyscope.config.configfiles
Updated by Anchi Cheng over 12 years ago
- Assignee changed from Anchi Cheng to Jim Pulokas
r16625 commit r16611, r16613, r16617 change from trunk to branch 2.2
tested on my Mac.
Jim, won't '/etc/myami' broken on Windows? Shall we use C:\\Documents and Settings\\All Users\\Documents\\myami' ?
Since the old sinedon.cfg change did not cause Leginon to stop, it might be o.k., although I don't see why.
Updated by Jim Pulokas over 12 years ago
- Status changed from In Test to In Code Review
- Assignee changed from Jim Pulokas to Anchi Cheng
- consolidate all determination of config file location into one function in pyami.fileutil
- use that new function in all other places where a ConfigParser is used
- Added in special case for Windows (untested)
- clean up leginon to make it consistent with sinedon and pyscope. config file is no longer in a special config subdir. default.cfg replaced with leginon.cfg.template
- clean up appion: some modules unnecessary as they are only thin wrappers around sinedon getConfig/setConfig. I think they were only needed many years ago when sinedon was an optional part of appion
Updated by Jim Pulokas over 12 years ago
r16653 makes all values in leginon.cfg optional. Defaults are set in python code rather than the now removed default.cfg.
Updated by Amber Herold over 12 years ago
The order in which configs are used:
1. home dir
2. site packages
3. /etc/myami
/leginon/config no longer exists, so the config file should be in /leginon when looking in site packages.
Updated by Amber Herold over 12 years ago
Documentation has been updated:
http://emg.nysbc.org/projects/appion/wiki/Configure_leginoncfg
http://emg.nysbc.org/projects/appion/wiki/Configure_sinedoncfg
Updated by Anchi Cheng almost 12 years ago
- Status changed from In Code Review to Closed
reviewed. This has been used on my Mac for several months now. consider tested in trunk. Will close for now.