diff --git a/gemd/__version__.py b/gemd/__version__.py index 131942e..ce1305b 100644 --- a/gemd/__version__.py +++ b/gemd/__version__.py @@ -1 +1 @@ -__version__ = "3.0.2" +__version__ = "4.0.0" diff --git a/gemd/demo/cake.py b/gemd/demo/cake.py index fe4b0cb..80b57a1 100644 --- a/gemd/demo/cake.py +++ b/gemd/demo/cake.py @@ -195,12 +195,10 @@ def make_cake_templates(): tmpl["Procuring"] = ProcessTemplate( name="Procuring", description="Buyin' stuff", - allowed_names=[], # Takes no ingredients by definition ) tmpl["Baking"] = ProcessTemplate( name="Baking", description="Using heat to promote chemical reactions in a material", - allowed_names=["batter"], allowed_labels=["precursor"], conditions=[(tmpl["Oven temperature"], RealBounds(0, 700, "degF"))], parameters=[(tmpl["Oven temperature setting"], RealBounds(100, 550, "degF"))], diff --git a/gemd/entity/template/process_template.py b/gemd/entity/template/process_template.py index 443f406..ce01489 100644 --- a/gemd/entity/template/process_template.py +++ b/gemd/entity/template/process_template.py @@ -31,12 +31,6 @@ class ProcessTemplate( `Tags `_ are hierarchical strings that store information about an entity. They can be used for filtering and discoverability. - allowed_names: List[str], optional - Deprecated. This field does not limit ingredient names. - The Citrine Platform ignores this list when you save a template. When you fetch a - template, this list has the distinct ingredient names from process specs that use - the template. Names come from datasets you can read. GEMD Python keeps this field - to give users time to migrate code and JSON away from it. allowed_labels: List[str], optional The set of labels that a process' ingredients are allowed to use in their labels field. conditions: List[~gemd.entity.template.condition_template.ConditionTemplate] or \ @@ -61,7 +55,6 @@ def __init__( description=None, conditions=None, parameters=None, - allowed_names=None, allowed_labels=None, uids=None, tags=None, @@ -70,24 +63,9 @@ def __init__( HasConditionTemplates.__init__(self, conditions) HasParameterTemplates.__init__(self, parameters) - self._allowed_names = None - self.allowed_names = allowed_names - self._allowed_labels = None self.allowed_labels = allowed_labels - @property - def allowed_names(self): - """Get the allowed names.""" - return self._allowed_names - - @allowed_names.setter - def allowed_names(self, allowed_names): - if allowed_names is None: - self._allowed_names = validate_list([], str) - else: - self._allowed_names = validate_list(allowed_names, str) - @property def allowed_labels(self): """Get the allowed labels.""" diff --git a/tests/entity/template/test_process_template.py b/tests/entity/template/test_process_template.py index e3f8d39..f6891b8 100644 --- a/tests/entity/template/test_process_template.py +++ b/tests/entity/template/test_process_template.py @@ -19,18 +19,6 @@ def test_bounds_mismatch(): ProcessTemplate("a process template", conditions=[[cond_template, object_bounds]]) -def test_allowed_names(): - """Test that allowed_names can be assigned. - - Presently allowed_names is not used for any validation, but this test can be expanded - if it is used in the future. - """ - allowed_names = ["THF", "Carbon Disulfide", "Dimethyl Ether"] - proc_template = ProcessTemplate(name="test template", allowed_names=allowed_names) - for name in allowed_names: - assert name in proc_template.allowed_names - - def test_allowed_labels(): """Test that allowed_labels can be assigned.