mit-crpg / opendeplete

A depletion framework for OpenMC
MIT License
14 stars 5 forks source link

Use environment variable to find chains #10

Closed wbinventor closed 7 years ago

wbinventor commented 7 years ago

This is the first in a series of issues I plan to create as I attempt to apply OpenDeplete to deplete a few benchmark problems of mine. I would suggest that we may introduce an environment variable like OPENDEPLETE_CHAINS which points to the path of chains of interest, rather than requiring that it be hard-coded into the Settings wrapper as is shown in the example file here:

https://github.com/mit-crpg/opendeplete/blob/master/scripts/example_run.py#L21

cjosey commented 7 years ago

So, I have addressed this in branch https://github.com/cjosey/opendeplete/commit/5dade3326ae7945fd019ece59e7269bee396d0d9

This adds OPENDEPLETE_CHAIN to environment variables. It can be overridden by setting it the same way it has been done before (useful for the test suite).

I also added a few helpful messages for when files don't exist, aren't the files we expected, or not files at all (say, a random python object). I will be PRing it tomorrow.

wbinventor commented 7 years ago

Closed per @cjosey's #16.