svalinn / r2s-act

Rigorous 2 Step Activation Workflow
4 stars 7 forks source link

Add capability to copy isolib & FENDL files for new calculations #54

Open erelson opened 11 years ago

erelson commented 11 years ago

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 file example_user.cfg would be added to r2s-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 to user.cfg and make the appropriate changes. r2s_setup.py would look for user.cfg and otherwise proceed normally, regardless of whether the config file exists.

r2s-act/
  scripts/
    r2s/
      ...
    testing/
      ...
    config/
      example_user.cfg
      *user.cfg
  mcnp_source/
    ...
  docs/
    ...

Thoughts?

Tasklist:

gonuke commented 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.

elliottbiondo commented 11 years ago

Why not just add variables to the r2s.cfg file to supply the absolute paths to these files?

erelson commented 11 years ago

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.

erelson commented 11 years ago

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...

gonuke commented 11 years ago

Ooops... meant to ask why the gh-pages branch matters here?

erelson commented 11 years ago

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)

gonuke commented 11 years ago

Ah yes... then a mechanism to recreate a default/minimal user.cfg would be useful.