cmem-cmemc 24.3.2__tar.gz → 24.3.3__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 (53) hide show
  1. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/PKG-INFO +1 -1
  2. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/migration.py +2 -0
  3. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/abc.py +1 -0
  4. cmem_cmemc-24.3.3/cmem_cmemc/migrations/sparql_query_texts_242.py +53 -0
  5. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/pyproject.toml +1 -1
  6. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/LICENSE +0 -0
  7. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/README-public.md +0 -0
  8. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/__init__.py +0 -0
  9. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/_cmemc.zsh +0 -0
  10. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/command.py +0 -0
  11. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/command_group.py +0 -0
  12. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/__init__.py +0 -0
  13. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/acl.py +0 -0
  14. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/admin.py +0 -0
  15. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/client.py +0 -0
  16. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/config.py +0 -0
  17. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/dataset.py +0 -0
  18. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/graph.py +0 -0
  19. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/metrics.py +0 -0
  20. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/project.py +0 -0
  21. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/python.py +0 -0
  22. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/query.py +0 -0
  23. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/resource.py +0 -0
  24. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/scheduler.py +0 -0
  25. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/store.py +0 -0
  26. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/user.py +0 -0
  27. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/validation.py +0 -0
  28. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/variable.py +0 -0
  29. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/vocabulary.py +0 -0
  30. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/workflow.py +0 -0
  31. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/workspace.py +0 -0
  32. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/completion.py +0 -0
  33. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/constants.py +0 -0
  34. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/context.py +0 -0
  35. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/exceptions.py +0 -0
  36. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/__init__.py +0 -0
  37. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/graph.py +0 -0
  38. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/multi_page.py +0 -0
  39. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/single_page.py +0 -0
  40. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/__init__.py +0 -0
  41. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/access_conditions_243.py +0 -0
  42. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/bootstrap_data.py +0 -0
  43. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/shapes_widget_integrations_243.py +0 -0
  44. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/workspace_configurations.py +0 -0
  45. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/object_list.py +0 -0
  46. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/parameter_types/__init__.py +0 -0
  47. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/parameter_types/path.py +0 -0
  48. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/__init__.py +0 -0
  49. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/clients/__init__.py +0 -0
  50. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/clients/http.py +0 -0
  51. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/string_processor.py +0 -0
  52. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/title_helper.py +0 -0
  53. {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: cmem-cmemc
3
- Version: 24.3.2
3
+ Version: 24.3.3
4
4
  Summary: Command line client for eccenca Corporate Memory
5
5
  License: Apache-2.0
6
6
  Author: eccenca
@@ -21,6 +21,7 @@ from cmem_cmemc.migrations.shapes_widget_integrations_243 import (
21
21
  TableReportPropertyShapesToWidgetIntegrations,
22
22
  WorkflowTriggerPropertyShapesToWidgetIntegrations,
23
23
  )
24
+ from cmem_cmemc.migrations.sparql_query_texts_242 import SparqlDatatypesToXsdString
24
25
  from cmem_cmemc.migrations.workspace_configurations import MigrateWorkspaceConfiguration
25
26
  from cmem_cmemc.object_list import (
26
27
  DirectListPropertyFilter,
@@ -56,6 +57,7 @@ def get_migrations(ctx: click.Context) -> list[dict]: # noqa: ARG001
56
57
  ChartsOnPropertyShapesToWidgetIntegrations(),
57
58
  WorkflowTriggerPropertyShapesToWidgetIntegrations(),
58
59
  TableReportPropertyShapesToWidgetIntegrations(),
60
+ SparqlDatatypesToXsdString(),
59
61
  ]
60
62
  ]
61
63
  data.sort(key=lambda x: x["first_version"])
@@ -26,6 +26,7 @@ class MigrationRecipe(ABC):
26
26
  "sh": "http://www.w3.org/ns/shacl#",
27
27
  "auth": "https://vocab.eccenca.com/auth/",
28
28
  "shui": "https://vocab.eccenca.com/shui/",
29
+ "xsd": "http://www.w3.org/2001/XMLSchema#",
29
30
  }
30
31
 
31
32
  @abstractmethod
@@ -0,0 +1,53 @@
1
+ """Migration: Chart and Workflow Property Shapes to Widget Integration"""
2
+
3
+ from typing import ClassVar
4
+
5
+ from cmem_cmemc.migrations.abc import MigrationRecipe, components
6
+
7
+
8
+ class SparqlDatatypesToXsdString(MigrationRecipe):
9
+ """24.2 Migrate shui:sparqlQuery|sparqlUpdate datatype literals to xsd:string literals"""
10
+
11
+ id = "sparql-query-datatypes-24.2"
12
+ description = "Migrate shui SPARQL datatype literals to xsd:string literals"
13
+ component: components = "explore"
14
+ first_version = "24.2"
15
+ tags: ClassVar[list[str]] = ["shapes", "user"]
16
+ check_query = """{{DEFAULT_PREFIXES}}
17
+ SELECT DISTINCT ?query
18
+ WHERE {
19
+ GRAPH ?shapeOrQueryGraph {
20
+ ?query shui:queryText ?text .
21
+ FILTER ( datatype(?text) IN (shui:sparqlQuery, shui:sparqlUpdate) )
22
+ }
23
+ }
24
+ """
25
+ move_query = """{{DEFAULT_PREFIXES}}
26
+ DELETE {
27
+ GRAPH ?shapeOrQueryGraph {
28
+ ?query shui:queryText ?oldLiteral .
29
+ }
30
+ }
31
+ INSERT {
32
+ GRAPH ?shapeOrQueryGraph {
33
+ ?query shui:queryText ?newLiteral .
34
+ }
35
+ }
36
+ # SELECT DISTINCT ?query
37
+ WHERE {
38
+ GRAPH ?shapeOrQueryGraph {
39
+ ?query shui:queryText ?oldLiteral .
40
+ FILTER ( datatype(?oldLiteral) IN (shui:sparqlQuery, shui:sparqlUpdate) )
41
+ BIND (STRDT(STR(?oldLiteral), xsd:string) AS ?newLiteral)
42
+ }
43
+ }
44
+ """
45
+
46
+ def is_applicable(self) -> bool:
47
+ """Test if the recipe can be applied."""
48
+ queries_with_old_literals = self._select(self.check_query)
49
+ return len(queries_with_old_literals) > 0
50
+
51
+ def apply(self) -> None:
52
+ """Apply the recipe to the current version."""
53
+ self._update(self.move_query)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "cmem-cmemc"
3
- version = "24.3.2"
3
+ version = "24.3.3"
4
4
  description = "Command line client for eccenca Corporate Memory"
5
5
  license = "Apache-2.0"
6
6
  classifiers = [
File without changes