From 186b336bf34cf50814c5f1500a337830ab1af218 Mon Sep 17 00:00:00 2001 From: Sven Heidemann Date: Wed, 30 Nov 2022 19:05:11 +0100 Subject: [PATCH] Repaired build & publish #93 --- src/cpl_cli/__init__.py | 2 +- src/cpl_cli/_templates/__init__.py | 2 +- src/cpl_cli/_templates/build/__init__.py | 2 +- src/cpl_cli/_templates/generate/__init__.py | 2 +- src/cpl_cli/_templates/new/__init__.py | 2 +- src/cpl_cli/_templates/new/console/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/__init__.py | 2 +- src/cpl_cli/_templates/new/console/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/library/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/__init__.py | 2 +- src/cpl_cli/_templates/new/library/source/name/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/__init__.py | 2 +- src/cpl_cli/_templates/new/unittest/source/name/__init__.py | 2 +- src/cpl_cli/_templates/publish/__init__.py | 2 +- src/cpl_cli/command/__init__.py | 2 +- src/cpl_cli/configuration/__init__.py | 2 +- src/cpl_cli/live_server/__init__.py | 2 +- src/cpl_cli/migrations/__init__.py | 2 +- src/cpl_cli/migrations/base/__init__.py | 2 +- src/cpl_cli/migrations/service/__init__.py | 2 +- src/cpl_cli/publish/__init__.py | 2 +- src/cpl_cli/publish/publisher_service.py | 4 ++-- src/cpl_cli/source_creator/__init__.py | 2 +- src/cpl_cli/validators/__init__.py | 2 +- unittests/unittests_cli/build_test_case.py | 2 +- unittests/unittests_cli/publish_test_case.py | 4 ++-- 27 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/cpl_cli/__init__.py b/src/cpl_cli/__init__.py index 227afbda..cacc83ee 100644 --- a/src/cpl_cli/__init__.py +++ b/src/cpl_cli/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'cpl-cli' +__title__ = 'cpl_cli' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/__init__.py b/src/cpl_cli/_templates/__init__.py index 1742ddf9..c46a6fd5 100644 --- a/src/cpl_cli/_templates/__init__.py +++ b/src/cpl_cli/_templates/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates' +__title__ = 'cpl_cli._templates' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/build/__init__.py b/src/cpl_cli/_templates/build/__init__.py index 17140905..21ad75d9 100644 --- a/src/cpl_cli/_templates/build/__init__.py +++ b/src/cpl_cli/_templates/build/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.build' +__title__ = 'cpl_cli._templates.build' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/generate/__init__.py b/src/cpl_cli/_templates/generate/__init__.py index 25d1efa5..84b734d1 100644 --- a/src/cpl_cli/_templates/generate/__init__.py +++ b/src/cpl_cli/_templates/generate/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.generate' +__title__ = 'cpl_cli._templates.generate' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/__init__.py b/src/cpl_cli/_templates/new/__init__.py index b06174cb..db2618ea 100644 --- a/src/cpl_cli/_templates/new/__init__.py +++ b/src/cpl_cli/_templates/new/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new' +__title__ = 'cpl_cli._templates.new' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/__init__.py b/src/cpl_cli/_templates/new/console/__init__.py index 1f8490fd..6c1afdc0 100644 --- a/src/cpl_cli/_templates/new/console/__init__.py +++ b/src/cpl_cli/_templates/new/console/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console' +__title__ = 'cpl_cli._templates.new.console' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/__init__.py b/src/cpl_cli/_templates/new/console/source/__init__.py index 21378df3..78bef3d1 100644 --- a/src/cpl_cli/_templates/new/console/source/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source' +__title__ = 'cpl_cli._templates.new.console.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/console/source/name/__init__.py b/src/cpl_cli/_templates/new/console/source/name/__init__.py index b892426a..3fbf8c29 100644 --- a/src/cpl_cli/_templates/new/console/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/console/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.console.source.name' +__title__ = 'cpl_cli._templates.new.console.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/__init__.py b/src/cpl_cli/_templates/new/library/__init__.py index d585cb0b..24146cb0 100644 --- a/src/cpl_cli/_templates/new/library/__init__.py +++ b/src/cpl_cli/_templates/new/library/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library' +__title__ = 'cpl_cli._templates.new.library' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/__init__.py b/src/cpl_cli/_templates/new/library/source/__init__.py index 7c8b2755..6f010ead 100644 --- a/src/cpl_cli/_templates/new/library/source/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source' +__title__ = 'cpl_cli._templates.new.library.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/library/source/name/__init__.py b/src/cpl_cli/_templates/new/library/source/name/__init__.py index bf9076ae..30965706 100644 --- a/src/cpl_cli/_templates/new/library/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/library/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.library.source.name' +__title__ = 'cpl_cli._templates.new.library.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/__init__.py b/src/cpl_cli/_templates/new/unittest/__init__.py index 58469b8b..bfb4c039 100644 --- a/src/cpl_cli/_templates/new/unittest/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest' +__title__ = 'cpl_cli._templates.new.unittest' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/__init__.py b/src/cpl_cli/_templates/new/unittest/source/__init__.py index 51f76f0e..324cfbf6 100644 --- a/src/cpl_cli/_templates/new/unittest/source/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source' +__title__ = 'cpl_cli._templates.new.unittest.source' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py index 7bf46294..ed6c3518 100644 --- a/src/cpl_cli/_templates/new/unittest/source/name/__init__.py +++ b/src/cpl_cli/_templates/new/unittest/source/name/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.new.unittest.source.name' +__title__ = 'cpl_cli._templates.new.unittest.source.name' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/_templates/publish/__init__.py b/src/cpl_cli/_templates/publish/__init__.py index 5258b787..0b0c9ee4 100644 --- a/src/cpl_cli/_templates/publish/__init__.py +++ b/src/cpl_cli/_templates/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = '_templates.publish' +__title__ = 'cpl_cli._templates.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/command/__init__.py b/src/cpl_cli/command/__init__.py index f54559ac..350b8f8d 100644 --- a/src/cpl_cli/command/__init__.py +++ b/src/cpl_cli/command/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'command' +__title__ = 'cpl_cli.command' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/configuration/__init__.py b/src/cpl_cli/configuration/__init__.py index 104a3809..d175531d 100644 --- a/src/cpl_cli/configuration/__init__.py +++ b/src/cpl_cli/configuration/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'configuration' +__title__ = 'cpl_cli.configuration' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/live_server/__init__.py b/src/cpl_cli/live_server/__init__.py index d7af8e7c..8f6d1272 100644 --- a/src/cpl_cli/live_server/__init__.py +++ b/src/cpl_cli/live_server/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'live_server' +__title__ = 'cpl_cli.live_server' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/__init__.py b/src/cpl_cli/migrations/__init__.py index d9aa0412..63cd6250 100644 --- a/src/cpl_cli/migrations/__init__.py +++ b/src/cpl_cli/migrations/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations' +__title__ = 'cpl_cli.migrations' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/base/__init__.py b/src/cpl_cli/migrations/base/__init__.py index 19179a2c..c69bac92 100644 --- a/src/cpl_cli/migrations/base/__init__.py +++ b/src/cpl_cli/migrations/base/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.base' +__title__ = 'cpl_cli.migrations.base' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/migrations/service/__init__.py b/src/cpl_cli/migrations/service/__init__.py index 9cb4d5ff..92ffaa26 100644 --- a/src/cpl_cli/migrations/service/__init__.py +++ b/src/cpl_cli/migrations/service/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'migrations.service' +__title__ = 'cpl_cli.migrations.service' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/__init__.py b/src/cpl_cli/publish/__init__.py index 736a41fb..4cc2e9aa 100644 --- a/src/cpl_cli/publish/__init__.py +++ b/src/cpl_cli/publish/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'publish' +__title__ = 'cpl_cli.publish' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/publish/publisher_service.py b/src/cpl_cli/publish/publisher_service.py index e7d59ad9..b1639023 100644 --- a/src/cpl_cli/publish/publisher_service.py +++ b/src/cpl_cli/publish/publisher_service.py @@ -433,7 +433,7 @@ class PublisherService(PublisherABC): 3. Copies all included source files to dist_path/build :return: """ - self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'build')) @@ -456,7 +456,7 @@ class PublisherService(PublisherABC): 4. Remove all included source from dist_path/publish :return: """ - self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) + self._env.set_working_directory(os.path.join(self._env.working_directory, '../')) # probably causing some errors (#125) self.exclude(f'*/{self._project_settings.name}.json') self._output_path = os.path.abspath(os.path.join(self._output_path, self._project_settings.name, 'publish')) diff --git a/src/cpl_cli/source_creator/__init__.py b/src/cpl_cli/source_creator/__init__.py index fd32c0c0..af5e211e 100644 --- a/src/cpl_cli/source_creator/__init__.py +++ b/src/cpl_cli/source_creator/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'source_creator' +__title__ = 'cpl_cli.source_creator' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/src/cpl_cli/validators/__init__.py b/src/cpl_cli/validators/__init__.py index 13642c80..b3cf1671 100644 --- a/src/cpl_cli/validators/__init__.py +++ b/src/cpl_cli/validators/__init__.py @@ -11,7 +11,7 @@ sh-edraft Common Python library Command Line Interface """ -__title__ = 'validators' +__title__ = 'cpl_cli.validators' __author__ = 'Sven Heidemann' __license__ = 'MIT' __copyright__ = 'Copyright (c) 2020 - 2022 sh-edraft.de' diff --git a/unittests/unittests_cli/build_test_case.py b/unittests/unittests_cli/build_test_case.py index 6594bd08..e35d5cbd 100644 --- a/unittests/unittests_cli/build_test_case.py +++ b/unittests/unittests_cli/build_test_case.py @@ -78,7 +78,7 @@ class BuildTestCase(unittest.TestCase): def test_build(self): CLICommands.build() dist_path = './dist' - full_dist_path = f'{dist_path}/{self._source}/build/' + full_dist_path = f'{dist_path}/{self._source}/build/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(full_dist_path)) self.assertFalse(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) diff --git a/unittests/unittests_cli/publish_test_case.py b/unittests/unittests_cli/publish_test_case.py index b24531c5..7c828ced 100644 --- a/unittests/unittests_cli/publish_test_case.py +++ b/unittests/unittests_cli/publish_test_case.py @@ -79,7 +79,7 @@ class PublishTestCase(unittest.TestCase): CLICommands.publish() dist_path = './dist' setup_path = f'{dist_path}/{self._source}/publish/setup' - full_dist_path = f'{dist_path}/{self._source}/publish/' + full_dist_path = f'{dist_path}/{self._source}/publish/build/lib/{String.convert_to_snake_case(self._source)}' self.assertTrue(os.path.exists(dist_path)) self.assertTrue(os.path.exists(setup_path)) self.assertTrue(os.path.exists(os.path.join(setup_path, f'{self._source}-0.0.0.tar.gz'))) @@ -89,4 +89,4 @@ class PublishTestCase(unittest.TestCase): with open(f'{full_dist_path}/{self._source}.json', 'w') as file: file.write(json.dumps(self._get_project_settings(), indent=2)) file.close() - # self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path)) + self.assertTrue(self._are_dir_trees_equal(f'./src/{String.convert_to_snake_case(self._source)}', full_dist_path))