diff --git a/aligned/compiler/feature_factory.py b/aligned/compiler/feature_factory.py index f92e069d..2fb8de69 100644 --- a/aligned/compiler/feature_factory.py +++ b/aligned/compiler/feature_factory.py @@ -1364,6 +1364,17 @@ def at_index(self, index: int) -> GenericFeature: return feature +class Url(StringValidatable): + @property + def dtype(self) -> FeatureType: + return FeatureType.string() + + def copy_type(self) -> Url: + if self.constraints and Optional() in self.constraints: + return Url().is_optional() + return Url() + + class ImageUrl(StringValidatable): @property def dtype(self) -> FeatureType: diff --git a/pyproject.toml b/pyproject.toml index d26e5949..a7904b5e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "aligned" -version = "0.0.95" +version = "0.0.96" description = "A data managment and lineage tool for ML applications." authors = ["Mats E. Mollestad "] license = "Apache-2.0"