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.
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/PKG-INFO +1 -1
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/migration.py +2 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/abc.py +1 -0
- cmem_cmemc-24.3.3/cmem_cmemc/migrations/sparql_query_texts_242.py +53 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/pyproject.toml +1 -1
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/LICENSE +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/README-public.md +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/_cmemc.zsh +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/command.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/command_group.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/acl.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/admin.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/client.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/config.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/dataset.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/graph.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/metrics.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/project.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/python.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/query.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/resource.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/scheduler.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/store.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/user.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/validation.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/variable.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/vocabulary.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/workflow.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/commands/workspace.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/completion.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/constants.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/context.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/exceptions.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/graph.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/multi_page.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/manual_helper/single_page.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/access_conditions_243.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/bootstrap_data.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/shapes_widget_integrations_243.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/workspace_configurations.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/object_list.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/parameter_types/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/parameter_types/path.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/clients/__init__.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/smart_path/clients/http.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/string_processor.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/title_helper.py +0 -0
- {cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/utils.py +0 -0
|
@@ -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"])
|
|
@@ -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)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cmem_cmemc-24.3.2 → cmem_cmemc-24.3.3}/cmem_cmemc/migrations/shapes_widget_integrations_243.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|