cmem-cmemc 24.1.2__tar.gz → 24.1.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.1.3/PKG-INFO +87 -0
- cmem_cmemc-24.1.3/README-public.md +36 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/__init__.py +3 -9
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/admin.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/validation.py +5 -5
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/vocabulary.py +2 -2
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/workflow.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/context.py +3 -3
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/utils.py +18 -2
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/pyproject.toml +21 -2
- cmem_cmemc-24.1.2/PKG-INFO +0 -68
- cmem_cmemc-24.1.2/README-public.md +0 -23
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/LICENSE +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/_cmemc.zsh +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/__init__.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/acl.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/client.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/config.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/dataset.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/graph.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/metrics.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/project.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/python.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/query.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/resource.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/scheduler.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/store.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/user.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/variable.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/commands/workspace.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/completion.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/constants.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/exceptions.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/manual_helper/__init__.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/manual_helper/graph.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/manual_helper/multi_page.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/manual_helper/single_page.py +0 -0
- {cmem_cmemc-24.1.2 → cmem_cmemc-24.1.3}/cmem_cmemc/object_list.py +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: cmem-cmemc
|
|
3
|
+
Version: 24.1.3
|
|
4
|
+
Summary: Command line client for eccenca Corporate Memory
|
|
5
|
+
Home-page: https://eccenca.com/go/cmemc
|
|
6
|
+
License: Apache 2.0
|
|
7
|
+
Author: eccenca
|
|
8
|
+
Author-email: cmempy-developer@eccenca.com
|
|
9
|
+
Requires-Python: >=3.9,<4.0
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Customer Service
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Information Technology
|
|
15
|
+
Classifier: Intended Audience :: Science/Research
|
|
16
|
+
Classifier: Intended Audience :: System Administrators
|
|
17
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
18
|
+
Classifier: License :: Other/Proprietary License
|
|
19
|
+
Classifier: Natural Language :: English
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Programming Language :: Python :: 3
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
24
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
26
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
27
|
+
Classifier: Topic :: Database
|
|
28
|
+
Classifier: Topic :: Software Development :: Testing
|
|
29
|
+
Classifier: Topic :: Utilities
|
|
30
|
+
Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0)
|
|
31
|
+
Requires-Dist: certifi (>=2023.5.7)
|
|
32
|
+
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
33
|
+
Requires-Dist: click-didyoumean (>=0.3.0,<0.4.0)
|
|
34
|
+
Requires-Dist: click-help-colors (>=0.9.1,<0.10.0)
|
|
35
|
+
Requires-Dist: cmem-cmempy (==24.1.1)
|
|
36
|
+
Requires-Dist: configparser (>=5.3.0,<6.0.0)
|
|
37
|
+
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
|
38
|
+
Requires-Dist: natsort (>=8.3.1,<9.0.0)
|
|
39
|
+
Requires-Dist: prometheus-client (>=0.16.0,<0.17.0)
|
|
40
|
+
Requires-Dist: pygments (>=2.15.1,<3.0.0)
|
|
41
|
+
Requires-Dist: pyjwt (>=2.7.0,<3.0.0)
|
|
42
|
+
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
|
43
|
+
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
44
|
+
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
|
45
|
+
Requires-Dist: six (>=1.16.0,<2.0.0)
|
|
46
|
+
Requires-Dist: timeago (>=1.0.16,<2.0.0)
|
|
47
|
+
Requires-Dist: treelib (>=1.6.4,<2.0.0)
|
|
48
|
+
Requires-Dist: urllib3 (>=2,<3)
|
|
49
|
+
Description-Content-Type: text/markdown
|
|
50
|
+
|
|
51
|
+
# cmemc
|
|
52
|
+
|
|
53
|
+
cmemc is the official command line client for [eccenca Corporate Memory](https://documentation.eccenca.com/).
|
|
54
|
+
|
|
55
|
+
[![version][version-shield]][changelog] [![Python Versions][python-shield]][pypi] [![eccenca Corporate Memory][cmem-shield]][cmem]
|
|
56
|
+
|
|
57
|
+
[![teaser][teaser-image]][cmemc-docu]
|
|
58
|
+
|
|
59
|
+
## Installation
|
|
60
|
+
|
|
61
|
+
In order to install the cmemc, run:
|
|
62
|
+
|
|
63
|
+
pipx install cmem-cmemc
|
|
64
|
+
|
|
65
|
+
Of course you can install cmemc also with pip, but we recommend [pipx](https://pypa.github.io/pipx/) for normal desktop usage.
|
|
66
|
+
|
|
67
|
+
## Configuration and Usage
|
|
68
|
+
|
|
69
|
+
cmemc is intended for System Administrators and Linked Data Expert, who wants to automate and remote control activities on eccenca Corporate Memory.
|
|
70
|
+
|
|
71
|
+
The cmemc manual including basic usage pattern, configuration as well as a command reference is available at:
|
|
72
|
+
|
|
73
|
+
[https://eccenca.com/go/cmemc](https://eccenca.com/go/cmemc)
|
|
74
|
+
|
|
75
|
+
cmemc only works with Python 3 and refuses to work with Python 2.x.
|
|
76
|
+
In addition to that, cmemc will warn you in case an untested Python environment is used.
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
[version-shield]: https://badge.fury.io/py/cmem-cmemc.svg
|
|
80
|
+
[changelog]: https://pypi.org/project/cmem-cmemc/#history
|
|
81
|
+
[python-shield]: https://img.shields.io/pypi/pyversions/cmem-cmemc.svg
|
|
82
|
+
[pypi]: https://pypi.org/project/cmem-cmemc/
|
|
83
|
+
[cmem]: https://documentation.eccenca.com
|
|
84
|
+
[cmem-shield]: https://img.shields.io/badge/made%20for-eccenca%20Corporate%20Memory-blue?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgaWQ9IkxheWVyXzEiCiAgIGRhdGEtbmFtZT0iTGF5ZXIgMSIKICAgdmlld0JveD0iMCAwIDgxLjI5MDAwMSA4Mi4yODk4NiIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iODEuMjkwMDAxIgogICBoZWlnaHQ9IjgyLjI4OTg2NCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcwogICAgIGlkPSJkZWZzODI2Ij4KICAgIDxzdHlsZQogICAgICAgaWQ9InN0eWxlODI0Ij4KICAgICAgLmNscy0xIHsKICAgICAgICBmaWxsOiAjZjM5MjAwOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjZjM5MjAwOwogICAgICAgIHN0cm9rZS13aWR0aDogMS41cHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnCiAgICAgaWQ9Imc4NDAiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMwLjc2LC0zMS4xNDAxMzkpIj4KICAgIDxwYXRoCiAgICAgICBjbGFzcz0iY2xzLTEiCiAgICAgICBkPSJNIDU1LjksODUuMTkgQSAyMC4xNCwyMC4xNCAwIDEgMCAzNS43Niw2NS4wNSAyMC4xNCwyMC4xNCAwIDAgMCA1NS45LDg1LjE5IFoiCiAgICAgICBpZD0icGF0aDgyOCIgLz4KICAgIDxwYXRoCiAgICAgICBjbGFzcz0iY2xzLTEiCiAgICAgICBkPSJtIDk4LDU0LjE0IGEgOSw5IDAgMSAwIC04Ljk1LC05IDguOTUsOC45NSAwIDAgMCA4Ljk1LDkgeiIKICAgICAgIGlkPSJwYXRoODMwIiAvPgogICAgPHBhdGgKICAgICAgIGNsYXNzPSJjbHMtMSIKICAgICAgIGQ9Ik0gODguMzUsMTA4LjQzIEEgMTIuMzEsMTIuMzEgMCAxIDAgNzYsOTYuMTIgMTIuMzEsMTIuMzEgMCAwIDAgODguMzEsMTA4LjQzIFoiCiAgICAgICBpZD0icGF0aDgzMiIgLz4KICAgIDxsaW5lCiAgICAgICBjbGFzcz0iY2xzLTIiCiAgICAgICB4MT0iODYuOTcwMDAxIgogICAgICAgeTE9IjkyLjA1OTk5OCIKICAgICAgIHgyPSI1OC43Nzk5OTkiCiAgICAgICB5Mj0iNjcuMzYwMDAxIgogICAgICAgaWQ9ImxpbmU4MzQiIC8+CiAgICA8bGluZQogICAgICAgY2xhc3M9ImNscy0yIgogICAgICAgeDE9Ijk5LjE4IgogICAgICAgeTE9IjQ1Ljg0IgogICAgICAgeDI9IjU1LjQ4IgogICAgICAgeTI9IjY2LjEyMDAwMyIKICAgICAgIGlkPSJsaW5lODM2IiAvPgogICAgPGxpbmUKICAgICAgIGNsYXNzPSJjbHMtMiIKICAgICAgIHgxPSI5Ny45ODk5OTgiCiAgICAgICB5MT0iNDQuNjUwMDAyIgogICAgICAgeDI9Ijg4LjM0OTk5OCIKICAgICAgIHkyPSI5Mi44Mzk5OTYiCiAgICAgICBpZD0ibGluZTgzOCIgLz4KICA8L2c+Cjwvc3ZnPgo=
|
|
85
|
+
[teaser-image]: https://documentation.eccenca.com/24.1/automate/cmemc-command-line-interface/configuration/completion-setup/22.1-cmemc-create-dataset.gif
|
|
86
|
+
[cmemc-docu]: https://eccenca.com/go/cmemc
|
|
87
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# cmemc
|
|
2
|
+
|
|
3
|
+
cmemc is the official command line client for [eccenca Corporate Memory](https://documentation.eccenca.com/).
|
|
4
|
+
|
|
5
|
+
[![version][version-shield]][changelog] [![Python Versions][python-shield]][pypi] [![eccenca Corporate Memory][cmem-shield]][cmem]
|
|
6
|
+
|
|
7
|
+
[![teaser][teaser-image]][cmemc-docu]
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
In order to install the cmemc, run:
|
|
12
|
+
|
|
13
|
+
pipx install cmem-cmemc
|
|
14
|
+
|
|
15
|
+
Of course you can install cmemc also with pip, but we recommend [pipx](https://pypa.github.io/pipx/) for normal desktop usage.
|
|
16
|
+
|
|
17
|
+
## Configuration and Usage
|
|
18
|
+
|
|
19
|
+
cmemc is intended for System Administrators and Linked Data Expert, who wants to automate and remote control activities on eccenca Corporate Memory.
|
|
20
|
+
|
|
21
|
+
The cmemc manual including basic usage pattern, configuration as well as a command reference is available at:
|
|
22
|
+
|
|
23
|
+
[https://eccenca.com/go/cmemc](https://eccenca.com/go/cmemc)
|
|
24
|
+
|
|
25
|
+
cmemc only works with Python 3 and refuses to work with Python 2.x.
|
|
26
|
+
In addition to that, cmemc will warn you in case an untested Python environment is used.
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
[version-shield]: https://badge.fury.io/py/cmem-cmemc.svg
|
|
30
|
+
[changelog]: https://pypi.org/project/cmem-cmemc/#history
|
|
31
|
+
[python-shield]: https://img.shields.io/pypi/pyversions/cmem-cmemc.svg
|
|
32
|
+
[pypi]: https://pypi.org/project/cmem-cmemc/
|
|
33
|
+
[cmem]: https://documentation.eccenca.com
|
|
34
|
+
[cmem-shield]: https://img.shields.io/badge/made%20for-eccenca%20Corporate%20Memory-blue?logo=data:image/svg%2bxml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgaWQ9IkxheWVyXzEiCiAgIGRhdGEtbmFtZT0iTGF5ZXIgMSIKICAgdmlld0JveD0iMCAwIDgxLjI5MDAwMSA4Mi4yODk4NiIKICAgdmVyc2lvbj0iMS4xIgogICB3aWR0aD0iODEuMjkwMDAxIgogICBoZWlnaHQ9IjgyLjI4OTg2NCIKICAgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIgogICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICA8ZGVmcwogICAgIGlkPSJkZWZzODI2Ij4KICAgIDxzdHlsZQogICAgICAgaWQ9InN0eWxlODI0Ij4KICAgICAgLmNscy0xIHsKICAgICAgICBmaWxsOiAjZjM5MjAwOwogICAgICB9CgogICAgICAuY2xzLTIgewogICAgICAgIGZpbGw6IG5vbmU7CiAgICAgICAgc3Ryb2tlOiAjZjM5MjAwOwogICAgICAgIHN0cm9rZS13aWR0aDogMS41cHg7CiAgICAgIH0KICAgIDwvc3R5bGU+CiAgPC9kZWZzPgogIDxnCiAgICAgaWQ9Imc4NDAiCiAgICAgdHJhbnNmb3JtPSJ0cmFuc2xhdGUoLTMwLjc2LC0zMS4xNDAxMzkpIj4KICAgIDxwYXRoCiAgICAgICBjbGFzcz0iY2xzLTEiCiAgICAgICBkPSJNIDU1LjksODUuMTkgQSAyMC4xNCwyMC4xNCAwIDEgMCAzNS43Niw2NS4wNSAyMC4xNCwyMC4xNCAwIDAgMCA1NS45LDg1LjE5IFoiCiAgICAgICBpZD0icGF0aDgyOCIgLz4KICAgIDxwYXRoCiAgICAgICBjbGFzcz0iY2xzLTEiCiAgICAgICBkPSJtIDk4LDU0LjE0IGEgOSw5IDAgMSAwIC04Ljk1LC05IDguOTUsOC45NSAwIDAgMCA4Ljk1LDkgeiIKICAgICAgIGlkPSJwYXRoODMwIiAvPgogICAgPHBhdGgKICAgICAgIGNsYXNzPSJjbHMtMSIKICAgICAgIGQ9Ik0gODguMzUsMTA4LjQzIEEgMTIuMzEsMTIuMzEgMCAxIDAgNzYsOTYuMTIgMTIuMzEsMTIuMzEgMCAwIDAgODguMzEsMTA4LjQzIFoiCiAgICAgICBpZD0icGF0aDgzMiIgLz4KICAgIDxsaW5lCiAgICAgICBjbGFzcz0iY2xzLTIiCiAgICAgICB4MT0iODYuOTcwMDAxIgogICAgICAgeTE9IjkyLjA1OTk5OCIKICAgICAgIHgyPSI1OC43Nzk5OTkiCiAgICAgICB5Mj0iNjcuMzYwMDAxIgogICAgICAgaWQ9ImxpbmU4MzQiIC8+CiAgICA8bGluZQogICAgICAgY2xhc3M9ImNscy0yIgogICAgICAgeDE9Ijk5LjE4IgogICAgICAgeTE9IjQ1Ljg0IgogICAgICAgeDI9IjU1LjQ4IgogICAgICAgeTI9IjY2LjEyMDAwMyIKICAgICAgIGlkPSJsaW5lODM2IiAvPgogICAgPGxpbmUKICAgICAgIGNsYXNzPSJjbHMtMiIKICAgICAgIHgxPSI5Ny45ODk5OTgiCiAgICAgICB5MT0iNDQuNjUwMDAyIgogICAgICAgeDI9Ijg4LjM0OTk5OCIKICAgICAgIHkyPSI5Mi44Mzk5OTYiCiAgICAgICBpZD0ibGluZTgzOCIgLz4KICA8L2c+Cjwvc3ZnPgo=
|
|
35
|
+
[teaser-image]: https://documentation.eccenca.com/24.1/automate/cmemc-command-line-interface/configuration/completion-setup/22.1-cmemc-create-dataset.gif
|
|
36
|
+
[cmemc-docu]: https://eccenca.com/go/cmemc
|
|
@@ -27,7 +27,7 @@ from cmem_cmemc.exceptions import InvalidConfigurationError
|
|
|
27
27
|
from cmem_cmemc.manual_helper.graph import print_manual_graph
|
|
28
28
|
from cmem_cmemc.manual_helper.multi_page import create_multi_page_documentation
|
|
29
29
|
from cmem_cmemc.manual_helper.single_page import print_manual
|
|
30
|
-
from cmem_cmemc.utils import extract_error_message, get_version
|
|
30
|
+
from cmem_cmemc.utils import check_python_version, extract_error_message, get_version
|
|
31
31
|
|
|
32
32
|
CMEMC_VERSION = get_version()
|
|
33
33
|
|
|
@@ -39,16 +39,10 @@ if os.environ.get("_CMEMC_COMPLETE", "") == "zsh_source":
|
|
|
39
39
|
|
|
40
40
|
version = sys.version_info
|
|
41
41
|
PYTHON_VERSION = f"{version.major}.{version.minor}.{version.micro}"
|
|
42
|
-
|
|
43
|
-
PYTHON_GOT = f"{version.major}.{version.minor}"
|
|
44
|
-
if PYTHON_EXPECTED != PYTHON_GOT and not CONTEXT.is_completing():
|
|
45
|
-
CONTEXT.echo_warning(
|
|
46
|
-
"Warning: You are running cmemc under a non-tested python "
|
|
47
|
-
f"environment (expected {PYTHON_EXPECTED}, got {PYTHON_GOT})"
|
|
48
|
-
)
|
|
42
|
+
check_python_version(ctx=CONTEXT)
|
|
49
43
|
|
|
50
44
|
# set the user-agent environment for the http request headers
|
|
51
|
-
os.environ["CMEM_USER_AGENT"] = f"cmemc/{CMEMC_VERSION}
|
|
45
|
+
os.environ["CMEM_USER_AGENT"] = f"cmemc/{CMEMC_VERSION} (Python {PYTHON_VERSION})"
|
|
52
46
|
|
|
53
47
|
# https://github.com/pallets/click/blob/master/examples/complex/complex/cli.py
|
|
54
48
|
CONTEXT_SETTINGS = {"auto_envvar_prefix": "CMEMC", "help_option_names": ["-h", "--help"]}
|
|
@@ -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:
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
import json
|
|
4
4
|
import os
|
|
5
5
|
import re
|
|
6
|
+
import sys
|
|
6
7
|
import unicodedata
|
|
7
8
|
from dataclasses import dataclass
|
|
8
|
-
from importlib.metadata import version
|
|
9
|
+
from importlib.metadata import version as cmemc_version
|
|
9
10
|
from pathlib import Path
|
|
10
11
|
|
|
11
12
|
import requests
|
|
@@ -22,7 +23,22 @@ from cmem_cmemc.context import ApplicationContext
|
|
|
22
23
|
|
|
23
24
|
def get_version() -> str:
|
|
24
25
|
"""Get the current version or SNAPSHOT."""
|
|
25
|
-
return
|
|
26
|
+
return cmemc_version("cmem-cmemc")
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def check_python_version(ctx: ApplicationContext) -> None:
|
|
30
|
+
"""Check the runtime python version and warn or error."""
|
|
31
|
+
version = sys.version_info
|
|
32
|
+
major_expected = [3]
|
|
33
|
+
minor_expected = [10, 11, 12]
|
|
34
|
+
if version.major not in major_expected:
|
|
35
|
+
ctx.echo_error(f"Error: cmemc can not be executed with Python {version.major}.")
|
|
36
|
+
sys.exit(1)
|
|
37
|
+
if version.minor not in minor_expected and not ctx.is_completing():
|
|
38
|
+
ctx.echo_warning(
|
|
39
|
+
"Warning: You are running cmemc under a non-tested python "
|
|
40
|
+
f"environment ({version.major}.{version.minor})."
|
|
41
|
+
)
|
|
26
42
|
|
|
27
43
|
|
|
28
44
|
def extract_error_message(error: Exception) -> str:
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cmem-cmemc"
|
|
3
|
-
version = "24.1.
|
|
3
|
+
version = "24.1.3"
|
|
4
4
|
description = "Command line client for eccenca Corporate Memory"
|
|
5
5
|
license = "Apache 2.0"
|
|
6
|
-
classifiers = [
|
|
6
|
+
classifiers = [
|
|
7
|
+
"Development Status :: 5 - Production/Stable",
|
|
8
|
+
"Environment :: Console",
|
|
9
|
+
"Intended Audience :: Customer Service",
|
|
10
|
+
"Intended Audience :: Developers",
|
|
11
|
+
"Intended Audience :: Information Technology",
|
|
12
|
+
"Intended Audience :: Science/Research",
|
|
13
|
+
"Intended Audience :: System Administrators",
|
|
14
|
+
"License :: OSI Approved :: Apache Software License",
|
|
15
|
+
"Natural Language :: English",
|
|
16
|
+
"Operating System :: OS Independent",
|
|
17
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
18
|
+
"Programming Language :: Python :: 3.10",
|
|
19
|
+
"Programming Language :: Python :: 3.11",
|
|
20
|
+
"Programming Language :: Python :: 3.12",
|
|
21
|
+
"Topic :: Software Development :: Testing",
|
|
22
|
+
"Topic :: Database", "Topic :: Utilities",
|
|
23
|
+
"Topic :: Utilities"
|
|
24
|
+
]
|
|
7
25
|
homepage = "https://eccenca.com/go/cmemc"
|
|
8
26
|
authors = ["eccenca <cmempy-developer@eccenca.com>", "Sebastian Tramp <sebastian.tramp@eccenca.com>"]
|
|
9
27
|
readme = "README-public.md"
|
|
@@ -92,5 +110,6 @@ ignore = [
|
|
|
92
110
|
"PD", # opinionated linting for pandas code
|
|
93
111
|
"S101", # use of assert detected
|
|
94
112
|
"TRY003", # Avoid specifying long messages outside the exception class
|
|
113
|
+
"UP017", # We need compatibility 3.10 at the moment
|
|
95
114
|
]
|
|
96
115
|
|
cmem_cmemc-24.1.2/PKG-INFO
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: cmem-cmemc
|
|
3
|
-
Version: 24.1.2
|
|
4
|
-
Summary: Command line client for eccenca Corporate Memory
|
|
5
|
-
Home-page: https://eccenca.com/go/cmemc
|
|
6
|
-
License: Apache 2.0
|
|
7
|
-
Author: eccenca
|
|
8
|
-
Author-email: cmempy-developer@eccenca.com
|
|
9
|
-
Requires-Python: >=3.9,<4.0
|
|
10
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier: Intended Audience :: Science/Research
|
|
13
|
-
Classifier: Intended Audience :: System Administrators
|
|
14
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
-
Classifier: License :: Other/Proprietary License
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
-
Classifier: Topic :: Database
|
|
22
|
-
Classifier: Topic :: Software Development :: Testing
|
|
23
|
-
Classifier: Topic :: Utilities
|
|
24
|
-
Requires-Dist: beautifulsoup4 (>=4.12.2,<5.0.0)
|
|
25
|
-
Requires-Dist: certifi (>=2023.5.7)
|
|
26
|
-
Requires-Dist: click (>=8.1.7,<9.0.0)
|
|
27
|
-
Requires-Dist: click-didyoumean (>=0.3.0,<0.4.0)
|
|
28
|
-
Requires-Dist: click-help-colors (>=0.9.1,<0.10.0)
|
|
29
|
-
Requires-Dist: cmem-cmempy (==24.1.1)
|
|
30
|
-
Requires-Dist: configparser (>=5.3.0,<6.0.0)
|
|
31
|
-
Requires-Dist: jinja2 (>=3.1.2,<4.0.0)
|
|
32
|
-
Requires-Dist: natsort (>=8.3.1,<9.0.0)
|
|
33
|
-
Requires-Dist: prometheus-client (>=0.16.0,<0.17.0)
|
|
34
|
-
Requires-Dist: pygments (>=2.15.1,<3.0.0)
|
|
35
|
-
Requires-Dist: pyjwt (>=2.7.0,<3.0.0)
|
|
36
|
-
Requires-Dist: python-dateutil (>=2.8.2,<3.0.0)
|
|
37
|
-
Requires-Dist: requests (>=2.31.0,<3.0.0)
|
|
38
|
-
Requires-Dist: rich (>=13.7.0,<14.0.0)
|
|
39
|
-
Requires-Dist: six (>=1.16.0,<2.0.0)
|
|
40
|
-
Requires-Dist: timeago (>=1.0.16,<2.0.0)
|
|
41
|
-
Requires-Dist: treelib (>=1.6.4,<2.0.0)
|
|
42
|
-
Requires-Dist: urllib3 (>=2,<3)
|
|
43
|
-
Description-Content-Type: text/markdown
|
|
44
|
-
|
|
45
|
-
# cmemc
|
|
46
|
-
|
|
47
|
-
cmemc is the official command line client for [eccenca Corporate Memory](https://documentation.eccenca.com/).
|
|
48
|
-
|
|
49
|
-
## Installation
|
|
50
|
-
|
|
51
|
-
In order to install the cmemc, run:
|
|
52
|
-
|
|
53
|
-
pipx install cmem-cmemc
|
|
54
|
-
|
|
55
|
-
Of course you can install cmemc also with pip, but we recommend [pipx](https://pypa.github.io/pipx/) for normal desktop usage.
|
|
56
|
-
|
|
57
|
-
## Configuration and Usage
|
|
58
|
-
|
|
59
|
-
cmemc is intended for System Administrators and Linked Data Expert, who wants to automate and remote control activities on eccenca Corporate Memory.
|
|
60
|
-
|
|
61
|
-
The cmemc manual including basic usage pattern, configuration as well as a command reference is available at:
|
|
62
|
-
|
|
63
|
-
[https://eccenca.com/go/cmemc](https://eccenca.com/go/cmemc)
|
|
64
|
-
|
|
65
|
-
cmemc only works with Python 3 and refuses to work with Python 2.x.
|
|
66
|
-
In addition to that, cmemc will warn you in case an untested Python environment is used.
|
|
67
|
-
|
|
68
|
-
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
# cmemc
|
|
2
|
-
|
|
3
|
-
cmemc is the official command line client for [eccenca Corporate Memory](https://documentation.eccenca.com/).
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
In order to install the cmemc, run:
|
|
8
|
-
|
|
9
|
-
pipx install cmem-cmemc
|
|
10
|
-
|
|
11
|
-
Of course you can install cmemc also with pip, but we recommend [pipx](https://pypa.github.io/pipx/) for normal desktop usage.
|
|
12
|
-
|
|
13
|
-
## Configuration and Usage
|
|
14
|
-
|
|
15
|
-
cmemc is intended for System Administrators and Linked Data Expert, who wants to automate and remote control activities on eccenca Corporate Memory.
|
|
16
|
-
|
|
17
|
-
The cmemc manual including basic usage pattern, configuration as well as a command reference is available at:
|
|
18
|
-
|
|
19
|
-
[https://eccenca.com/go/cmemc](https://eccenca.com/go/cmemc)
|
|
20
|
-
|
|
21
|
-
cmemc only works with Python 3 and refuses to work with Python 2.x.
|
|
22
|
-
In addition to that, cmemc will warn you in case an untested Python environment is used.
|
|
23
|
-
|
|
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
|