Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class IngredientRatioConstraint(Serializable['IngredientRatioConstraint'], Const
# The backend provides basis ingredients and basis labels as a dictionary from the key to a
# multiplier. However, for ingredient ratio constraints, the multiplier in the denominator
# should always be one, so we can't allow users to enter it. We need to use properties for this
# behavior. It also allows us to display deprecation warnings for the coming type change.
# behavior.
_basis_ingredients = properties.Mapping(
properties.String, properties.Float, 'basis_ingredients', default={})
_basis_labels = properties.Mapping(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from deprecation import deprecated

from citrine._rest.resource import Resource
from citrine._serialization import properties
from citrine.informatics.descriptors import ChemicalFormulaDescriptor
Expand Down Expand Up @@ -152,11 +150,5 @@ def __init__(self,
self.excludes = excludes if excludes is not None else []
self.powers = powers if powers is not None else [1.0]

@property
@deprecated(deprecated_in="4.0.0", removed_in="5.0.0", details="Use 'powers' instead.")
def powers_as_float(self) -> list[float]:
"""Powers when computing generalized weighted means of element properties."""
return self.powers

def __str__(self):
return '<ChemicalFormulaFeaturizer {!r}>'.format(self.name)
18 changes: 0 additions & 18 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,24 +286,6 @@ def valid_graph_predictor_data_empty():
return PredictorEntityDataFactory(data=PredictorDataDataFactory(instance=instance))


@pytest.fixture
def valid_deprecated_expression_predictor_data():
"""Produce valid data used for tests."""
from citrine.informatics.descriptors import RealDescriptor
shear_modulus = RealDescriptor('Property~Shear modulus', lower_bound=0, upper_bound=100, units='GPa')
return dict(
type='Expression',
name='Expression predictor',
description='Computes shear modulus from Youngs modulus and Poissons ratio',
expression='Y / (2 * (1 + v))',
output=shear_modulus.dump(),
aliases={
'Y': "Property~Young's modulus",
'v': "Property~Poisson's ratio",
}
)


@pytest.fixture
def valid_expression_predictor_data():
"""Produce valid data used for tests."""
Expand Down
4 changes: 0 additions & 4 deletions tests/informatics/test_predictors.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,6 @@ def test_chemical_featurizer(chemical_featurizer):
assert chemical_featurizer.features == ["standard"]
assert chemical_featurizer.excludes == []
assert chemical_featurizer.powers == [1.0, 2.0]
with pytest.warns(DeprecationWarning):
assert chemical_featurizer.powers_as_float == [1.0, 2.0]

assert str(chemical_featurizer) == "<ChemicalFormulaFeaturizer 'Chemical featurizer'>"

Expand All @@ -291,8 +289,6 @@ def test_chemical_featurizer(chemical_featurizer):
}

chemical_featurizer.powers = [0.5, -1.0]
with pytest.warns(DeprecationWarning):
assert chemical_featurizer.powers_as_float == [0.5, -1.0]
assert chemical_featurizer.powers == [0.5, -1.0]


Expand Down
1 change: 0 additions & 1 deletion tests/utils/fakes/fake_workflow_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from uuid import uuid4, UUID

from citrine._session import Session
from citrine._utils.functions import migrate_deprecated_argument
from citrine.informatics.workflows import DesignWorkflow
from citrine.resources.design_workflow import DesignWorkflowCollection

Expand Down
Loading