cmem-cmemc 24.1.2__tar.gz → 24.1.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.
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/PKG-INFO +1 -1
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/admin.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/validation.py +5 -5
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/vocabulary.py +2 -2
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/workflow.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/context.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/pyproject.toml +3 -2
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/LICENSE +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/README-public.md +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/__init__.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/_cmemc.zsh +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/__init__.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/acl.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/client.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/config.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/dataset.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/graph.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/metrics.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/project.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/python.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/query.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/resource.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/scheduler.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/store.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/user.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/variable.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/commands/workspace.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/completion.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/constants.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/exceptions.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/manual_helper/__init__.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/manual_helper/graph.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/manual_helper/multi_page.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/manual_helper/single_page.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/object_list.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3rc1}/cmem_cmemc/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""admin commands for cmem command line interface."""
|
|
2
2
|
|
|
3
|
-
from datetime import
|
|
3
|
+
from datetime import datetime, timezone
|
|
4
4
|
|
|
5
5
|
import click
|
|
6
6
|
import jwt
|
|
@@ -42,9 +42,9 @@ def _check_graphdb_license(app: ApplicationContext, data: dict, months: int, exi
|
|
|
42
42
|
# DP < 24.1 has no graph license information here
|
|
43
43
|
return
|
|
44
44
|
expiration_date_str = data["dp"]["info"]["store"]["licenseExpiration"]
|
|
45
|
-
expiration_date = datetime.strptime(expiration_date_str, "%Y-%m-%d").astimezone(tz=
|
|
45
|
+
expiration_date = datetime.strptime(expiration_date_str, "%Y-%m-%d").astimezone(tz=timezone.utc)
|
|
46
46
|
grace_starts = expiration_date - relativedelta(months=months)
|
|
47
|
-
if grace_starts < datetime.now(tz=
|
|
47
|
+
if grace_starts < datetime.now(tz=timezone.utc):
|
|
48
48
|
graphdb_license_end = data["dp"]["info"]["store"]["licenseExpiration"]
|
|
49
49
|
output = f"Your GraphDB license expires on {graphdb_license_end}."
|
|
50
50
|
if exit_1 == "always":
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""graph validation command group"""
|
|
2
2
|
|
|
3
3
|
import time
|
|
4
|
-
from datetime import
|
|
4
|
+
from datetime import datetime, timezone
|
|
5
5
|
|
|
6
6
|
import click
|
|
7
7
|
import requests
|
|
@@ -145,8 +145,8 @@ def _get_batch_validation_option(validation_: dict) -> tuple[str, str]:
|
|
|
145
145
|
id_ = validation_["id"]
|
|
146
146
|
state = validation_["state"]
|
|
147
147
|
graph = validation_["contextGraphIri"]
|
|
148
|
-
stamp = datetime.fromtimestamp(validation_["executionStarted"] / 1000, tz=
|
|
149
|
-
time_ago = timeago.format(stamp, datetime.now(tz=
|
|
148
|
+
stamp = datetime.fromtimestamp(validation_["executionStarted"] / 1000, tz=timezone.utc)
|
|
149
|
+
time_ago = timeago.format(stamp, datetime.now(tz=timezone.utc))
|
|
150
150
|
resources = _get_resource_count(validation_)
|
|
151
151
|
violations = _get_violation_count(validation_)
|
|
152
152
|
return (
|
|
@@ -409,8 +409,8 @@ def list_command(ctx: Context, filter_: tuple[tuple[str, str]], id_only: bool, r
|
|
|
409
409
|
table = []
|
|
410
410
|
for _ in validations:
|
|
411
411
|
if "executionStarted" in _ and _["executionStarted"] is not None:
|
|
412
|
-
stamp = datetime.fromtimestamp(_["executionStarted"] / 1000, tz=
|
|
413
|
-
time_ago = timeago.format(stamp, datetime.now(tz=
|
|
412
|
+
stamp = datetime.fromtimestamp(_["executionStarted"] / 1000, tz=timezone.utc)
|
|
413
|
+
time_ago = timeago.format(stamp, datetime.now(tz=timezone.utc))
|
|
414
414
|
else:
|
|
415
415
|
time_ago = f"{_['state']}"
|
|
416
416
|
row = [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"""vocabularies commands for cmem command line interface."""
|
|
2
2
|
|
|
3
3
|
import io
|
|
4
|
-
from datetime import
|
|
4
|
+
from datetime import datetime, timezone
|
|
5
5
|
from re import match
|
|
6
6
|
from urllib.parse import urlparse
|
|
7
7
|
|
|
@@ -141,7 +141,7 @@ def _insert_catalog_entry(iri: str, prefix: str, namespace: str, label: str, lan
|
|
|
141
141
|
iri=iri,
|
|
142
142
|
prefix=prefix,
|
|
143
143
|
namespace=namespace,
|
|
144
|
-
date=datetime.now(tz=
|
|
144
|
+
date=datetime.now(tz=timezone.utc).date(),
|
|
145
145
|
label=label,
|
|
146
146
|
language=language,
|
|
147
147
|
description="vocabulary imported with cmemc",
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import re
|
|
4
4
|
import sys
|
|
5
5
|
import time
|
|
6
|
-
from datetime import
|
|
6
|
+
from datetime import datetime, timezone
|
|
7
7
|
from pathlib import Path
|
|
8
8
|
|
|
9
9
|
import click
|
|
@@ -320,8 +320,8 @@ def _workflow_echo_status(app: ApplicationContext, status: dict) -> None:
|
|
|
320
320
|
canceled only exists sometimes
|
|
321
321
|
"""
|
|
322
322
|
# prepare human friendly relative time
|
|
323
|
-
now = datetime.now(tz=
|
|
324
|
-
stamp = datetime.fromtimestamp(status["lastUpdateTime"] / 1000, tz=
|
|
323
|
+
now = datetime.now(tz=timezone.utc)
|
|
324
|
+
stamp = datetime.fromtimestamp(status["lastUpdateTime"] / 1000, tz=timezone.utc)
|
|
325
325
|
time_ago = timeago.format(stamp, now, "en")
|
|
326
326
|
status_name = status["statusName"]
|
|
327
327
|
status_message = status["message"]
|
|
@@ -6,7 +6,7 @@ import json
|
|
|
6
6
|
import os
|
|
7
7
|
import re
|
|
8
8
|
import subprocess # nosec
|
|
9
|
-
from datetime import
|
|
9
|
+
from datetime import datetime, timezone
|
|
10
10
|
from os import environ as env
|
|
11
11
|
from os import getenv
|
|
12
12
|
from pathlib import Path
|
|
@@ -94,7 +94,7 @@ class ApplicationContext:
|
|
|
94
94
|
def get_template_data(self) -> dict[str, str]:
|
|
95
95
|
"""Get the template data dict with vars from the context."""
|
|
96
96
|
data: dict[str, str] = {}
|
|
97
|
-
today = str(datetime.now(tz=
|
|
97
|
+
today = str(datetime.now(tz=timezone.utc).date())
|
|
98
98
|
data.update(date=today)
|
|
99
99
|
if self.connection is not None:
|
|
100
100
|
data.update(connection=self.connection.name)
|
|
@@ -268,7 +268,7 @@ class ApplicationContext:
|
|
|
268
268
|
"""Output a debug message if --debug is enabled."""
|
|
269
269
|
# pylint: disable=invalid-name
|
|
270
270
|
if self.debug:
|
|
271
|
-
now = datetime.now(tz=
|
|
271
|
+
now = datetime.now(tz=timezone.utc)
|
|
272
272
|
click.secho(f"[{now!s}] {message}", err=True, dim=True)
|
|
273
273
|
|
|
274
274
|
def echo_info(self, message: str | list[str] | set[str], nl: bool = True, fg: str = "") -> None:
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cmem-cmemc"
|
|
3
|
-
version = "24.1.
|
|
3
|
+
version = "24.1.3rc1"
|
|
4
4
|
description = "Command line client for eccenca Corporate Memory"
|
|
5
5
|
license = "Apache 2.0"
|
|
6
|
-
classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.
|
|
6
|
+
classifiers = ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "Intended Audience :: System Administrators", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3.10", "Topic :: Software Development :: Testing", "Topic :: Database", "Topic :: Utilities"]
|
|
7
7
|
homepage = "https://eccenca.com/go/cmemc"
|
|
8
8
|
authors = ["eccenca <cmempy-developer@eccenca.com>", "Sebastian Tramp <sebastian.tramp@eccenca.com>"]
|
|
9
9
|
readme = "README-public.md"
|
|
@@ -92,5 +92,6 @@ ignore = [
|
|
|
92
92
|
"PD", # opinionated linting for pandas code
|
|
93
93
|
"S101", # use of assert detected
|
|
94
94
|
"TRY003", # Avoid specifying long messages outside the exception class
|
|
95
|
+
"UP017", # We need compatibility 3.10 at the moment
|
|
95
96
|
]
|
|
96
97
|
|
|
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
|