From 211ef34c5ec9b9a88f40f2bd6059b6565e0e41cd Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Mon, 15 Jul 2024 07:48:30 -0700 Subject: [PATCH 1/2] add stuff to __all__ when doing import_and_attach_all() --- src/rail/stages/__init__.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/rail/stages/__init__.py b/src/rail/stages/__init__.py index 93ec5f07..dc215d53 100644 --- a/src/rail/stages/__init__.py +++ b/src/rail/stages/__init__.py @@ -34,13 +34,6 @@ from rail.tools.table_tools import ColumnMapper, RowSelector, TableConverter - -def import_and_attach_all(): - """Import all the packages in the rail ecosystem and attach them to this module""" - RailEnv.import_all_packages() - RailEnv.attach_stages(rail.stages) - - __all__ = [ "CatEstimator", "CatClassifier", @@ -79,3 +72,12 @@ def import_and_attach_all(): "RowSelector", "TableConverter", ] + + +def import_and_attach_all(): + """Import all the packages in the rail ecosystem and attach them to this module""" + RailEnv.import_all_packages() + RailEnv.attach_stages(rail.stages) + for xx in dir(rail.stages): + rail.stages.__all__.append(xx) + From 4cad6c3718ca991743557be1d99f0f1ecc478da2 Mon Sep 17 00:00:00 2001 From: Eric Charles Date: Mon, 15 Jul 2024 07:51:37 -0700 Subject: [PATCH 2/2] better version --- src/rail/stages/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/rail/stages/__init__.py b/src/rail/stages/__init__.py index dc215d53..49ce4859 100644 --- a/src/rail/stages/__init__.py +++ b/src/rail/stages/__init__.py @@ -1,5 +1,7 @@ import rail + from rail.core import RailEnv +from rail.core.stage import RailStage from rail.estimation.estimator import CatEstimator from rail.estimation.classifier import CatClassifier, PZClassifier @@ -78,6 +80,6 @@ def import_and_attach_all(): """Import all the packages in the rail ecosystem and attach them to this module""" RailEnv.import_all_packages() RailEnv.attach_stages(rail.stages) - for xx in dir(rail.stages): + for xx in RailStage.pipeline_stages: rail.stages.__all__.append(xx)