From 5481b14b7a60d0370d3871f577d0c3e312515cf6 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Sun, 4 Aug 2019 19:27:35 +0200 Subject: [PATCH] Feat: move recopytex to its own folder --- recopytex/__init__.py | 0 recopytex.py => recopytex/__main__.py | 9 +++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 recopytex/__init__.py rename recopytex.py => recopytex/__main__.py (91%) diff --git a/recopytex/__init__.py b/recopytex/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/recopytex.py b/recopytex/__main__.py similarity index 91% rename from recopytex.py rename to recopytex/__main__.py index 2afa1fa..547cbb2 100644 --- a/recopytex.py +++ b/recopytex/__main__.py @@ -7,7 +7,9 @@ import yaml import sys import papermill as pm -with open("recoconfig.yml", "r") as config: +CONFIGPATH = "recoconfig.yml" + +with open(CONFIGPATH, "r") as config: config = yaml.load(config, Loader=yaml.FullLoader) @@ -18,7 +20,9 @@ def cli(): @cli.command() def print_config(): - click.echo(config.key()) + click.echo(f"Config file is {CONFIGPATH}") + click.echo("It contains") + click.echo(config) @cli.command() @@ -71,3 +75,4 @@ def report(csv_file): if __name__ == "__main__": cli() +