materialsproject / api

New API client for the Materials Project
https://materialsproject.github.io/api/
Other
107 stars 38 forks source link

`nsites` seemingly renamed to `num_sites` from `v0.23.6` to `v0.24.0` #614

Open sgbaird opened 2 years ago

sgbaird commented 2 years ago

Maybe worth mentioning in the v0.24.0 release or updating mpr.summary.available_fields (which still shows nsites, no reference to num_sites), since nsites produces an unexpected keyword error. Came across the error after updating from v0.23.6 to v0.24.0.

https://github.com/materialsproject/api/compare/v0.23.6...v0.24.0

sgbaird commented 2 years ago

Same issue with material_id in mpr.provenance.search():

search() got an unexpected keyword argument 'material_id'
print(mpr.provenance.available_fields)
['builder_meta', 'nsites', 'elements', 'nelements', 'composition', 'composition_reduced', 'formula_pretty', 'formula_anonymous', 'chemsys', 'volume', 'density', 'density_atomic', 'symmetry', 'property_name', 'material_id', 'deprecated', 'deprecation_reasons', 'last_updated', 'origins', 'warnings', 'created_at', 'references', 'authors', 'remarks', 'tags', 'theoretical', 'database_IDs', 'history']
munrojm commented 2 years ago

See my comment https://github.com/materialsproject/api/issues/613#issuecomment-1146383017 on available fields. Let me know if you feel I should change the documentation here to make it more clear (https://docs.materialsproject.org/downloading-data/using-the-api/querying-data).

Also, the mismatch between the search method input parameter and the data field is something we are going to address. This requires a larger change to our data schema, which is more involved. For now, I can update the documentation to explain this difference.