validio-cli 0.16.0rc2__tar.gz → 0.17.0__tar.gz

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.
Files changed (26) hide show
  1. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/PKG-INFO +2 -3
  2. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/pyproject.toml +3 -2
  3. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/code.py +13 -4
  4. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/dbt.py +15 -19
  5. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/incidents.py +3 -3
  6. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/recommendations.py +2 -2
  7. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/LICENSE +0 -0
  8. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/README_PUBLIC.md +0 -0
  9. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/__init__.py +0 -0
  10. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/channels.py +0 -0
  11. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/config.py +0 -0
  12. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/credentials.py +0 -0
  13. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/metrics.py +0 -0
  14. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/notification_rules.py +0 -0
  15. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/resources.py +0 -0
  16. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/segmentations.py +0 -0
  17. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/segments.py +0 -0
  18. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/sources.py +0 -0
  19. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/users.py +0 -0
  20. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/validators.py +0 -0
  21. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/entities/windows.py +0 -0
  22. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/bin/main.py +0 -0
  23. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/components.py +0 -0
  24. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/metadata.py +0 -0
  25. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/namespace.py +0 -0
  26. {validio_cli-0.16.0rc2 → validio_cli-0.17.0}/validio_cli/schema.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: validio-cli
3
- Version: 0.16.0rc2
3
+ Version: 0.17.0
4
4
  Summary: CLI tool to interact with the Validio platform
5
5
  Home-page: https://validio.io/
6
6
  License: Apache-2.0
@@ -11,7 +11,6 @@ Classifier: License :: OSI Approved :: Apache Software License
11
11
  Classifier: Programming Language :: Python :: 3
12
12
  Classifier: Programming Language :: Python :: 3.10
13
13
  Classifier: Programming Language :: Python :: 3.11
14
- Classifier: Programming Language :: Python :: 3.12
15
14
  Requires-Dist: camel-converter (>=3.0.0,<4.0.0)
16
15
  Requires-Dist: classdiff (==0.4.0)
17
16
  Requires-Dist: prompt-toolkit (>=3.0.38,<4.0.0)
@@ -19,7 +18,7 @@ Requires-Dist: pydantic (==2.4.2)
19
18
  Requires-Dist: tabulate (>=0.9.0,<0.10.0)
20
19
  Requires-Dist: typer[all] (>=0.7.0,<0.8.0)
21
20
  Requires-Dist: types-tabulate (>=0.9.0.2,<0.10.0.0)
22
- Requires-Dist: validio-sdk (==0.16.0-rc.2)
21
+ Requires-Dist: validio-sdk
23
22
  Project-URL: Documentation, https://docs.validio.io/
24
23
  Description-Content-Type: text/markdown
25
24
 
@@ -3,7 +3,7 @@ name = "validio-cli"
3
3
  # This version does not represent the released version or any tag. For each
4
4
  # release we automatically bump this before building and publishing so this
5
5
  # should be kept at 0.0.1dev1
6
- version = "0.16.0-rc.2"
6
+ version = "0.17.0"
7
7
  description = "CLI tool to interact with the Validio platform"
8
8
  authors = ["Validio <support@validio.io>"]
9
9
  license = "Apache-2.0"
@@ -16,7 +16,7 @@ readme = "README_PUBLIC.md"
16
16
  python = "^3.10"
17
17
  camel-converter = "^3.0.0"
18
18
  classdiff = "0.4.0"
19
- validio-sdk = "0.16.0-rc.2"
19
+ validio-sdk = "*"
20
20
  typer = { extras = ["all"], version = "^0.7.0" }
21
21
  prompt-toolkit = "^3.0.38"
22
22
  tabulate = "^0.9.0"
@@ -29,6 +29,7 @@ mypy = "^1.2.0"
29
29
  validio-sdk = { path = "../validio-sdk", develop = true }
30
30
  licensecheck = "^2023.1.1"
31
31
  pytest = "^7.4.3"
32
+ flameprof = "^0.4"
32
33
 
33
34
  [build-system]
34
35
  requires = ["poetry-core"]
@@ -426,16 +426,25 @@ def _show_update_resource_diff(
426
426
  diff_output: DiffOutput,
427
427
  ) -> None:
428
428
  for r in resources.values():
429
- class_key = r.manifest.resource.__class__.__name__
429
+ class_key = r.manifest.__class__.__name__
430
430
 
431
- print(f"{class_key} '{r.manifest.resource.name}' will be updated")
431
+ print(f"{class_key} '{r.manifest.name}' will be updated")
432
432
 
433
433
  rewrites = _diff_field_rewrites(show_schema)
434
+
434
435
  a_value = code_plan._create_resource_diff_object(
435
- r.manifest.resource, show_secrets=show_secrets, rewrites=rewrites
436
+ r.manifest,
437
+ show_secrets=show_secrets,
438
+ rewrites=rewrites,
439
+ secrets_changed=r.secrets_changed,
440
+ is_manifest=True,
436
441
  )
437
442
  b_value = code_plan._create_resource_diff_object(
438
- r.server.resource, show_secrets=show_secrets, rewrites=rewrites
443
+ r.server,
444
+ show_secrets=show_secrets,
445
+ rewrites=rewrites,
446
+ secrets_changed=r.secrets_changed,
447
+ is_manifest=False,
439
448
  )
440
449
 
441
450
  _show_diff(b_value, a_value, color, diff_output, class_key)
@@ -1,11 +1,9 @@
1
- import json
2
1
  import typing
3
2
  from pathlib import Path
4
3
  from typing import Any, Optional, Tuple
5
4
 
6
5
  import typer
7
6
  from validio_sdk import ValidioError, dbt, util
8
- from validio_sdk.graphql_client.input_types import DbtArtifactUploadInput
9
7
 
10
8
  from validio_cli import AsyncTyper, ConfigDir, Namespace, get_client_and_config
11
9
  from validio_cli.bin.entities import credentials
@@ -97,25 +95,23 @@ async def upload(
97
95
 
98
96
  manifest, run_results = _resolve_file_paths(manifest, run_results, target_path)
99
97
 
98
+ run_results_content = None
100
99
  try:
101
- manifest_content = util.read_json_file(manifest)
102
- trimmed_manifest = dbt.trim_manifest_json(
103
- typing.cast(dict[str, Any], manifest_content)
104
- )
100
+ manifest_content = typing.cast(dict[str, Any], util.read_json_file(manifest))
101
+ if run_results is not None:
102
+ run_results_content = typing.cast(
103
+ dict[str, Any],
104
+ util.read_json_file(run_results),
105
+ )
105
106
  except Exception as e:
106
- raise ValidioError(f"Failed to process manifest file: {e}")
107
-
108
- run_results_content = None
109
- if run_results is not None:
110
- run_results_content = json.dumps(util.read_json_file(run_results))
111
-
112
- await vc.dbt_artifact_upload(
113
- input=DbtArtifactUploadInput(
114
- credential_id=resolved_credential_id,
115
- manifest=json.dumps(trimmed_manifest),
116
- run_results=run_results_content,
117
- job_name=job_name,
118
- )
107
+ raise ValidioError(f"Failed to process artifacts file: {e}")
108
+
109
+ await dbt.upload_artifacts(
110
+ client=vc,
111
+ credential_id=resolved_credential_id,
112
+ job_name=job_name,
113
+ manifest=manifest_content,
114
+ run_results=run_results_content,
119
115
  )
120
116
  return print("dbt artifact uploaded successfully")
121
117
 
@@ -3,8 +3,8 @@ from typing import Any
3
3
 
4
4
  import typer
5
5
  from validio_sdk import ValidioError
6
- from validio_sdk.graphql_client import (
7
- GetSourceIncidentsSource,
6
+ from validio_sdk.graphql_client.get_source_incidents import GetSourceIncidentsSource
7
+ from validio_sdk.graphql_client.get_validator_incidents import (
8
8
  GetValidatorIncidentsValidator,
9
9
  )
10
10
  from validio_sdk.graphql_client.input_types import TimeRangeInput
@@ -76,7 +76,7 @@ async def get(
76
76
 
77
77
  # TODO(UI-2006): These should all support namespace
78
78
 
79
- incidents: (None | GetValidatorIncidentsValidator | GetSourceIncidentsSource) = None
79
+ incidents: None | GetValidatorIncidentsValidator | GetSourceIncidentsSource = None
80
80
 
81
81
  if validator:
82
82
  incidents = await vc.get_validator_incidents(
@@ -1,7 +1,7 @@
1
1
  from dataclasses import dataclass
2
2
 
3
3
  import typer
4
- from validio_sdk.graphql_client import input_types
4
+ from validio_sdk.graphql_client.input_types import ValidatorRecommendationApplyInput
5
5
 
6
6
  from validio_cli import (
7
7
  AsyncTyper,
@@ -87,7 +87,7 @@ async def apply(
87
87
 
88
88
  # TODO: Add support for namespace.
89
89
  api_result = await vc.apply_validator_recommendation(
90
- input=input_types.ValidatorRecommendationApplyInput(ids=ids)
90
+ input=ValidatorRecommendationApplyInput(ids=ids)
91
91
  )
92
92
 
93
93
  result = []
File without changes