Open erelson opened 11 years ago
Better to use a symbolic link rather than a copy. Also, ALARA has some environment variables that it checks, so we could get better at using those.
Why not just add variables to the r2s.cfg file to supply the absolute paths to these files?
My reasoning: If the variables were stored in r2s.cfg, they would still have to be changed by the user every time a new calculation is set up, which would not save any effort over the current approach of making new copies/softlinks each time.
Hmmm. A potential issue might be losing the config file when switching branches, e.g. to the gh-pages branch. Would have to make sure this is robust...
Ooops... meant to ask why the gh-pages branch matters here?
I used the gh-pages as an example because our Makefile macros remove various files, and the user.cfg would not be under version control with my proposed approach. Would have to look closely to make sure that we don't accidentally remove the config file with the Makefile macros. (This might only be an issue for developers)
Ah yes... then a mechanism to recreate a default/minimal user.cfg would be useful.
Files like isolib, FENDL.gam/lib and sometimes matlib often end up being copied into each new R2S-ACT calculation. Rather than doing this manually,
r2s_setup.py
could be made aware of where these files are on the user's system, and copy them as needed.One approach to this is to add another config file. I'll call this
user.cfg
, and it would be ignored by the .gitignore file. A fileexample_user.cfg
would be added tor2s-act/scripts/config/
(config/
doesn't need to clutter the top level since it would be rarely used). This file would include example lines and instructions. A new user would then copy this file touser.cfg
and make the appropriate changes.r2s_setup.py
would look foruser.cfg
and otherwise proceed normally, regardless of whether the config file exists.Thoughts?
Tasklist:
example_user.cfg
r2s_setup.py
user.cfg
to.gitignore