Skip to content

Commit

Permalink
Added an url feature
Browse files Browse the repository at this point in the history
MatsMoll committed May 20, 2024
1 parent 52b6bb9 commit 5d434d8
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions aligned/compiler/feature_factory.py
Original file line number Diff line number Diff line change
@@ -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:
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -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 <mats@mollestad.no>"]
license = "Apache-2.0"

0 comments on commit 5d434d8

Please sign in to comment.