Repository navigation
Conversation
bc34539 to
eda15dc
Compare
72a627d to
e8a494b
Compare
9816a42 to
d4d920c
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #4523 +/- ##
==========================================
+ Coverage 50.26% 50.34% +0.08%
==========================================
Files 181 181
Lines 30629 30604 -25
==========================================
+ Hits 15395 15407 +12
+ Misses 15234 15197 -37 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
756ea41 to
698f4a5
Compare
fec93fb to
bcd063a
Compare
je-cook
left a comment
There was a problem hiding this comment.
First round, I think there will be a few subsequent reviews, its a lot to unpick!
There was a problem hiding this comment.
all of this goes to this one line
| parameters[module][item] = {"value": data["i_process_run_mode"].get_value, "comment": f"{PROCESSRunMode(iop_val).description}"} |
There was a problem hiding this comment.
I've kept iop_val in for now to have PROCESSRunMode(iop_val).description, but I can remove that and instead directly use PROCESSRunMode(data["i_process_run_mode"].get_value).description if you'd prefer?
timothy-nunn
left a comment
There was a problem hiding this comment.
A couple more in addition to James.
| if variable_name == "bounds": | ||
| boundl = {} | ||
| boundu = {} | ||
| for index, bounds_dict in info.value.items(): | ||
| try: | ||
| idx = int(index) | ||
| except ValueError as e: | ||
| raise ProcessValidationError( | ||
| "The bounds need to be of the form boundl/u(index) = value" | ||
| ) from e | ||
| if "l" in bounds_dict: | ||
| boundl[idx] = bounds_dict["l"] | ||
| if "u" in bounds_dict: | ||
| boundu[idx] = bounds_dict["u"] | ||
| # TODO could change them into arrays here? | ||
|
|
||
| info_boundl = info | ||
| info_boundl.value = boundl | ||
| info_boundl.name = "boundl" | ||
| variables = set_on_datastructure( | ||
| variable_name="boundl", | ||
| info=info_boundl, | ||
| data_structure_obj=data_structure_obj, | ||
| variables=variables, | ||
| ) | ||
|
|
||
| # matches (variable name, array index, value) | ||
| # NOTE: array index is Fortran-based hence starts at 1. | ||
| line_match = re.match( | ||
| r"([a-zA-Z0-9_]+)(?:\(([0-9]+)\))?[ ]*=[ ]*([ +\-a-zA-Z0-9.,]+).*", | ||
| stripped_line, | ||
| ) | ||
| info_boundu = info | ||
| info_boundu.value = boundu | ||
| info_boundu.name = "boundu" |
There was a problem hiding this comment.
Could this be an additional action, rather than an if statement in the parser?
There was a problem hiding this comment.
Have discussed and decided, for now, to add a new function _handle_bounds - the additional actions are not performed until after the variable validating and cleaning, which means it would be tricky to move this to an additional action and still be able to clean and validate the variable. Can always change once we have decided on how to handle bounds in future
…undl(index) = value , and use f_nd_impurity_electrons instead of bound in a test for input array remove outdated comment and add TODO docstring to fill in after review
… update any associated mfiles
c9765aa to
43c5333
Compare
cbd35eb to
3a44a01
Compare
Description
validate_inputto theInDatclass and rename tocheck_obsolete_variablesparse_input_fileno longer re-reads the file line by line and instead uses the data read in byInDatChecklist
I confirm that I have completed the following checks: