cmem-plugin-validation 1.3.2__tar.gz → 1.3.3rc1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cmem-plugin-validation
3
- Version: 1.3.2
3
+ Version: 1.3.3rc1
4
4
  Summary: Validate graph and data structures.
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -14,6 +14,7 @@ Classifier: License :: OSI Approved :: Apache Software License
14
14
  Classifier: Programming Language :: Python :: 3
15
15
  Classifier: Programming Language :: Python :: 3.13
16
16
  Classifier: Programming Language :: Python :: 3.14
17
+ Classifier: Programming Language :: Python :: 3.15
17
18
  Requires-Dist: cmem-client (>=1.0.0,<2.0.0)
18
19
  Requires-Dist: cmem-plugin-base (>=4.20.0,<5.0.0)
19
20
  Requires-Dist: httpx (>=0.27.0,<0.28.0)
@@ -232,10 +232,12 @@ class ValidateGraph(WorkflowPlugin):
232
232
  summary: list[tuple[str, str]] = [
233
233
  (data_key, str(state.data[data_key])) for data_key in state.data
234
234
  ]
235
- validation_message = (
236
- f"Found {state.violations} Violations "
237
- f"in {state.with_violations} / {state.total} Resources."
238
- )
235
+ validation_message = None
236
+ if state.with_violations:
237
+ validation_message = (
238
+ f"Found {state.violations} Violations "
239
+ f"in {state.with_violations} / {state.total} Resources."
240
+ )
239
241
  context.report.update(
240
242
  ExecutionReport(
241
243
  entity_count=state.with_violations,
@@ -243,7 +245,9 @@ class ValidateGraph(WorkflowPlugin):
243
245
  operation_desc=f"/ {state.total} Resources have violations",
244
246
  summary=summary,
245
247
  error=validation_message if self.fail_on_violations else None,
246
- warnings=[validation_message] if not self.fail_on_violations else [],
248
+ warnings=[validation_message]
249
+ if validation_message and not self.fail_on_violations
250
+ else [],
247
251
  )
248
252
  )
249
253
  if not self.output_results:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cmem-plugin-validation"
3
- version = "1.3.2"
3
+ version = "1.3.3rc1"
4
4
  license = "Apache-2.0"
5
5
  description = "Validate graph and data structures."
6
6
  authors = ["eccenca GmbH <cmempy-developer@eccenca.com>"]
@@ -103,10 +103,12 @@ ignore = [
103
103
  "ISC001", # single-line-implicit-string-concatenation
104
104
  "PD", # opinionated linting for pandas code
105
105
  "TRY003", # Avoid specifying long messages outside the exception class
106
+ "TRY400", # PluginLogger has no exception(), so error() is the only option
106
107
  ]
107
108
 
108
109
  [tool.ruff.lint.per-file-ignores]
109
110
  "tests/**/*.py" = [
110
111
  "S101", # asserts allowed in tests
111
112
  "ARG", # unused function args (pytest fixtures)
113
+ "PLR2004", # in an assertion the expected value is the literal
112
114
  ]