jobflow
jobflow copied to clipboard
Fix jsanitize in `contains_flow_or_job`
This change in emmet https://github.com/materialsproject/emmet/commit/7735bb1a51cd9b339789bbdca0df92fbe366ddb8 leads to an error in contains_flow_or_job
, due to the impossibility to call as_dict on some Enums.
This PR adds the enum_values=True
to handle those cases.
In general, I am wondering if it is worth making this check every time a Flow is instantiated.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.42%. Comparing base (
eda2a65
) to head (f0aa70d
). Report is 10 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #559 +/- ##
=======================================
Coverage 99.42% 99.42%
=======================================
Files 21 21
Lines 1564 1564
Branches 425 425
=======================================
Hits 1555 1555
Misses 9 9
Files | Coverage Δ | |
---|---|---|
src/jobflow/utils/find.py | 100.00% <100.00%> (ø) |
@gpetretto Fyi, I am trying to store the whole enum information in the output. I think this should fix this as well. Here are my pull requests: https://github.com/materialsvirtuallab/monty/pull/640 and https://github.com/materialsproject/jobflow/pull/565
What are your thoughts about this?