From 926c768976150acabb517c3dd4eb093e75639233 Mon Sep 17 00:00:00 2001 From: Waylon Walker Date: Fri, 18 Jun 2021 08:00:33 -0500 Subject: [PATCH] turn script into module --- pypi-list.py => pypi_list/__init__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) rename pypi-list.py => pypi_list/__init__.py (98%) diff --git a/pypi-list.py b/pypi_list/__init__.py similarity index 98% rename from pypi-list.py rename to pypi_list/__init__.py index 33193d3..3bf1843 100644 --- a/pypi-list.py +++ b/pypi_list/__init__.py @@ -29,6 +29,8 @@ from kedro.runner.sequential_runner import SequentialRunner logger = logging.getLogger(__name__) +__version__ = "0.1.0" + def get_body(packages): @@ -136,7 +138,8 @@ catalog = DataCatalog( runner = SequentialRunner() -if __name__ == "__main__": + +def main(): import sys if "--full" in sys.argv: @@ -146,3 +149,7 @@ if __name__ == "__main__": Pipeline([node for node in pipeline.nodes if "raw" not in node.name]), catalog, ) + + +if __name__ == "__main__": + main()