jobflow icon indicating copy to clipboard operation
jobflow copied to clipboard

Tutorial for Pydantic validation

Open tomdemeyere opened this issue 2 months ago • 5 comments

Summary

Small tutorial about Pydantic validation and how it can be used with jobflow, please let me know if I should add anything else

https://github.com/materialsproject/jobflow/issues/808 @JaGeo @utf

  • [x] Code is in the standard Python style. The easiest way to handle this is to run the following in the correct sequence on your local machine. Start with running black on your new code. This will automatically reformat your code to PEP8 conventions and removes most issues. Then run pycodestyle, followed by flake8.
  • [x] Docstrings have been added in theNumpy docstring format. Run pydocstyle on your code.
  • [x] Type annotations are highly encouraged. Run mypy to type check your code.
  • [x] Tests have been added for any new functionality or bug fixes.
  • [x] All linting and tests pass.

tomdemeyere avatar Oct 20 '25 12:10 tomdemeyere

@tomdemeyere thanks! To me, this looks already great.

@utf do you have any comments?

I have two points I am wondering about: Should we move it to a different position in the overall documentation? Is maybe further introduction needed to motivate the validation?

JaGeo avatar Oct 20 '25 14:10 JaGeo

Thanks for this @tomdemeyere. I think it looks great. As @JaGeo said, if you can add a little more motivation to why this is useful that would be perfect.

For now, I think the position in the documentation is OK. We might need to do a more thorough adjustment later on.

utf avatar Oct 23 '25 08:10 utf

Thank you both for the feedback, I've added some context at the beginning of the notebook

tomdemeyere avatar Oct 27 '25 11:10 tomdemeyere

@tomdemeyere From my side, the context sounds good. You could additionally refer to atomate2 as a package where this is used

JaGeo avatar Oct 29 '25 15:10 JaGeo

@JaGeo That makes sense, done!

tomdemeyere avatar Oct 29 '25 15:10 tomdemeyere

@utf are you fine with the current status? Should we merge this?

JaGeo avatar Nov 12 '25 06:11 JaGeo

@utf kind reminder 🙂. Workflows would beed to be approved.

JaGeo avatar Nov 21 '25 06:11 JaGeo