update tuple printers with command to list testtuples
@@ -376,6 +376,13 @@ class TraintuplePrinter(AssetPrinter):
)
has_description = False
+ def print_messages(self, item, profile=None):
+ key_value = self.key_field.get_value(item)
+ profile_arg = self.get_profile_arg(profile)
+
+ print('\nDisplay this traintuple\'s testtuples:')
+ print(f'\tsubstra list testtuple -f "testtuple:traintupleKey:{key_value}" {profile_arg}')
+
class AggregateTuplePrinter(AssetPrinter):
asset_name = 'aggregatetuple'
@@ -404,6 +411,13 @@ class AggregateTuplePrinter(AssetPrinter):
)
has_description = False
+ def print_messages(self, item, profile=None):
+ key_value = self.key_field.get_value(item)
+ profile_arg = self.get_profile_arg(profile)
+
+ print('\nDisplay this aggregatetuple\'s testtuples:')
+ print(f'\tsubstra list testtuple -f "testtuple:traintupleKey:{key_value}" {profile_arg}')
+
class CompositeTraintuplePrinter(AssetPrinter):
asset_name = 'composite_traintuple'
@@ -437,6 +451,13 @@ class CompositeTraintuplePrinter(AssetPrinter):
)
has_description = False
+ def print_messages(self, item, profile=None):
+ key_value = self.key_field.get_value(item)
+ profile_arg = self.get_profile_arg(profile)
+
+ print('\nDisplay this composite traintuple\'s testtuples:')
+ print(f'\tsubstra list testtuple -f "testtuple:traintupleKey:{key_value}" {profile_arg}')
+
class TesttuplePrinter(AssetPrinter):
asset_name = 'testtuple'
