Pla 3725/rename inorganic chemical descriptor#288
Conversation
|
We'll have to reach out DS so that they can update notebooks. |
… into PLA-3725/rename-inorganic-chemical-descriptor
To make the transition smoother I updated the PR to include a deprecated stub for @Imperssonator is included here because he's the primary user. We'll figure out a way to make sure everybody else knows as well. |
I saw that, which is awesome. That’s how I found this PR. 👍 |
|
|
||
| def InorganicDescriptor(key: str, threshold: Optional[float] = 1.0): | ||
| """[DEPRECATED] Use ChemicalFormulaDescriptor instead.""" | ||
| logger.warning("InorganicDescriptor is deprecated and will soon be removed. " |
There was a problem hiding this comment.
I believe the standard pattern for deprecations is to use the warnings package, e.g.:
https://github.com/CitrineInformatics/gemd-python/blob/master/taurus/__init__.py#L4
which was pattern-copied from a deprecated python standard module.
maxhutch
left a comment
There was a problem hiding this comment.
Needs a version bump now
Citrine Python PR
Description
Renames InorganicDescriptor to ChemicalFormulaDescriptor and removes the
thresholdargument from the constructor. The backend implementation still has a threshold parameter so we need to take it into account during serde, but it's less exposed to the user now.If a user tries to create an
InorganicDescriptorthey will instead get aChemicalFormulaDescriptorand they will see a deprecation warning.Corresponding changes to nextgen-devkit (merged): https://github.com/CitrineInformatics/nextgen-devkit/pull/414/files#diff-b9e1cad38f41a2a025680df6f77d2aacR6-R9
PR Type:
Adherence to team decisions