Skip to content

Commit

Permalink
Merge branch master into feat/omegaconf-inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
MatteoVoges committed Feb 7, 2024
2 parents 49f2147 + 8fe5998 commit f7ed0a4
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 104 deletions.
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

2 changes: 1 addition & 1 deletion kapitan/inventory/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__)

Expand Down
1 change: 0 additions & 1 deletion kapitan/reclass
Submodule reclass deleted from d220e8
77 changes: 54 additions & 23 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ license = "Apache-2.0"
version = "0.33.0"
packages = [
{ include = "kapitan" },
{ include = "kapitan/reclass" },
]

[tool.poetry.scripts]
Expand Down Expand Up @@ -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"]
Expand All @@ -76,7 +76,6 @@ target-version = ['py310']
exclude = '''
(
/(
.*reclass.*
| .*version.py
)
)
Expand Down
73 changes: 0 additions & 73 deletions tests/test_dependency_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down

0 comments on commit f7ed0a4

Please sign in to comment.