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 serialization issue in XASDoc #1146

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

esoteric-ephemera
Copy link
Collaborator

Adds a field_validator to XASDoc to check that the spectrum only has positive intensities (related pymatgen PR). If a spectrum has non-positive intensities, they are set to a small positive value (like zeroing out, but needs to be positive in this case).

Also adds a test for the new behavior (previously no tests for XASDoc)

@codecov-commenter
Copy link

codecov-commenter commented Nov 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.43%. Comparing base (622f2e3) to head (4f200a2).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1146   +/-   ##
=======================================
  Coverage   90.42%   90.43%           
=======================================
  Files         147      147           
  Lines       14448    14459   +11     
=======================================
+ Hits        13065    13076   +11     
  Misses       1383     1383           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants