omnata-plugin-runtime 0.10.2__tar.gz → 0.10.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: omnata-plugin-runtime
3
- Version: 0.10.2
3
+ Version: 0.10.3
4
4
  Summary: Classes and common runtime components for building and running Omnata Plugins
5
5
  Author: James Weakley
6
6
  Author-email: james.weakley@omnata.com
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "omnata-plugin-runtime"
3
- version = "0.10.2"
3
+ version = "0.10.3"
4
4
  description = "Classes and common runtime components for building and running Omnata Plugins"
5
5
  authors = ["James Weakley <james.weakley@omnata.com>"]
6
6
  readme = "README.md"
@@ -2427,7 +2427,7 @@ def omnata_udtf(
2427
2427
 
2428
2428
  return class_decorator
2429
2429
 
2430
- def find_udtf_classes(path:str = '.') -> List[UDTFDefinition]:
2430
+ def find_udtf_classes(path:str = '.',top_level_modules:Optional[List[str]] = None) -> List[UDTFDefinition]:
2431
2431
  """
2432
2432
  Finds all classes in the specified directory which have the 'omnata_udtf' decorator applied
2433
2433
  """
@@ -2440,6 +2440,9 @@ def find_udtf_classes(path:str = '.') -> List[UDTFDefinition]:
2440
2440
  # Iterate over all modules in the current directory
2441
2441
  for importer, module_name, ispkg in pkgutil.walk_packages(path=[current_dir]):
2442
2442
  # Import the module
2443
+ if top_level_modules is not None:
2444
+ if len([x for x in top_level_modules if module_name.startswith(x)]) == 0:
2445
+ continue
2443
2446
  module = importlib.import_module(module_name)
2444
2447
 
2445
2448
  # Iterate over all members of the module
@@ -2544,7 +2547,7 @@ def omnata_udf(
2544
2547
 
2545
2548
  return decorator
2546
2549
 
2547
- def find_udf_functions(path:str = '.') -> List[UDFDefinition]:
2550
+ def find_udf_functions(path:str = '.',top_level_modules:Optional[List[str]] = None) -> List[UDFDefinition]:
2548
2551
  """
2549
2552
  Finds all functions in the specified directory which have the 'omnata_udf' decorator applied
2550
2553
  """
@@ -2557,6 +2560,9 @@ def find_udf_functions(path:str = '.') -> List[UDFDefinition]:
2557
2560
  # Iterate over all modules in the current directory
2558
2561
  for importer, module_name, ispkg in pkgutil.walk_packages(path=[current_dir]):
2559
2562
  # Import the module
2563
+ if top_level_modules is not None:
2564
+ if len([x for x in top_level_modules if module_name.startswith(x)]) == 0:
2565
+ continue
2560
2566
  module = importlib.import_module(module_name)
2561
2567
 
2562
2568
  # Iterate over all members of the module