Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CP2K TaskDocument #900

Merged
merged 3 commits into from
Jul 18, 2024
Merged

fix CP2K TaskDocument #900

merged 3 commits into from
Jul 18, 2024

Conversation

lory-w
Copy link
Contributor

@lory-w lory-w commented Jun 24, 2024

Summary

This PR addresses the ValidationError occurring in the TaskDocument schema due to improper handling of the cp2k_input and locpot fields. This issue is documented in issue #899

  • Changed cp2k_input in CalculationInput to be a union of CP2KInput object and dict to accommodate different possible types for cp2k_input
  • Changed locpot in CalculationOutput to be an optional field

@JaGeo
Copy link
Member

JaGeo commented Jun 24, 2024

@lory-w thank you! Is there a chance that you could add a test as well?

@lory-w
Copy link
Contributor Author

lory-w commented Jun 25, 2024

Hi,
Thank you for reviewing the PR. I attempted to write a pytest but the error only occurs when the calculation results are queried by Jobflow from Store (in my case mongodb). However, the current test suite in the repo does not seem to have integration with mongodb, so I cannot reproduce the bug within the unit tests.

Would you suggest any specific approach to handle this? Thanks!

@JaGeo
Copy link
Member

JaGeo commented Jun 28, 2024

@utf maybe you could have a look once you have time!

@utf
Copy link
Member

utf commented Jul 18, 2024

I will look into the jobflow issue but will merge this for the time being.

@utf utf merged commit 47d5acc into materialsproject:main Jul 18, 2024
6 checks passed
BryantLi-BLI pushed a commit to BryantLi-BLI/atomate2 that referenced this pull request Jul 29, 2024
* bugfix for task document schema

* lint
@utf utf added the fix Bug fix PR label Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants