hpcflow / hpcflow-new

Mozilla Public License 2.0
0 stars 5 forks source link

Typecheck with mypy #698

Open dkfellows opened 2 months ago

dkfellows commented 2 months ago

This is an adoption of #694 as a project-internal internal PR.


Tricky points:

dkfellows commented 2 months ago

I've been investigating a bug, when handling the EAR end step workflow callback (i.e., not in the main script itself), parameters would not have their value class set when processing the results. I'm not at all sure why this would be so (as the schema had been parsed and the parameter class modules loaded) but it was resulting in the reading out of values from an HDF5 file not working. I've resolved it by doing the forcing at that point (because the alternative is a definite failure! New method Parameter._force_value_class()) but it's really odd because I can't see why the parameters are wrong in the first place.

dkfellows commented 1 month ago

Do #699 first; it will be easier that way round.

dkfellows commented 6 days ago

This looks pretty good to me now. I'd love the documentation of the typed dictionaries to be better... but I'm not fixing Python itself so it will just have to be what it is.

dkfellows commented 5 hours ago

These are bizarre failures, FWIW. I can only reproduce them locally by not having Python on the path.

[EDIT] And they seem to be transient. Probably container-related. Oh well.