dbt-platform-helper 13.2.0__py3-none-any.whl → 13.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dbt-platform-helper might be problematic. Click here for more details.

Files changed (37) hide show
  1. dbt_platform_helper/COMMANDS.md +7 -2
  2. dbt_platform_helper/commands/codebase.py +29 -6
  3. dbt_platform_helper/commands/config.py +12 -314
  4. dbt_platform_helper/commands/copilot.py +10 -6
  5. dbt_platform_helper/commands/database.py +17 -9
  6. dbt_platform_helper/commands/environment.py +2 -3
  7. dbt_platform_helper/domain/codebase.py +68 -25
  8. dbt_platform_helper/domain/config.py +345 -0
  9. dbt_platform_helper/domain/copilot.py +155 -157
  10. dbt_platform_helper/domain/versioning.py +48 -7
  11. dbt_platform_helper/providers/aws/__init__.py +0 -0
  12. dbt_platform_helper/providers/aws/exceptions.py +12 -2
  13. dbt_platform_helper/providers/aws/sso_auth.py +61 -0
  14. dbt_platform_helper/providers/config.py +2 -1
  15. dbt_platform_helper/providers/config_validator.py +15 -13
  16. dbt_platform_helper/providers/ecr.py +64 -7
  17. dbt_platform_helper/providers/io.py +2 -2
  18. dbt_platform_helper/providers/parameter_store.py +47 -0
  19. dbt_platform_helper/providers/platform_config_schema.py +17 -0
  20. dbt_platform_helper/providers/semantic_version.py +15 -88
  21. dbt_platform_helper/providers/terraform_manifest.py +1 -0
  22. dbt_platform_helper/providers/version.py +82 -24
  23. dbt_platform_helper/providers/version_status.py +80 -0
  24. dbt_platform_helper/utils/aws.py +0 -135
  25. dbt_platform_helper/utils/git.py +3 -1
  26. dbt_platform_helper/utils/tool_versioning.py +0 -84
  27. {dbt_platform_helper-13.2.0.dist-info → dbt_platform_helper-13.4.0.dist-info}/METADATA +2 -2
  28. {dbt_platform_helper-13.2.0.dist-info → dbt_platform_helper-13.4.0.dist-info}/RECORD +32 -32
  29. {dbt_platform_helper-13.2.0.dist-info → dbt_platform_helper-13.4.0.dist-info}/WHEEL +1 -1
  30. platform_helper.py +1 -1
  31. dbt_platform_helper/templates/svc/manifest-backend.yml +0 -69
  32. dbt_platform_helper/templates/svc/manifest-public.yml +0 -109
  33. dbt_platform_helper/utils/cloudfoundry.py +0 -14
  34. dbt_platform_helper/utils/files.py +0 -53
  35. dbt_platform_helper/utils/manifests.py +0 -18
  36. {dbt_platform_helper-13.2.0.dist-info → dbt_platform_helper-13.4.0.dist-info}/LICENSE +0 -0
  37. {dbt_platform_helper-13.2.0.dist-info → dbt_platform_helper-13.4.0.dist-info}/entry_points.txt +0 -0
@@ -1,53 +0,0 @@
1
- import click
2
- import yaml
3
- from jinja2 import Environment
4
- from jinja2 import FileSystemLoader
5
-
6
- from dbt_platform_helper.providers.files import FileProvider
7
-
8
-
9
- def to_yaml(value):
10
- return yaml.dump(value, sort_keys=False)
11
-
12
-
13
- # TODO - extract file provider functionality from this - and figure out what it actually does!
14
- # Move to the new file provider - or potentially copilot?
15
- def generate_override_files(base_path, file_path, output_dir):
16
- def generate_files_for_dir(pattern):
17
- for file in file_path.glob(pattern):
18
- if file.is_file():
19
- contents = file.read_text()
20
- file_name = str(file).removeprefix(f"{file_path}/")
21
- click.echo(
22
- FileProvider.mkfile(
23
- base_path,
24
- output_dir / file_name,
25
- contents,
26
- overwrite=True,
27
- )
28
- )
29
-
30
- generate_files_for_dir("*")
31
- generate_files_for_dir("bin/*")
32
-
33
-
34
- def generate_override_files_from_template(base_path, overrides_path, output_dir, template_data={}):
35
- templates = Environment(
36
- loader=FileSystemLoader(f"{overrides_path}"), keep_trailing_newline=True
37
- )
38
- environments = ",".join([env["name"] for env in template_data["environments"]])
39
- data = {"environments": environments}
40
-
41
- def generate_files_for_dir(pattern):
42
-
43
- for file in overrides_path.glob(pattern):
44
- if file.is_file():
45
- file_name = str(file).removeprefix(f"{overrides_path}/")
46
- contents = templates.get_template(str(file_name)).render(data)
47
- message = FileProvider.mkfile(
48
- base_path, output_dir / file_name, contents, overwrite=True
49
- )
50
- click.echo(message)
51
-
52
- generate_files_for_dir("*")
53
- generate_files_for_dir("bin/*")
@@ -1,18 +0,0 @@
1
- import yaml
2
-
3
-
4
- def get_service_name_from_manifest(manifest_path):
5
- with open(manifest_path) as manifest:
6
- document = yaml.safe_load(manifest)
7
- return document["name"]
8
-
9
-
10
- def get_repository_name_from_manifest(manifest_path):
11
- with open(manifest_path) as manifest:
12
- document = yaml.safe_load(manifest)
13
- image = document["image"]["location"]
14
-
15
- repository_with_tag = image.split("/", 1)[1]
16
- repository = repository_with_tag.split(":")[0]
17
-
18
- return repository