Skip to content

Conversation

@esoteric-ephemera
Copy link
Collaborator

@esoteric-ephemera esoteric-ephemera commented Dec 17, 2025

  • Correct/format units in StructureMetadata, particularly density_atomic
  • Ensure the insertion / conversion electrode serdes work with the API client
  • make user settings nullable
  • Remove materials/summary/stats endpoint to close client issue #1033

@esoteric-ephemera esoteric-ephemera changed the base branch from main to develop December 17, 2025 18:31
@esoteric-ephemera
Copy link
Collaborator Author

@tsmathis if you can check that the new serde's don't impact builds, that would be super helpful! The existing logic shouldn't have changed for the serdes.

I had to add a couple of catches for when subfields are partially deserialized already

@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2025

Codecov Report

❌ Patch coverage is 78.78788% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.96%. Comparing base (7c9bb94) to head (5879006).

Files with missing lines Patch % Lines
...ore/types/pymatgen_types/grain_boundary_adapter.py 0.00% 5 Missing ⚠️
...re/types/pymatgen_types/structure_graph_adapter.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1372      +/-   ##
===========================================
- Coverage    85.97%   85.96%   -0.01%     
===========================================
  Files          229      229              
  Lines        17873    17888      +15     
===========================================
+ Hits         15366    15378      +12     
- Misses        2507     2510       +3     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tsmathis
Copy link
Collaborator

Missed the tag yesterday, will take a look first thing tomorrow!

Copy link
Collaborator

@tsmathis tsmathis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you encounter an issue with the (de)serialization behavior in the electrode_adapter module?

I had written that around the outputs from the document model constructors used in the builders and being able to round trip that output, so there should really be no other entry points to that adapter module than model_dump()ing a builder output and then deserializing a model_dump?

@esoteric-ephemera
Copy link
Collaborator Author

esoteric-ephemera commented Dec 19, 2025

Do you encounter an issue with the (de)serialization behavior in the electrode_adapter module?

Yeah in the client - if you switch between develop and this branch, you'll probably hit issues doing a full download of the insertion_electrodes endpoint with develop but (ideally) not with these changes. Think it's a minor roundtrip thing because of the client running MontyDecoder().process_decoded --> pydantic schema on these

Personally I'm fine with removing the monty decoding from the client, especially since we're building the schemas to de-/serialize correctly without it

@tsmathis
Copy link
Collaborator

I would prefer removing the monty decoding from the client then. I'd rather we make it a goal to not pollute the emmet implementations as much as possible.

And as you said, what we've done with the models/types for serialization(model_dumping) to avoid jsanitize should also be implicitly removing the need for monty decoding during deserialization on the client?

@esoteric-ephemera
Copy link
Collaborator Author

OK I'll revert the serde changes here and see about removing the monty decoder logic from the client

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.

4 participants