From 4373a34711a33b1ad038cd977bdb1fb1c25da98b Mon Sep 17 00:00:00 2001 From: Federico Luzzi Date: Wed, 13 Sep 2023 11:17:56 -0300 Subject: [PATCH] fix export import with path, add pyfzf as required --- connpy/_version.py | 2 +- connpy/connapp.py | 7 ++++--- docs/connpy/index.html | 11 ++++++----- setup.cfg | 4 +--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/connpy/_version.py b/connpy/_version.py index 1d03095..20134c9 100644 --- a/connpy/_version.py +++ b/connpy/_version.py @@ -1,2 +1,2 @@ -__version__ = "3.4.0" +__version__ = "3.4.1" diff --git a/connpy/connapp.py b/connpy/connapp.py index d1ecc14..219eb46 100755 --- a/connpy/connapp.py +++ b/connpy/connapp.py @@ -107,11 +107,11 @@ class connapp: bulkparser.set_defaults(func=self._func_others) # EXPORTPARSER exportparser = subparsers.add_parser("export", help="Export connection folder to Yaml file") - exportparser.add_argument("export", nargs=2, action=self._store_type, help="export [@subfolder]@folder file.yaml", type=self._type_node) + exportparser.add_argument("export", nargs=2, action=self._store_type, help="Export [@subfolder]@folder /path/to/file.yml") exportparser.set_defaults(func=self._func_export) # IMPORTPARSER importparser = subparsers.add_parser("import", help="Import connection folder to config from Yaml file") - importparser.add_argument("import", nargs=1, action=self._store_type, help="import file.yaml", type=self._type_node) + importparser.add_argument("file", nargs=1, action=self._store_type, help="Import /path/to/file.yml") importparser.set_defaults(func=self._func_import) # AIPARSER aiparser = subparsers.add_parser("ai", help="Make request to an AI") @@ -569,7 +569,8 @@ class connapp: if not os.path.exists(args.data[0]): print("File {} dosn't exists".format(args.data[0])) exit(14) - question = [inquirer.Confirm("import", message="Are you sure you want to import {} file? This could overwrite your current configuration".format(args.data[0]))] + print("This could overwrite your current configuration!") + question = [inquirer.Confirm("import", message="Are you sure you want to import {} file?".format(args.data[0]))] confirm = inquirer.prompt(question) if confirm == None: exit(7) diff --git a/docs/connpy/index.html b/docs/connpy/index.html index 7ce2e01..3b70611 100644 --- a/docs/connpy/index.html +++ b/docs/connpy/index.html @@ -1894,11 +1894,11 @@ Categorize the user's request based on the operation they want to perform on bulkparser.set_defaults(func=self._func_others) # EXPORTPARSER exportparser = subparsers.add_parser("export", help="Export connection folder to Yaml file") - exportparser.add_argument("export", nargs=2, action=self._store_type, help="export [@subfolder]@folder file.yaml", type=self._type_node) + exportparser.add_argument("export", nargs=2, action=self._store_type, help="Export [@subfolder]@folder /path/to/file.yml") exportparser.set_defaults(func=self._func_export) # IMPORTPARSER importparser = subparsers.add_parser("import", help="Import connection folder to config from Yaml file") - importparser.add_argument("import", nargs=1, action=self._store_type, help="import file.yaml", type=self._type_node) + importparser.add_argument("file", nargs=1, action=self._store_type, help="Import /path/to/file.yml") importparser.set_defaults(func=self._func_import) # AIPARSER aiparser = subparsers.add_parser("ai", help="Make request to an AI") @@ -2356,7 +2356,8 @@ Categorize the user's request based on the operation they want to perform on if not os.path.exists(args.data[0]): print("File {} dosn't exists".format(args.data[0])) exit(14) - question = [inquirer.Confirm("import", message="Are you sure you want to import {} file? This could overwrite your current configuration".format(args.data[0]))] + print("This could overwrite your current configuration!") + question = [inquirer.Confirm("import", message="Are you sure you want to import {} file?".format(args.data[0]))] confirm = inquirer.prompt(question) if confirm == None: exit(7) @@ -3207,11 +3208,11 @@ tasks: bulkparser.set_defaults(func=self._func_others) # EXPORTPARSER exportparser = subparsers.add_parser("export", help="Export connection folder to Yaml file") - exportparser.add_argument("export", nargs=2, action=self._store_type, help="export [@subfolder]@folder file.yaml", type=self._type_node) + exportparser.add_argument("export", nargs=2, action=self._store_type, help="Export [@subfolder]@folder /path/to/file.yml") exportparser.set_defaults(func=self._func_export) # IMPORTPARSER importparser = subparsers.add_parser("import", help="Import connection folder to config from Yaml file") - importparser.add_argument("import", nargs=1, action=self._store_type, help="import file.yaml", type=self._type_node) + importparser.add_argument("file", nargs=1, action=self._store_type, help="Import /path/to/file.yml") importparser.set_defaults(func=self._func_import) # AIPARSER aiparser = subparsers.add_parser("ai", help="Make request to an AI") diff --git a/setup.cfg b/setup.cfg index fba1cff..e9fe5df 100644 --- a/setup.cfg +++ b/setup.cfg @@ -29,14 +29,12 @@ install_requires = pexpect pycryptodome Flask + pyfzf waitress PyYAML openai rich -[options.extras_require] -fuzzysearch = pyfzf - [options.entry_points] console_scripts = conn = connpy.__main__:main