okdata-cli 6.0.0__tar.gz → 6.1.0__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.
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/LICENSE +1 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/PKG-INFO +2 -2
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/__main__.py +6 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/datasets/datasets.py +9 -4
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/datasets/questions.py +1 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/pubs/pubs.py +1 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/pubs/questions.py +0 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/teams/teams.py +4 -4
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/validators.py +2 -2
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/PKG-INFO +2 -2
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/requires.txt +1 -1
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/setup.py +2 -2
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/README.md +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/__init__.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/__init__.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/command.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/__init__.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/datasets/__init__.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/datasets/wizards.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/permissions.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/pubs/__init__.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/pubs/clients.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/pubs/wizards.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/status.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/teams/questions.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/teams/util.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/teams/wizards.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/commands/wizard.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_config_verbose.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_copy_file_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_copy_file_config_2.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_version_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_version_edition_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_version_edition_distributions_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_versions_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/my_permissions_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/permissions_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_audit_log_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_clients_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_multiple_client_keys_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_single_client_keys_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/status_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/status_history_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/team_members_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/teams_config.json +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/io.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/output.py +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/SOURCES.txt +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/dependency_links.txt +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/entry_points.txt +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/namespace_packages.txt +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata_cli.egg-info/top_level.txt +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/pyproject.toml +0 -0
- {okdata_cli-6.0.0 → okdata_cli-6.1.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2019-
|
|
3
|
+
Copyright (c) 2019-2026 Oslo kommune
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: okdata-cli
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: CLI for services provided by Oslo Origo
|
|
5
5
|
Home-page: https://github.com/oslokommune/okdata-cli/
|
|
6
6
|
Author: Oslo Origo
|
|
@@ -18,7 +18,7 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: docopt
|
|
21
|
-
Requires-Dist: okdata-sdk<5,>=4
|
|
21
|
+
Requires-Dist: okdata-sdk<5,>=4.1
|
|
22
22
|
Requires-Dist: PrettyTable
|
|
23
23
|
Requires-Dist: questionary<2.0.0,>=1.10.0
|
|
24
24
|
Requires-Dist: prompt-toolkit<3.0.52
|
|
@@ -4,7 +4,7 @@ import sys
|
|
|
4
4
|
|
|
5
5
|
from keycloak.exceptions import KeycloakGetError, KeycloakPostError
|
|
6
6
|
from okdata.sdk.exceptions import ApiAuthenticateError
|
|
7
|
-
from requests.exceptions import RequestException
|
|
7
|
+
from requests.exceptions import ConnectTimeout, RequestException
|
|
8
8
|
|
|
9
9
|
from okdata.cli import MAINTAINER
|
|
10
10
|
from okdata.cli.command import BaseCommand
|
|
@@ -37,6 +37,11 @@ def main():
|
|
|
37
37
|
# Flush output here to force SIGPIPE to be triggered while inside
|
|
38
38
|
# this try block.
|
|
39
39
|
sys.stdout.flush()
|
|
40
|
+
except ConnectTimeout as e:
|
|
41
|
+
instance.print(
|
|
42
|
+
f"Connection to '{e.request.url}' timed out. Please try again, "
|
|
43
|
+
f"or contact {MAINTAINER} if the problem persists.",
|
|
44
|
+
)
|
|
40
45
|
except RequestException as e:
|
|
41
46
|
if hasattr(e.response, "json"):
|
|
42
47
|
instance.print_error_response(e.response.json())
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import sys
|
|
2
2
|
|
|
3
3
|
from okdata.sdk.data.dataset import Dataset
|
|
4
|
-
from okdata.sdk.data.download import Download
|
|
4
|
+
from okdata.sdk.data.download import Download, DownloadURLAssertionError
|
|
5
5
|
from okdata.sdk.data.upload import Upload
|
|
6
6
|
from requests.exceptions import HTTPError
|
|
7
7
|
|
|
@@ -421,9 +421,14 @@ Options:{BASE_COMMAND_OPTIONS}
|
|
|
421
421
|
def download_files(self, source, target):
|
|
422
422
|
download = Download(env=self.opt("env"))
|
|
423
423
|
dataset_id, version, edition = self._dataset_components_from_uri(source)
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
|
|
425
|
+
try:
|
|
426
|
+
downloaded_files = download.download(
|
|
427
|
+
dataset_id, version, edition, resolve_output_filepath(target)
|
|
428
|
+
)
|
|
429
|
+
except DownloadURLAssertionError as e:
|
|
430
|
+
sys.exit(e)
|
|
431
|
+
|
|
427
432
|
self.log.info(f"Download returned: {downloaded_files}")
|
|
428
433
|
out = create_output(self.opt("format"), "datasets_copy_file_config_2.json")
|
|
429
434
|
out.output_singular_object = True
|
|
@@ -63,7 +63,7 @@ def qs_create_dataset():
|
|
|
63
63
|
"message": "Tilgangsnivå",
|
|
64
64
|
"choices": [
|
|
65
65
|
Choice("Eksplisitt tilgangskontroll", "non-public"),
|
|
66
|
-
Choice("Internt til
|
|
66
|
+
Choice("Internt til kommunen", "restricted"),
|
|
67
67
|
Choice("Offentlig", "public"),
|
|
68
68
|
],
|
|
69
69
|
},
|
|
@@ -68,7 +68,7 @@ Options:{BASE_COMMAND_OPTIONS}
|
|
|
68
68
|
config = edit_team_wizard(self.client)
|
|
69
69
|
except NoTeamError:
|
|
70
70
|
self.print(
|
|
71
|
-
"
|
|
71
|
+
"You are not yet registered as a member of a team. "
|
|
72
72
|
f"Please contact {MAINTAINER} to get it done."
|
|
73
73
|
)
|
|
74
74
|
return
|
|
@@ -87,7 +87,7 @@ Options:{BASE_COMMAND_OPTIONS}
|
|
|
87
87
|
members = self.client.get_team_members(config["team_id"])
|
|
88
88
|
except NoTeamError:
|
|
89
89
|
self.print(
|
|
90
|
-
"
|
|
90
|
+
"You are not yet registered as a member of a team. "
|
|
91
91
|
f"Please contact {MAINTAINER} to get it done."
|
|
92
92
|
if my
|
|
93
93
|
else "No teams exist yet."
|
|
@@ -104,7 +104,7 @@ Options:{BASE_COMMAND_OPTIONS}
|
|
|
104
104
|
config = add_member_wizard(self.client)
|
|
105
105
|
except NoTeamError:
|
|
106
106
|
self.print(
|
|
107
|
-
"
|
|
107
|
+
"You are not yet registered as a member of a team. "
|
|
108
108
|
f"Please contact {MAINTAINER} to get it done."
|
|
109
109
|
)
|
|
110
110
|
return
|
|
@@ -134,7 +134,7 @@ Options:{BASE_COMMAND_OPTIONS}
|
|
|
134
134
|
config = remove_member_wizard(self.client)
|
|
135
135
|
except NoTeamError:
|
|
136
136
|
self.print(
|
|
137
|
-
"
|
|
137
|
+
"You are not yet registered as a member of a team. "
|
|
138
138
|
f"Please contact {MAINTAINER} to get it done."
|
|
139
139
|
)
|
|
140
140
|
return
|
|
@@ -67,9 +67,9 @@ class IntegrationValidator(Validator):
|
|
|
67
67
|
raise ValidationError(
|
|
68
68
|
message="Too long!", cursor_position=len(document.text)
|
|
69
69
|
)
|
|
70
|
-
if not re.fullmatch("[0-9a-
|
|
70
|
+
if not re.fullmatch("[0-9a-zA-Z -]+", document.text):
|
|
71
71
|
raise ValidationError(
|
|
72
|
-
message='Only
|
|
72
|
+
message='Only letters, numbers, spaces and "-", please',
|
|
73
73
|
cursor_position=len(document.text),
|
|
74
74
|
)
|
|
75
75
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: okdata-cli
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: CLI for services provided by Oslo Origo
|
|
5
5
|
Home-page: https://github.com/oslokommune/okdata-cli/
|
|
6
6
|
Author: Oslo Origo
|
|
@@ -18,7 +18,7 @@ Requires-Python: >=3.10
|
|
|
18
18
|
Description-Content-Type: text/markdown
|
|
19
19
|
License-File: LICENSE
|
|
20
20
|
Requires-Dist: docopt
|
|
21
|
-
Requires-Dist: okdata-sdk<5,>=4
|
|
21
|
+
Requires-Dist: okdata-sdk<5,>=4.1
|
|
22
22
|
Requires-Dist: PrettyTable
|
|
23
23
|
Requires-Dist: questionary<2.0.0,>=1.10.0
|
|
24
24
|
Requires-Dist: prompt-toolkit<3.0.52
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setuptools.setup(
|
|
7
7
|
name="okdata-cli",
|
|
8
|
-
version="6.
|
|
8
|
+
version="6.1.0",
|
|
9
9
|
author="Oslo Origo",
|
|
10
10
|
author_email="dataspeilet@oslo.kommune.no",
|
|
11
11
|
description="CLI for services provided by Oslo Origo",
|
|
@@ -24,7 +24,7 @@ setuptools.setup(
|
|
|
24
24
|
},
|
|
25
25
|
install_requires=[
|
|
26
26
|
"docopt",
|
|
27
|
-
"okdata-sdk>=4,<5",
|
|
27
|
+
"okdata-sdk>=4.1,<5",
|
|
28
28
|
"PrettyTable",
|
|
29
29
|
# TODO: Upgrade to questionary 2.x.
|
|
30
30
|
"questionary>=1.10.0,<2.0.0",
|
|
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
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_config_verbose.json
RENAMED
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_copy_file_config.json
RENAMED
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_copy_file_config_2.json
RENAMED
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/datasets_dataset_config.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/my_permissions_config.json
RENAMED
|
File without changes
|
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_audit_log_config.json
RENAMED
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/pubs_clients_config.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/status_history_config.json
RENAMED
|
File without changes
|
{okdata_cli-6.0.0 → okdata_cli-6.1.0}/okdata/cli/data/output-format/team_members_config.json
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
|