ukaea / neutronics_material_maker

A tool for making parametric material cards for use in neutronics codes. Original developed for the Paramak
19 stars 10 forks source link

Replace eval with asteval (#97) #98

Closed DanShort12 closed 4 years ago

DanShort12 commented 4 years ago

Make sure the temperature and pressure can be set in the symbol table. Raise error if asteval detects invalid input. Rework checks for OpenMC being available, allowing exceptions to be raised if OpenMC materials aren't created successfully when OpenMC is installed. Implement a test to check that arbitrary code in the density_equation results in an error.

Co-authored-by: Jonathan Shimwell jonathan.shimwell@ukaea.uk Co-authored-by: autopep8 autopep8@users.noreply.github.com

codecov[bot] commented 4 years ago

Codecov Report

Merging #98 into main will increase coverage by 0.28%. The diff coverage is 82.35%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #98      +/-   ##
==========================================
+ Coverage   90.87%   91.15%   +0.28%     
==========================================
  Files           3        3              
  Lines         515      520       +5     
==========================================
+ Hits          468      474       +6     
+ Misses         47       46       -1     
Impacted Files Coverage Δ
neutronics_material_maker/material.py 89.91% <82.35%> (+0.42%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 9c051eb...98ce00f. Read the comment docs.

shimwell commented 4 years ago

Thanks Dan