diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 9d80332aa..000000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "kapitan/reclass"] - path = kapitan/reclass - url = https://github.com/kapicorp/reclass.git diff --git a/kapitan/inventory/inventory.py b/kapitan/inventory/inventory.py index 64d58411d..7cab807d5 100644 --- a/kapitan/inventory/inventory.py +++ b/kapitan/inventory/inventory.py @@ -13,7 +13,7 @@ from typing import overload, Union from kapitan.errors import KapitanError -from kapitan.reclass.reclass.values import item +from reclass.values import item logger = logging.getLogger(__name__) diff --git a/kapitan/reclass b/kapitan/reclass deleted file mode 160000 index d220e896a..000000000 --- a/kapitan/reclass +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d220e896a2465783abf298d71eb927de1f53a0ac diff --git a/poetry.lock b/poetry.lock index 8dc5063fe..c2b2201c8 100644 --- a/poetry.lock +++ b/poetry.lock @@ -411,16 +411,28 @@ ssh = ["bcrypt (>=3.1.5)"] test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] +[[package]] +name = "ddt" +version = "1.7.1" +description = "Data-Driven/Decorated Tests" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "ddt-1.7.1-py2.py3-none-any.whl", hash = "sha256:2c4ac421bbdc10d2403b472294500c6f75ca822386c34d9fe82882d7a2ce9682"}, + {file = "ddt-1.7.1.tar.gz", hash = "sha256:1a4472c477bf766f75f7b1efb628656ff3c35ff3f6c821129ae8e328fff8a9a2"}, +] + [[package]] name = "docker" -version = "6.1.3" +version = "7.0.0" description = "A Python library for the Docker Engine API." category = "main" optional = true -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "docker-6.1.3-py3-none-any.whl", hash = "sha256:aecd2277b8bf8e506e484f6ab7aec39abe0038e29fa4a6d3ba86c3fe01844ed9"}, - {file = "docker-6.1.3.tar.gz", hash = "sha256:aa6d17830045ba5ef0168d5eaa34d37beeb113948c413affe1d5991fc11f9a20"}, + {file = "docker-7.0.0-py3-none-any.whl", hash = "sha256:12ba681f2777a0ad28ffbcc846a69c31b4dfd9752b47eb425a274ee269c5e14b"}, + {file = "docker-7.0.0.tar.gz", hash = "sha256:323736fb92cd9418fc5e7133bc953e11a9da04f4483f828b527db553f1e7e5a3"}, ] [package.dependencies] @@ -428,10 +440,23 @@ packaging = ">=14.0" pywin32 = {version = ">=304", markers = "sys_platform == \"win32\""} requests = ">=2.26.0" urllib3 = ">=1.26.0" -websocket-client = ">=0.32.0" [package.extras] ssh = ["paramiko (>=2.4.3)"] +websockets = ["websocket-client (>=1.3.0)"] + +[[package]] +name = "enum34" +version = "1.1.10" +description = "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4" +category = "main" +optional = false +python-versions = "*" +files = [ + {file = "enum34-1.1.10-py2-none-any.whl", hash = "sha256:a98a201d6de3f2ab3db284e70a33b0f896fbf35f8086594e8c9e74b909058d53"}, + {file = "enum34-1.1.10-py3-none-any.whl", hash = "sha256:c3858660960c984d6ab0ebad691265180da2b43f07e061c0f8dca9ef3cffd328"}, + {file = "enum34-1.1.10.tar.gz", hash = "sha256:cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248"}, +] [[package]] name = "exceptiongroup" @@ -1216,6 +1241,29 @@ files = [ {file = "PyYAML-6.0.1.tar.gz", hash = "sha256:bfdf460b1736c775f2ba9f6a92bca30bc2095067b8a9d77876d1fad6cc3b4a43"}, ] +[[package]] +name = "reclass" +version = "1.6.0" +description = "merge data by recursive descent down an ancestry hierarchy (forked extended version)" +category = "main" +optional = false +python-versions = "*" +files = [] +develop = false + +[package.dependencies] +ddt = "*" +enum34 = "*" +pyparsing = "*" +pyyaml = "*" +six = "*" + +[package.source] +type = "git" +url = "https://github.com/kapicorp/reclass" +reference = "HEAD" +resolved_reference = "856b34cb77811d665c6346883238d436ac5c4924" + [[package]] name = "referencing" version = "0.32.1" @@ -1608,23 +1656,6 @@ secure = ["certifi", "cryptography (>=1.9)", "idna (>=2.0.0)", "pyopenssl (>=17. socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] -[[package]] -name = "websocket-client" -version = "1.7.0" -description = "WebSocket client for Python with low level API options" -category = "main" -optional = true -python-versions = ">=3.8" -files = [ - {file = "websocket-client-1.7.0.tar.gz", hash = "sha256:10e511ea3a8c744631d3bd77e61eb17ed09304c413ad42cf6ddfa4c7787e8fe6"}, - {file = "websocket_client-1.7.0-py3-none-any.whl", hash = "sha256:f4c3d22fec12a2461427a29957ff07d35098ee2d976d3ba244e688b8b4057588"}, -] - -[package.extras] -docs = ["Sphinx (>=6.0)", "sphinx-rtd-theme (>=1.1.0)"] -optional = ["python-socks", "wsaccel"] -test = ["websockets"] - [[package]] name = "yamllint" version = "1.33.0" @@ -1651,4 +1682,4 @@ test = ["docker"] [metadata] lock-version = "2.0" python-versions = "^3.10" -content-hash = "717f1fec5bfc1a4d44ddd2c4400e8688f07cd7621e6c1684daa63f37767836c9" +content-hash = "baed74ca59c4b5cc062a8d46d96a7c6c5a2b04e37871ffa8c7fe6d1c3decbfec" diff --git a/pyproject.toml b/pyproject.toml index cf4b819d9..44d7fd7fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,6 @@ license = "Apache-2.0" version = "0.33.0" packages = [ { include = "kapitan" }, - { include = "kapitan/reclass" }, ] [tool.poetry.scripts] @@ -64,7 +63,8 @@ gitdb = "^4.0.10" packaging = "^23.0" typing-extensions = "^4.0.0" gojsonnet = { version = "^0.20.0", optional = true } -docker = { version = ">=5,<7", optional = true } +docker = { version = ">=5,<8", optional = true } +reclass = {git = "https://github.com/kapicorp/reclass"} [tool.poetry.extras] gojsonnet = ["gojsonnet"] @@ -76,7 +76,6 @@ target-version = ['py310'] exclude = ''' ( /( - .*reclass.* | .*version.py ) ) diff --git a/tests/test_dependency_manager.py b/tests/test_dependency_manager.py index afc9d02ae..bcd17237c 100644 --- a/tests/test_dependency_manager.py +++ b/tests/test_dependency_manager.py @@ -79,79 +79,6 @@ def test_clone_repo_subdir(self): rmtree(temp_dir) rmtree(output_dir) - def test_clone_repo_submodules_false(self): - """ - Tests cloning git repo and check that submodule folder is empty - """ - temp_dir = tempfile.mkdtemp() - output_dir = tempfile.mkdtemp() - source = "https://github.com/kapicorp/kapitan.git" - dep = [ - { - "output_path": output_dir, - "ref": "master", - "submodules": False, - } - ] - fetch_git_dependency((source, dep), temp_dir, force=False) - self.assertEqual(os.listdir(os.path.join(output_dir, "kapitan", "reclass")), []) - rmtree(temp_dir) - rmtree(output_dir) - - def test_clone_repo_without_submodules(self): - """ - Tests cloning a git repo without any submodules - """ - temp_dir = tempfile.mkdtemp() - output_dir = tempfile.mkdtemp() - source = "https://github.com/kapicorp/reclass.git" - dep = [ - { - "output_path": output_dir, - "ref": "master", - } - ] - fetch_git_dependency((source, dep), temp_dir, force=False) - self.assertTrue(os.path.isdir(os.path.join(output_dir, "reclass"))) - rmtree(temp_dir) - rmtree(output_dir) - - def test_clone_repo_with_submodules(self): - """ - Tests cloning git repo and initialize its' submodule - """ - temp_dir = tempfile.mkdtemp() - output_dir = tempfile.mkdtemp() - source = "https://github.com/kapicorp/kapitan.git" - dep = [ - { - "output_path": output_dir, - "ref": "master", - } - ] - fetch_git_dependency((source, dep), temp_dir, force=False) - self.assertTrue(os.listdir(os.path.join(output_dir, "kapitan", "reclass"))) - rmtree(temp_dir) - rmtree(output_dir) - - def test_clone_repo_with_submodule_subdir(self): - """ - Tests cloning subdir in a git repo and initialize its' submodule - """ - temp_dir = tempfile.mkdtemp() - output_dir = tempfile.mkdtemp() - source = "https://github.com/kapicorp/kapitan.git" - dep = [ - { - "output_path": output_dir, - "ref": "master", - "subdir": "kapitan", - } - ] - fetch_git_dependency((source, dep), temp_dir, force=False) - self.assertTrue(os.listdir(os.path.join(output_dir, "reclass"))) - rmtree(temp_dir) - rmtree(output_dir) def test_fetch_helm_chart(self): """