Skip to content

Tutorial for Pydantic validation#812

Merged
utf merged 7 commits intomaterialsproject:mainfrom
tomdemeyere:pydantic-tutorial
Feb 1, 2026
Merged

Tutorial for Pydantic validation#812
utf merged 7 commits intomaterialsproject:mainfrom
tomdemeyere:pydantic-tutorial

Conversation

@tomdemeyere
Copy link
Contributor

Summary

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

#808 @JaGeo @utf

  • 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.
  • Docstrings have been added in theNumpy docstring format.
    Run pydocstyle on your code.
  • Type annotations are highly encouraged. Run mypy to
    type check your code.
  • Tests have been added for any new functionality or bug fixes.
  • All linting and tests pass.

@JaGeo
Copy link
Member

JaGeo commented Oct 20, 2025

@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?

@utf
Copy link
Member

utf commented Oct 23, 2025

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.

@tomdemeyere
Copy link
Contributor Author

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

@JaGeo
Copy link
Member

JaGeo commented Oct 29, 2025

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

@tomdemeyere
Copy link
Contributor Author

@JaGeo That makes sense, done!

@JaGeo
Copy link
Member

JaGeo commented Nov 12, 2025

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

@JaGeo
Copy link
Member

JaGeo commented Nov 21, 2025

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

@utf
Copy link
Member

utf commented Feb 1, 2026

Thanks @tomdemeyere, this looks great!

@utf utf enabled auto-merge February 1, 2026 16:32
@utf utf merged commit 888f351 into materialsproject:main Feb 1, 2026
7 checks passed
@JaGeo
Copy link
Member

JaGeo commented Feb 1, 2026

Thanks @utf !

And congrats @tomdemeyere for the merged PR! 🎉

@utf utf added the docs Improvements or additions to documentation label Feb 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants