From 1cfe4edf58bef001470696580d1a59ca6b5a24df Mon Sep 17 00:00:00 2001 From: James Whale Date: Tue, 12 Jan 2021 20:07:01 +0000 Subject: [PATCH 1/5] removed logging --- hb_organiser/check.py | 5 +---- hb_organiser/logger.py | 12 ------------ 2 files changed, 1 insertion(+), 16 deletions(-) delete mode 100644 hb_organiser/logger.py diff --git a/hb_organiser/check.py b/hb_organiser/check.py index b08b32f..2b04986 100644 --- a/hb_organiser/check.py +++ b/hb_organiser/check.py @@ -1,15 +1,12 @@ """ Contains methods used to check given input before operating upon it. """ -import logging from pathlib import Path from os import listdir from os.path import isdir, abspath, join from hb_organiser.bundle_objects import Library, Bundle, Item, File -logger = logging.getLogger(__name__) - def source_exists(source): """ @@ -27,7 +24,7 @@ def source_exists(source): print("ERROR: no path given") return False return True - print(f"ERROR: specified source does not exist: {source}") + print(f"ERROR: specified source does not exist: {abspath(source)}") return False diff --git a/hb_organiser/logger.py b/hb_organiser/logger.py deleted file mode 100644 index 4d768ff..0000000 --- a/hb_organiser/logger.py +++ /dev/null @@ -1,12 +0,0 @@ -""" -Builds the logger to be shared across the project. -""" -import logging - -from hb_organiser.config import Config - -logger = logging.getLogger(__name__) -logging.basicConfig( - filename=f"{Config.PROJECT_ROOT}/hb_organiser.log", - level=logging.DEBUG -) From b783be9521ad45916a5258f25a2115757b6e533b Mon Sep 17 00:00:00 2001 From: James Whale Date: Tue, 12 Jan 2021 20:08:18 +0000 Subject: [PATCH 2/5] improve file queuing logic --- hb_organiser/organiser.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hb_organiser/organiser.py b/hb_organiser/organiser.py index 9bec843..d4226f3 100644 --- a/hb_organiser/organiser.py +++ b/hb_organiser/organiser.py @@ -62,16 +62,20 @@ def copy_file(self, source, destination, task=None): """ complete = 'DONE' try: - if source not in open('queue.txt') and not isfile(destination): + log = open('queue.txt') + if source not in log and not isfile(destination): + log.close() print(f"{task} COPYING: {source} {destination}\r", end="", flush=True) complete = 'COPIED' log = open('queue.txt', 'w') log.write(source) log.close() - elif source in open('queue.txt'): + elif source in log: + log.close() print(f"{task} RE-COPING: {source} {destination}\r", end="", flush=True) complete = 'RE-COPIED' else: + log.close() print(f"{task} SKIPPED: {destination}") return True except FileNotFoundError: From 7edbd8a9622e0e6f6be287d975d2ac631e3d394c Mon Sep 17 00:00:00 2001 From: James Whale Date: Tue, 12 Jan 2021 20:17:58 +0000 Subject: [PATCH 3/5] added flag to read arguments from a config file --- .gitignore | 3 +- hb_organiser/cli.py | 119 +++++++++++++++++++++++++++++------------ hb_organiser/config.py | 13 ----- 3 files changed, 85 insertions(+), 50 deletions(-) delete mode 100644 hb_organiser/config.py diff --git a/.gitignore b/.gitignore index 710a28c..cc6421f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,3 @@ .coverage -hb_organiser/config.py -hb_organiser.log queue.txt +args.conf \ No newline at end of file diff --git a/hb_organiser/cli.py b/hb_organiser/cli.py index f094c39..e6a5abe 100644 --- a/hb_organiser/cli.py +++ b/hb_organiser/cli.py @@ -3,12 +3,11 @@ Contains the code pertaining to the CLI. All back-end logic is located elsewhere. """ import argparse +from os.path import abspath from sys import argv from hb_organiser.check import source_exists -from hb_organiser.config import Config from hb_organiser.organiser import HBOrganiser -from hb_organiser.logger import logger def cli(args=None): @@ -21,54 +20,104 @@ def cli(args=None): parser.add_argument( "platform", nargs="+", type=str, help="specifies what platform of bundles to be organised.", - choices=['all', 'android', 'audio', 'ebook', 'humble play', 'key', 'linux', - 'mac', 'origin', 'steam', 'unique links', 'video', 'windows'] + # choices=['all', 'android', 'audio', 'ebook', 'humble play', 'key', 'linux', + # 'mac', 'origin', 'steam', 'unique links', 'video', 'windows'] + choices=['all', 'android', 'audio', 'ebook', 'linux', 'mac', 'video', 'windows'] + ) + parser.add_argument( + "-c", "--conf", type=str, + metavar="PATH", + help="points to configuration file containing arguments such as source and destination. " + "one argument is expected per line in KEY=VALUE format (e.g. SRC=/path/to/file). " + "manually specified flags will overwrite any values specified in the file." ) parser.add_argument( "-s", "--source", type=str, - metavar='SRC', - help="source directory of bundles. overrides location specified in config file." + metavar="SRC", + help="source directory of bundles. overrides SRC specified in config file if present." + ) + parser.add_argument( + "-d", "--dest", type=str, + metavar="DEST", + help="destination directory of sorted bundles. overrides DEST specified in config file if present. " + "if no destination is given, a dry-run will occur - displaying what would have happened." ) parser.add_argument( - "-d", "--destination", type=str, - metavar='DEST', - help="destination directory of sorted bundles. overrides location specified in config file. " - "if no destination is given, a dry run will occur - displaying what would have happened." + "-D", "--dry-run", + action='store_true', + help="performs a dry-run, not actually performing any copy operations. " + "requires a source be specified via flag or config file to run. " + "overwrites destination specified via flag and config file if present." ) if args is not None: - args = parser.parse_args(args) + return parser.parse_args(args) else: - args = parser.parse_args() + return parser.parse_args() + + +def read_config(path): + """ + Reads pre-defined arguments from the specified path. + :param path: Path to the config file. + :type path: str + :return: + """ + arguments = {} + with open(abspath(path)) as conf: + for line in conf: + key, value = line.partition("=")[::2] + arguments[key.strip()] = str(value).strip('\n') + conf.close() + return arguments + + +def verify_args(args): + """ + Determines if the arguments given suffice or need to be overwritten. + + :param args: + :return: + :rtype: list + """ + source = None + destination = None + + if args.conf: + conf_args = read_config(args.conf) + source = conf_args["SRC"] + destination = conf_args["DEST"] -# def verify_args(args): if args.source: source = args.source - else: - try: - source = Config.SOURCE - logger.debug('No source given via CLI. Reading "%s" from config', Config.SOURCE) - except KeyError: - source = None - logger.debug('No source given via CLI or config. Defaulting to None') - - if args.destination: - destination = args.destination - else: - try: - destination = Config.DESTINATION - logger.debug('No destination given via CLI. Reading "%s" from config', Config.DESTINATION) - except KeyError: - destination = None - logger.debug('No destination given via CLI or config. Defaulting to None') + + if args.dest: + destination = args.dest + + if args.dry_run: + destination = None if not source_exists(source): - return False - organiser = HBOrganiser(source, destination, args.platform) - organiser.loop_through_bundles() - return True + return [None, destination, args.platform] + return [source, destination, args.platform] + + +def main(): + """ + Performs the list of tasks to be completed when called as a pip module. + + :return: + """ + pip_arg = verify_args(cli()) + if pip_arg[0] is not None: + pip_organiser = HBOrganiser(pip_arg[0], pip_arg[1], pip_arg[2]) + pip_organiser.loop_through_bundles() if __name__ == '__main__': - cli(argv[1:]) + arg = verify_args(cli(argv[1:])) + if arg[0] is not None: + organiser = HBOrganiser(arg[0], arg[1], arg[2]) + organiser.loop_through_bundles() + diff --git a/hb_organiser/config.py b/hb_organiser/config.py deleted file mode 100644 index 9eb3456..0000000 --- a/hb_organiser/config.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Contains the values for flags to prevent having to specify them via CLI -""" -from os.path import abspath - - -class Config: - """ - Contains the values for flags to prevent having to specify them via CLI - """ - PROJECT_ROOT = abspath('../') - SOURCE = '' - DESTINATION = '' From 07f4b23170b5a8ebfe2c2f36558c989595434fd7 Mon Sep 17 00:00:00 2001 From: James Whale Date: Tue, 12 Jan 2021 20:18:51 +0000 Subject: [PATCH 4/5] added tests to verify cli functionality --- tests/test.conf | 2 + tests/test_cli.py | 74 ++++++++++++++----- tests/test_destination/platform/item/file.txt | 0 3 files changed, 56 insertions(+), 20 deletions(-) create mode 100644 tests/test.conf create mode 100644 tests/test_destination/platform/item/file.txt diff --git a/tests/test.conf b/tests/test.conf new file mode 100644 index 0000000..10d1e3e --- /dev/null +++ b/tests/test.conf @@ -0,0 +1,2 @@ +SRC=tests/test_libraries/library +DEST=tests/test_destination \ No newline at end of file diff --git a/tests/test_cli.py b/tests/test_cli.py index da58f4e..e5c0e57 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -1,7 +1,7 @@ from os.path import abspath from unittest import TestCase -from hb_organiser.cli import * +from hb_organiser.cli import cli, verify_args class HBOrganiserCliTesCase(TestCase): @@ -12,37 +12,71 @@ def tearDown(self) -> None: pass def test_verify_args_returns_true_on_good_relative_source_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_absolute_source_path_with_trailing_forward_slash(self): - result = cli(['-s', abspath('tests/test_libraries/library/'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', abspath('tests/test_libraries/library/'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_relative_source_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_absolute_source_path_without_trailing_forward_slash(self): - result = cli(['-s', abspath('tests/test_libraries/library'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', abspath('tests/test_libraries/library'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) - def test_verify_args_returns_false_on_source_bad_path(self): - result = cli(['-s', 'tests/test_libraries/fake_library', 'all']) - HBOrganiserCliTesCase.assertFalse(self, result) + def test_verify_args_returns_none_on_source_bad_path(self): + arguments = cli(['-s', 'tests/test_libraries/fake_library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertIsNone(self, result[0]) def test_verify_args_returns_true_on_good_relative_destination_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination/', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination/', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_absolute_destination_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination/'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination/'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_relative_destination_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_absolute_destination_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) + + def test_dry_run_flag_overwrites_destination_flag_to_none(self): + arguments = cli(['-s', 'tests/test_libraries/library', '-d', 'tests/test_destination', '-D', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertIsNone(self, result[1]) + + def test_verify_args_returns_source_on_good_config_path(self): + arguments = cli(['-c' 'tests/test.conf', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[0], 'tests/test_libraries/library') + + def test_verify_args_return_destination_on_good_config_path(self): + arguments = cli(['-c', 'tests/test.conf', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[1], 'tests/test_destination') + + def test_verify_args_overwrites_config_source_on_set_source_flag(self): + arguments = cli(['-c', 'tests/test.conf', '-s', 'tests/test_destination', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[0], 'tests/test_destination') + + def test_verify_args_overwrites_config_destination_on_set_destination_flag(self): + arguments = cli(['-c', 'tests/test.conf', '-d', 'tests/test_libraries/library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[1], 'tests/test_libraries/library') diff --git a/tests/test_destination/platform/item/file.txt b/tests/test_destination/platform/item/file.txt new file mode 100644 index 0000000..e69de29 From 8ebb1cf09c518eeda2b0b6c49cbc9d2ddeb8a2d7 Mon Sep 17 00:00:00 2001 From: James Whale Date: Tue, 12 Jan 2021 20:23:58 +0000 Subject: [PATCH 5/5] added pip package files --- build/lib/hb_organiser/check.py | 5 +- build/lib/hb_organiser/cli.py | 119 ++++++++++++++++------- build/lib/hb_organiser/organiser.py | 8 +- build/lib/tests/test_cli.py | 74 ++++++++++---- dist/hb_organiser-1.0.9-py3-none-any.whl | Bin 0 -> 11627 bytes dist/hb_organiser-1.0.9.tar.gz | Bin 0 -> 9827 bytes hb_organiser.egg-info/PKG-INFO | 2 +- hb_organiser.egg-info/SOURCES.txt | 2 - hb_organiser.egg-info/entry_points.txt | 2 +- hb_organiser/cli.py | 4 +- setup.py | 4 +- 11 files changed, 149 insertions(+), 71 deletions(-) create mode 100644 dist/hb_organiser-1.0.9-py3-none-any.whl create mode 100644 dist/hb_organiser-1.0.9.tar.gz diff --git a/build/lib/hb_organiser/check.py b/build/lib/hb_organiser/check.py index b08b32f..2b04986 100644 --- a/build/lib/hb_organiser/check.py +++ b/build/lib/hb_organiser/check.py @@ -1,15 +1,12 @@ """ Contains methods used to check given input before operating upon it. """ -import logging from pathlib import Path from os import listdir from os.path import isdir, abspath, join from hb_organiser.bundle_objects import Library, Bundle, Item, File -logger = logging.getLogger(__name__) - def source_exists(source): """ @@ -27,7 +24,7 @@ def source_exists(source): print("ERROR: no path given") return False return True - print(f"ERROR: specified source does not exist: {source}") + print(f"ERROR: specified source does not exist: {abspath(source)}") return False diff --git a/build/lib/hb_organiser/cli.py b/build/lib/hb_organiser/cli.py index f094c39..6ab7a10 100644 --- a/build/lib/hb_organiser/cli.py +++ b/build/lib/hb_organiser/cli.py @@ -3,12 +3,11 @@ Contains the code pertaining to the CLI. All back-end logic is located elsewhere. """ import argparse +from os.path import abspath from sys import argv from hb_organiser.check import source_exists -from hb_organiser.config import Config from hb_organiser.organiser import HBOrganiser -from hb_organiser.logger import logger def cli(args=None): @@ -21,54 +20,102 @@ def cli(args=None): parser.add_argument( "platform", nargs="+", type=str, help="specifies what platform of bundles to be organised.", - choices=['all', 'android', 'audio', 'ebook', 'humble play', 'key', 'linux', - 'mac', 'origin', 'steam', 'unique links', 'video', 'windows'] + # choices=['all', 'android', 'audio', 'ebook', 'humble play', 'key', 'linux', + # 'mac', 'origin', 'steam', 'unique links', 'video', 'windows'] + choices=['all', 'android', 'audio', 'ebook', 'linux', 'mac', 'video', 'windows'] + ) + parser.add_argument( + "-c", "--conf", type=str, + metavar="PATH", + help="points to configuration file containing arguments such as source and destination. " + "one argument is expected per line in KEY=VALUE format (e.g. SRC=/path/to/file). " + "manually specified flags will overwrite any values specified in the file." ) parser.add_argument( "-s", "--source", type=str, - metavar='SRC', - help="source directory of bundles. overrides location specified in config file." + metavar="SRC", + help="source directory of bundles. overrides SRC specified in config file if present." + ) + parser.add_argument( + "-d", "--dest", type=str, + metavar="DEST", + help="destination directory of sorted bundles. overrides DEST specified in config file if present. " + "if no destination is given, a dry-run will occur - displaying what would have happened." ) parser.add_argument( - "-d", "--destination", type=str, - metavar='DEST', - help="destination directory of sorted bundles. overrides location specified in config file. " - "if no destination is given, a dry run will occur - displaying what would have happened." + "-D", "--dry-run", + action='store_true', + help="performs a dry-run, not actually performing any copy operations. " + "requires a source be specified via flag or config file to run. " + "overwrites destination specified via flag and config file if present." ) if args is not None: - args = parser.parse_args(args) - else: - args = parser.parse_args() + return parser.parse_args(args) + return parser.parse_args() + + +def read_config(path): + """ + Reads pre-defined arguments from the specified path. + + :param path: Path to the config file. + :type path: str + :return: + """ + arguments = {} + with open(abspath(path)) as conf: + for line in conf: + key, value = line.partition("=")[::2] + arguments[key.strip()] = str(value).strip('\n') + conf.close() + return arguments + + +def verify_args(args): + """ + Determines if the arguments given suffice or need to be overwritten. + + :param args: + :return: + :rtype: list + """ + source = None + destination = None + if args.conf: + conf_args = read_config(args.conf) + source = conf_args["SRC"] + destination = conf_args["DEST"] -# def verify_args(args): if args.source: source = args.source - else: - try: - source = Config.SOURCE - logger.debug('No source given via CLI. Reading "%s" from config', Config.SOURCE) - except KeyError: - source = None - logger.debug('No source given via CLI or config. Defaulting to None') - - if args.destination: - destination = args.destination - else: - try: - destination = Config.DESTINATION - logger.debug('No destination given via CLI. Reading "%s" from config', Config.DESTINATION) - except KeyError: - destination = None - logger.debug('No destination given via CLI or config. Defaulting to None') + + if args.dest: + destination = args.dest + + if args.dry_run: + destination = None if not source_exists(source): - return False - organiser = HBOrganiser(source, destination, args.platform) - organiser.loop_through_bundles() - return True + return [None, destination, args.platform] + return [source, destination, args.platform] + + +def main(): + """ + Performs the list of tasks to be completed when called as a pip module. + + :return: + """ + pip_arg = verify_args(cli()) + if pip_arg[0] is not None: + pip_organiser = HBOrganiser(pip_arg[0], pip_arg[1], pip_arg[2]) + pip_organiser.loop_through_bundles() if __name__ == '__main__': - cli(argv[1:]) + arg = verify_args(cli(argv[1:])) + if arg[0] is not None: + organiser = HBOrganiser(arg[0], arg[1], arg[2]) + organiser.loop_through_bundles() diff --git a/build/lib/hb_organiser/organiser.py b/build/lib/hb_organiser/organiser.py index 9bec843..d4226f3 100644 --- a/build/lib/hb_organiser/organiser.py +++ b/build/lib/hb_organiser/organiser.py @@ -62,16 +62,20 @@ def copy_file(self, source, destination, task=None): """ complete = 'DONE' try: - if source not in open('queue.txt') and not isfile(destination): + log = open('queue.txt') + if source not in log and not isfile(destination): + log.close() print(f"{task} COPYING: {source} {destination}\r", end="", flush=True) complete = 'COPIED' log = open('queue.txt', 'w') log.write(source) log.close() - elif source in open('queue.txt'): + elif source in log: + log.close() print(f"{task} RE-COPING: {source} {destination}\r", end="", flush=True) complete = 'RE-COPIED' else: + log.close() print(f"{task} SKIPPED: {destination}") return True except FileNotFoundError: diff --git a/build/lib/tests/test_cli.py b/build/lib/tests/test_cli.py index da58f4e..e5c0e57 100644 --- a/build/lib/tests/test_cli.py +++ b/build/lib/tests/test_cli.py @@ -1,7 +1,7 @@ from os.path import abspath from unittest import TestCase -from hb_organiser.cli import * +from hb_organiser.cli import cli, verify_args class HBOrganiserCliTesCase(TestCase): @@ -12,37 +12,71 @@ def tearDown(self) -> None: pass def test_verify_args_returns_true_on_good_relative_source_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_absolute_source_path_with_trailing_forward_slash(self): - result = cli(['-s', abspath('tests/test_libraries/library/'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', abspath('tests/test_libraries/library/'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_relative_source_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) def test_verify_args_returns_true_on_good_absolute_source_path_without_trailing_forward_slash(self): - result = cli(['-s', abspath('tests/test_libraries/library'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', abspath('tests/test_libraries/library'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[0]) - def test_verify_args_returns_false_on_source_bad_path(self): - result = cli(['-s', 'tests/test_libraries/fake_library', 'all']) - HBOrganiserCliTesCase.assertFalse(self, result) + def test_verify_args_returns_none_on_source_bad_path(self): + arguments = cli(['-s', 'tests/test_libraries/fake_library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertIsNone(self, result[0]) def test_verify_args_returns_true_on_good_relative_destination_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination/', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination/', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_absolute_destination_path_with_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination/'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination/'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_relative_destination_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination', 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', 'tests/test_destination', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) def test_verify_args_returns_true_on_good_absolute_destination_path_without_trailing_forward_slash(self): - result = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination'), 'all']) - HBOrganiserCliTesCase.assertTrue(self, result) + arguments = cli(['-s', 'tests/test_libraries/library/', '-d', abspath('tests/test_destination'), 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertTrue(self, result[1]) + + def test_dry_run_flag_overwrites_destination_flag_to_none(self): + arguments = cli(['-s', 'tests/test_libraries/library', '-d', 'tests/test_destination', '-D', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertIsNone(self, result[1]) + + def test_verify_args_returns_source_on_good_config_path(self): + arguments = cli(['-c' 'tests/test.conf', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[0], 'tests/test_libraries/library') + + def test_verify_args_return_destination_on_good_config_path(self): + arguments = cli(['-c', 'tests/test.conf', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[1], 'tests/test_destination') + + def test_verify_args_overwrites_config_source_on_set_source_flag(self): + arguments = cli(['-c', 'tests/test.conf', '-s', 'tests/test_destination', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[0], 'tests/test_destination') + + def test_verify_args_overwrites_config_destination_on_set_destination_flag(self): + arguments = cli(['-c', 'tests/test.conf', '-d', 'tests/test_libraries/library', 'all']) + result = verify_args(arguments) + HBOrganiserCliTesCase.assertEqual(self, result[1], 'tests/test_libraries/library') diff --git a/dist/hb_organiser-1.0.9-py3-none-any.whl b/dist/hb_organiser-1.0.9-py3-none-any.whl new file mode 100644 index 0000000000000000000000000000000000000000..f682ee0ffc69083be05a2b2c66e694be73343559 GIT binary patch literal 11627 zcmai)by!?W^7jW1?jAI_ySoIp!QI^k*WeN$NN{&|4NlPD?hXkq0fPHWcAwqkX7BI4 zGtW75=8yVx_jFHH_qR$>1_BZT006uKoX3#^UmgJ9KW{HDoR`bONZ;Pk+|bU_$<&ci zU*FQs(pg`h0ptMzQ2ejmT>=e|EYupa>BVpd762gp)6U4n&cw!4-`>c|)Y#eS#kyTp z&VHE*q5WPRWiiL~2?6(( z;u9u|+am&TXNN1OH}z65$mlin1v%{_57(&oy(w(3c`Ab#TN+^AxS&8cW;sc z?m)Ir?Ig+6?ZFhCto1JIftVi#F}r~f`-DM2IbvZ2r4$0gD2dBragB=nM4tvYf>LiJ zt#~e&FBt4zZfB2K;^gI2hn-M5)11j|6ii8Q=m#G(*j$N_VSV%s@lV?L8G60wH{k1p zg7Gk;;?k0Pwkn~Xn0_Q5_SCMKwJDyrmX{#jdIDBdfs))njE$1;OCA`w-w0vI++c#&KVIa=iEm1U<#o2`$PP)TR+Wkv5+G-Z zo6lfbhus5%@=mB+6JiDUWX5u@yY2&oZ?NUJd0dpZsP?zxB?4OaX~*yoeDY^4was$jUF1 zD{)-qX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;jpY+3+xSlN#R$vuLiZ6hx!aWv_)I3&#*mQCY}= zMf;o_-h>(N)t>ItQ^ySBCDKO31<>GPnnL9(G7{5+NTXz2jF(;SaENJZ>GwlaF)WQiu zW2l<`kAt!1je%J_BAAwV1~n^nL@wO+@1bxRyb(u+z1khKxdn0u7%oaFU(V~9Y1zNA zZ0Q#fy!$k^D_l)`vC#EHl(SV&ZMyTi8@;PpP1FD*J4KyiY`SU5;$E{KMvI4YTjCuD za%kR>Qz-wMN=VVe#F#tZOukUDBc>Y8D3hs74&3OegQ)=FmCupT%o^%;RPJSKxj=#6j(W(@a&9odWix@m3KpiC*UA@mN zYe!nu#&}0sFY&-gSn| z-Eo6bUOcjTAZY+@KRZ0e$$_ul{i6oZU7)|bN;@)8gXsts{0(f>6CP(a?RRnYhndh! z-NhoK149GFIvi4!A8g(Sxa*yM>7ec2O#&OwU2enrPB{I;4!F&;I1ZTB*f2IgIFH<0 z&LLBR<|QG}Ooh5v3VCHJd2PcRJ~7$sj*w|rLiHIp@%uxs@#tIDJkHFzf=*XHCHIlN z57s9)PEdY_FFW&VKTPOohmp%E4;+KfW67aGe{GIi8}@!w?N?~K1ou>E3O{mJ+}-S!vE z-{_IQFi0eX-b@G?F;D62ks#X3@_&aUv7Xjj>TK3-^_)RJM-TdzqkzeMr zcz^vV|1W*yPvW0v)n7zNf`1_X=j8e)^3S0D3(4@J;`~0}|I^8Th4?>te+J@TyrF;M z{TY`3ME@CRf1$-+4(|WouKp$L{>l9_#{QQJmitfKe@9$J8K@Tl0RTXGd1t=JUyW2h Gzx_Ybd1tHu literal 0 HcmV?d00001 diff --git a/dist/hb_organiser-1.0.9.tar.gz b/dist/hb_organiser-1.0.9.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..aff5b451db3910d1547760422325210ec1d7bfdd GIT binary patch literal 9827 zcmbW7RZN}%)25-g7l-0jq9X1w z_g=2+%iZ=*?2vLYNAGWK9f&YdM3VauCEIW@$X)CZ1n7QfR=(m zjaQW9jp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!~m8sdA5pQ3)Su9aK5$^_|z=F zq-HX)9D+2Icx$Y_EuBs5_2ZctgBT>6)tDj70u^>nyS8CEG<6x=$f`e@Q}v9!3u0gO zQeSURy!~j7Xkz$VvE8xx=RVzxKLP{%iHsz((5t~ zwO<=cV(K-U<+87UGqp>`+gU5u3aZM7FjTyFSFdPO6#403)^5n_PWC+yd5%j%`nC$n z=4V9qwFq=*S($Ab$}C@hn3Crk#0S&}doUq(GYq=25^a`0!=cNH{F-moNI)6ugtF|t U(*JM8^8#pw&no5+f{+mZ1HAFcsQ>@~ literal 0 HcmV?d00001 diff --git a/hb_organiser.egg-info/PKG-INFO b/hb_organiser.egg-info/PKG-INFO index b12f50f..b2acfc5 100644 --- a/hb_organiser.egg-info/PKG-INFO +++ b/hb_organiser.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: hb-organiser -Version: 1.0.8 +Version: 1.0.9 Summary: Organises Humble Bundle bundles based on their platform. Home-page: https://github.com/WhaleJ84/hb_organiser Author: James Whale diff --git a/hb_organiser.egg-info/SOURCES.txt b/hb_organiser.egg-info/SOURCES.txt index 370152d..f6a2542 100644 --- a/hb_organiser.egg-info/SOURCES.txt +++ b/hb_organiser.egg-info/SOURCES.txt @@ -4,8 +4,6 @@ hb_organiser/__init__.py hb_organiser/bundle_objects.py hb_organiser/check.py hb_organiser/cli.py -hb_organiser/config.py -hb_organiser/logger.py hb_organiser/organiser.py hb_organiser.egg-info/PKG-INFO hb_organiser.egg-info/SOURCES.txt diff --git a/hb_organiser.egg-info/entry_points.txt b/hb_organiser.egg-info/entry_points.txt index 223bd44..d2f4ce4 100644 --- a/hb_organiser.egg-info/entry_points.txt +++ b/hb_organiser.egg-info/entry_points.txt @@ -1,3 +1,3 @@ [console_scripts] -hb_organiser = hb_organiser.cli:cli +hb_organiser = hb_organiser.cli:main diff --git a/hb_organiser/cli.py b/hb_organiser/cli.py index e6a5abe..6ab7a10 100644 --- a/hb_organiser/cli.py +++ b/hb_organiser/cli.py @@ -52,8 +52,7 @@ def cli(args=None): if args is not None: return parser.parse_args(args) - else: - return parser.parse_args() + return parser.parse_args() def read_config(path): @@ -120,4 +119,3 @@ def main(): if arg[0] is not None: organiser = HBOrganiser(arg[0], arg[1], arg[2]) organiser.loop_through_bundles() - diff --git a/setup.py b/setup.py index df4ee37..474f9fe 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setup( name="hb_organiser", - version="1.0.8", + version="1.0.9", author="James Whale", author_email="james@james-whale.com", description="Organises Humble Bundle bundles based on their platform.", @@ -24,7 +24,7 @@ ], entry_points={ 'console_scripts': [ - 'hb_organiser=hb_organiser.cli:cli', + 'hb_organiser=hb_organiser.cli:main', ], }, python_requires='>=3.6',