openmc-dev / data

Collection of scripts for managing data for OpenMC
https://openmc.org/data
MIT License
27 stars 29 forks source link

Add script to convert JEFF 3.3 data from OECD/NEA #8

Closed paulromano closed 5 years ago

paulromano commented 5 years ago

In addition to the new script, I also made some updates in convert_jeff32.py so that the download/extract steps can be skipped if desired.

shimwell commented 5 years ago

Is there any chance we can combine these scripts so that the convert_jeff.py can download both releases (3.2 and 3.3). It might help keep the number of convert scripts down otherwise each release will lead to a new script. I can do this on another PR after this one is merged if you like

shimwell commented 5 years ago

The new arg.parser arguments look really nice. Is this the new standard to be used in the convert scripts?

parser.add_argument('--download', action='store_true',
                    help='Download tarball from OECD-NEA')
parser.add_argument('--no-download', dest='download', action='store_false',
                    help='Do not download tarball from OECD-NEA')
parser.add_argument('--extract', action='store_true',
                    help='Extract zip files')
parser.add_argument('--no-extract', dest='extract', action='store_false',
                    help='Do not extract .tgz file if it has already been extracted')

Removing the batch argument while replacing it with download. The addition of the extraction option adds some useful extra control for the user.

paulromano commented 5 years ago

@Shimwell Yes, I'm trying to standardize on these arguments for any case where download/extract is needed. I can look into combining the two scripts, although I personally like having them separated. Let's leave that as a separate pull request though. If you're good with the changes here, can you merge? (I just invited you to a team to give commit privileges) I'll review #9 after.