dsp-tools 17.0.0.post29__py3-none-any.whl → 18.0.0.post3__py3-none-any.whl

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.

Potentially problematic release.


This version of dsp-tools might be problematic. Click here for more details.

Files changed (50) hide show
  1. dsp_tools/cli/args.py +13 -0
  2. dsp_tools/cli/call_action.py +34 -330
  3. dsp_tools/cli/call_action_files_only.py +74 -0
  4. dsp_tools/cli/call_action_with_network.py +202 -0
  5. dsp_tools/cli/create_parsers.py +53 -14
  6. dsp_tools/cli/utils.py +87 -0
  7. dsp_tools/clients/list_client.py +49 -0
  8. dsp_tools/clients/list_client_live.py +166 -0
  9. dsp_tools/clients/{ontology_client.py → ontology_clients.py} +17 -2
  10. dsp_tools/clients/{ontology_client_live.py → ontology_create_client_live.py} +21 -40
  11. dsp_tools/clients/ontology_get_client_live.py +66 -0
  12. dsp_tools/clients/project_client.py +10 -0
  13. dsp_tools/clients/project_client_live.py +36 -0
  14. dsp_tools/commands/create/create_on_server/cardinalities.py +14 -8
  15. dsp_tools/commands/create/create_on_server/lists.py +163 -0
  16. dsp_tools/commands/create/lists_only.py +45 -0
  17. dsp_tools/commands/create/models/input_problems.py +13 -0
  18. dsp_tools/commands/create/models/parsed_project.py +14 -1
  19. dsp_tools/commands/create/models/rdf_ontology.py +0 -7
  20. dsp_tools/commands/create/models/server_project_info.py +17 -3
  21. dsp_tools/commands/create/parsing/parse_lists.py +45 -0
  22. dsp_tools/commands/create/parsing/parse_project.py +23 -4
  23. dsp_tools/commands/ingest_xmlupload/create_resources/upload_xml.py +4 -4
  24. dsp_tools/commands/project/create/project_create_all.py +17 -13
  25. dsp_tools/commands/project/create/project_create_default_permissions.py +8 -6
  26. dsp_tools/commands/project/create/project_create_ontologies.py +30 -18
  27. dsp_tools/commands/project/legacy_models/listnode.py +0 -30
  28. dsp_tools/commands/validate_data/models/api_responses.py +2 -16
  29. dsp_tools/commands/validate_data/prepare_data/prepare_data.py +11 -10
  30. dsp_tools/commands/validate_data/shacl_cli_validator.py +3 -1
  31. dsp_tools/commands/validate_data/sparql/value_shacl.py +1 -1
  32. dsp_tools/commands/validate_data/validate_data.py +3 -3
  33. dsp_tools/commands/validate_data/validation/get_validation_report.py +1 -1
  34. dsp_tools/commands/validate_data/validation/validate_ontology.py +1 -1
  35. dsp_tools/commands/xmlupload/models/input_problems.py +1 -1
  36. dsp_tools/commands/xmlupload/upload_config.py +1 -1
  37. dsp_tools/commands/xmlupload/xmlupload.py +2 -2
  38. dsp_tools/error/custom_warnings.py +7 -0
  39. dsp_tools/error/exceptions.py +25 -2
  40. dsp_tools/resources/start-stack/docker-compose.yml +23 -23
  41. dsp_tools/utils/ansi_colors.py +2 -0
  42. dsp_tools/utils/fuseki_bloating.py +4 -2
  43. dsp_tools/utils/request_utils.py +31 -0
  44. dsp_tools/xmllib/models/res.py +2 -0
  45. {dsp_tools-17.0.0.post29.dist-info → dsp_tools-18.0.0.post3.dist-info}/METADATA +1 -1
  46. {dsp_tools-17.0.0.post29.dist-info → dsp_tools-18.0.0.post3.dist-info}/RECORD +48 -39
  47. {dsp_tools-17.0.0.post29.dist-info → dsp_tools-18.0.0.post3.dist-info}/WHEEL +1 -1
  48. dsp_tools/commands/project/create/project_create_lists.py +0 -200
  49. dsp_tools/commands/validate_data/api_clients.py +0 -124
  50. {dsp_tools-17.0.0.post29.dist-info → dsp_tools-18.0.0.post3.dist-info}/entry_points.txt +0 -0
@@ -3,7 +3,7 @@ services:
3
3
  api:
4
4
  # on the verge of every deployment, update the "image" value from the "api" value of
5
5
  # https://github.com/dasch-swiss/ops-deploy/blob/main/versions/RELEASE.json
6
- image: daschswiss/knora-api:v32.3.2
6
+ image: daschswiss/knora-api:v32.5.0
7
7
  depends_on:
8
8
  - sipi
9
9
  - db
@@ -28,7 +28,7 @@ services:
28
28
 
29
29
  sipi:
30
30
  # on the verge of every deployment, take the same tag as DSP-API
31
- image: daschswiss/knora-sipi:v32.3.2
31
+ image: daschswiss/knora-sipi:v32.5.0
32
32
  ports:
33
33
  - "1024:1024"
34
34
  volumes:
@@ -41,29 +41,9 @@ services:
41
41
  - KNORA_WEBAPI_KNORA_API_EXTERNAL_PORT=3333
42
42
  command: --config=/sipi/config/sipi.docker-config.lua
43
43
 
44
- app:
45
- # on the verge of every deployment, update the "image" value from the "app" value of
46
- # https://github.com/dasch-swiss/ops-deploy/blob/main/versions/RELEASE.json
47
- image: daschswiss/dsp-app:v11.47.2
48
- volumes:
49
- - ./dsp-app-config.json:/public/config/config.prod.json
50
- ports:
51
- - "4200:4200"
52
-
53
- db:
54
- # on the verge of every deployment, update the "image" value from the "db" value of
55
- # https://github.com/dasch-swiss/ops-deploy/blob/main/versions/RELEASE.json
56
- image: daschswiss/apache-jena-fuseki:5.5.0-2
57
- ports:
58
- - "3030:3030"
59
- environment:
60
- - TZ=Europe/Zurich
61
- - ADMIN_PASSWORD=test
62
- - JVM_ARGS=-Xmx3G
63
-
64
44
  ingest:
65
45
  # on the verge of every deployment, take the same tag as DSP-API
66
- image: daschswiss/dsp-ingest:v32.3.2
46
+ image: daschswiss/dsp-ingest:v32.5.0
67
47
  ports:
68
48
  - "3340:3340"
69
49
  volumes:
@@ -84,5 +64,25 @@ services:
84
64
  - DB_JDBC_URL=jdbc:sqlite:/opt/db/ingest.sqlite
85
65
  - DSP_API_URL=http://host.docker.internal:3333
86
66
 
67
+ app:
68
+ # on the verge of every deployment, update the "image" value from the "app" value of
69
+ # https://github.com/dasch-swiss/ops-deploy/blob/main/versions/RELEASE.json
70
+ image: daschswiss/dsp-app:v12.1.2
71
+ volumes:
72
+ - ./dsp-app-config.json:/public/config/config.prod.json
73
+ ports:
74
+ - "4200:4200"
75
+
76
+ db:
77
+ # on the verge of every deployment, update the "image" value from the "db" value of
78
+ # https://github.com/dasch-swiss/ops-deploy/blob/main/versions/RELEASE.json
79
+ image: daschswiss/apache-jena-fuseki:5.5.0-3
80
+ ports:
81
+ - "3030:3030"
82
+ environment:
83
+ - TZ=Europe/Zurich
84
+ - ADMIN_PASSWORD=test
85
+ - JVM_ARGS=-Xmx3G
86
+
87
87
  volumes:
88
88
  ingest-db:
@@ -12,6 +12,8 @@ SEQUENCE_END = "m"
12
12
  # reset to the default setting of the console
13
13
  RESET_TO_DEFAULT = f"{SEQUENCE_START}0{SEQUENCE_END}"
14
14
 
15
+ BOLD = f"{SEQUENCE_START}1{SEQUENCE_END}" # 1 (bold) ; 32 (green)
16
+
15
17
  # If you want to change for example both the text color and the background color you can combine the sequences
16
18
  # for example: BACKGROUND_BOLD_MAGENTA + YELLOW -> magenta background with yellow text
17
19
 
@@ -4,6 +4,7 @@ from loguru import logger
4
4
 
5
5
  from dsp_tools.clients.fuseki_metrics import FusekiBloatingLevel
6
6
  from dsp_tools.clients.fuseki_metrics import FusekiMetrics
7
+ from dsp_tools.config.logger_config import LOGGER_SAVEPATH
7
8
  from dsp_tools.utils.ansi_colors import BACKGROUND_BOLD_RED
8
9
  from dsp_tools.utils.ansi_colors import BOLD_YELLOW
9
10
  from dsp_tools.utils.ansi_colors import RESET_TO_DEFAULT
@@ -23,7 +24,7 @@ def communicate_fuseki_bloating(fuseki_metrics: FusekiMetrics) -> None:
23
24
  msg = (
24
25
  f"The xmlupload caused the database to use {rounded} GB disk space. "
25
26
  f"Please check that your test server has enough disk space for an upload. "
26
- f"If you have any questions contact the dsp-tools developers."
27
+ f"If you have any questions contact the dsp-tools developers at info@dasch.swiss."
27
28
  )
28
29
  match bloating_level:
29
30
  case FusekiBloatingLevel.OK:
@@ -37,7 +38,8 @@ def communicate_fuseki_bloating(fuseki_metrics: FusekiMetrics) -> None:
37
38
  case FusekiBloatingLevel.CALCULATION_FAILURE:
38
39
  msg = (
39
40
  "The database bloating size could not be calculated. "
40
- "Please contact the dsp-tools developers with your logs."
41
+ f"Please contact the dsp-tools developers (at info@dasch.swiss) "
42
+ f"with your logs saved at {LOGGER_SAVEPATH}."
41
43
  )
42
44
  print(f"{BACKGROUND_BOLD_RED}{msg}{RESET_TO_DEFAULT}")
43
45
  logger.error(msg)
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  import json
4
4
  import os
5
5
  import time
6
+ import warnings
6
7
  from dataclasses import dataclass
7
8
  from dataclasses import field
8
9
  from datetime import datetime
@@ -14,10 +15,14 @@ from typing import Union
14
15
  from loguru import logger
15
16
  from requests import JSONDecodeError
16
17
  from requests import ReadTimeout
18
+ from requests import RequestException
17
19
  from requests import Response
18
20
 
19
21
  from dsp_tools.commands.project.legacy_models.context import Context
20
22
  from dsp_tools.commands.project.legacy_models.helpers import OntoIri
23
+ from dsp_tools.config.logger_config import LOGGER_SAVEPATH
24
+ from dsp_tools.error.custom_warnings import DspToolsUnexpectedStatusCodeWarning
25
+ from dsp_tools.error.exceptions import DspToolsRequestException
21
26
  from dsp_tools.error.exceptions import PermanentTimeOutError
22
27
 
23
28
 
@@ -192,3 +197,29 @@ def should_retry(response: Response) -> bool:
192
197
  try_again_later = "try again later" in response.text.lower()
193
198
  in_testing_env = os.getenv("DSP_TOOLS_TESTING") == "true" # set in .github/workflows/tests-on-push.yml
194
199
  return (try_again_later or in_500_range) and not in_testing_env
200
+
201
+
202
+ def log_and_raise_request_exception(error: RequestException) -> Never:
203
+ msg = (
204
+ f"During an API call the following exception occurred. "
205
+ f"Please contact info@dasch.swiss with the log file at {LOGGER_SAVEPATH} "
206
+ f"if you required help resolving the issue.\n"
207
+ f"Original exception name: {error.__class__.__name__}\n"
208
+ )
209
+ if error.request:
210
+ msg += f"Original request: {error.request.method} {error.request.url}"
211
+ logger.exception(msg)
212
+ raise DspToolsRequestException(msg) from None
213
+
214
+
215
+ def log_and_warn_unexpected_non_ok_response(status_code: int, response_text: str) -> None:
216
+ resp_txt = response_text[:200] if len(response_text) > 200 else response_text
217
+ msg = (
218
+ "We got an unexpected API response during the following request. "
219
+ "Please contact the dsp-tools development team (at info@dasch.swiss) with your log file "
220
+ "so that we can handle this more gracefully in the future.\n"
221
+ f"Response status code: {status_code}\n"
222
+ f"Original Message: {resp_txt}"
223
+ )
224
+ logger.warning(msg)
225
+ warnings.warn(DspToolsUnexpectedStatusCodeWarning(msg))
@@ -91,10 +91,12 @@ class Resource:
91
91
  ```
92
92
  """
93
93
  if not is_valid_resource_id(res_id):
94
+ res_id = str(res_id)
94
95
  emit_xmllib_input_type_mismatch_warning(
95
96
  expected_type="xsd:ID", value=res_id, res_id=res_id, value_field="resource ID"
96
97
  )
97
98
  if not is_nonempty_value(restype):
99
+ restype = str(restype)
98
100
  emit_xmllib_input_type_mismatch_warning(
99
101
  expected_type="resource type", value=restype, res_id=res_id, value_field="restype"
100
102
  )
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dsp-tools
3
- Version: 17.0.0.post29
3
+ Version: 18.0.0.post3
4
4
  Summary: DSP-TOOLS is a Python package with a command line interface that helps you interact with a DaSCH service platform (DSP) server.
5
5
  Author: DaSCH - Swiss National Data and Service Center for the Humanities
6
6
  Author-email: DaSCH - Swiss National Data and Service Center for the Humanities <info@dasch.swiss>
@@ -1,9 +1,12 @@
1
1
  dsp_tools/__init__.py,sha256=XdzLhY_8FUFmPtUEawAvEA8apQ_jlgspb2HpmNjlDV8,158
2
2
  dsp_tools/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- dsp_tools/cli/args.py,sha256=LhDmsQFBclEKBTarFJx-NB2K4fhzYSV9OjMLMxU3pNk,745
4
- dsp_tools/cli/call_action.py,sha256=7Hobk9PDABFn7f2vLq-7M6hU1-KnG115UGMVmJmBLKA,14122
5
- dsp_tools/cli/create_parsers.py,sha256=q3l4o6ApdOp6uQd63370EfKXwtwxnFKZ5PwHApc0Jzw,18553
3
+ dsp_tools/cli/args.py,sha256=qUoEQVULA3eaCkI1xSdEhEcM26rku0lejnjSnKoevGU,1038
4
+ dsp_tools/cli/call_action.py,sha256=l6pmY1SckKMkh-Y0DW1Aij2IR_D91uoe078fsruXkIQ,3275
5
+ dsp_tools/cli/call_action_files_only.py,sha256=T0A51uN4pClcLaDv_eREZMwEshAIlHMyEDPOOqZIOKg,2630
6
+ dsp_tools/cli/call_action_with_network.py,sha256=JEMRWL13hvzJyFZ3NIHefMP8GnmTsdgHwgWaS2I9vAw,8466
7
+ dsp_tools/cli/create_parsers.py,sha256=cYvXlVRVeqVRzAydsZ8_OUbRErjD_mz6irxFAVmhFqU,19516
6
8
  dsp_tools/cli/entry_point.py,sha256=gdexHqVDAy8_Atf0oUxvPVQyDGWUSUhio396U5Oc0RI,10331
9
+ dsp_tools/cli/utils.py,sha256=Y3Sq1QlMJw7NvQ3CEB-55LQi-ht3tlsNcRjTISbEQO4,3074
7
10
  dsp_tools/clients/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
11
  dsp_tools/clients/authentication_client.py,sha256=A9nTlOdUE4Ez0psWX6qXwuypNBAA2eSVfHIEPzRmoCs,267
9
12
  dsp_tools/clients/authentication_client_live.py,sha256=Bnc6-M2r_D8BNoZgKi5Rzc2vrz5RtRhwUNjJF3PrVTQ,1917
@@ -12,26 +15,34 @@ dsp_tools/clients/connection_live.py,sha256=Y0T-F93FFGnY2Z7qHhG56v3Ajg7U7ATq4QHI
12
15
  dsp_tools/clients/fuseki_metrics.py,sha256=Vy_aWOusnzlD0EnbyHZcTtPIpMEfRA_ihtYbysTq7sQ,2059
13
16
  dsp_tools/clients/legal_info_client.py,sha256=itDvGQf1VV1WiH2oHVcH1epSUSdJPRDwdRUvmCw8P4s,742
14
17
  dsp_tools/clients/legal_info_client_live.py,sha256=9nOe8Y-oQRHh4TkD2-tjdxLNNTonQ0i-P6UjCGgIBGA,5987
18
+ dsp_tools/clients/list_client.py,sha256=L1CcbUcmzwkJVKbrbXa7EB2myJ-sCchjZywwuPh2uS8,1118
19
+ dsp_tools/clients/list_client_live.py,sha256=QFDlZtGEvYu4bmaDIJVFkyWDG9pnJmIfz4GTMElxBqg,6553
15
20
  dsp_tools/clients/metadata_client.py,sha256=GD4uYXP3kEym59JAqSub61xXDZSmZaQ2lKRF1_MgYS0,623
16
21
  dsp_tools/clients/metadata_client_live.py,sha256=SLq2Ssob3TQaTx6PUblD-DeTimSLA4Y6woo6246Fca8,1863
17
- dsp_tools/clients/ontology_client.py,sha256=bATGyI8YFFCl0yis9beJjGB1ZlJuO_GqYnlB-2ulv94,638
18
- dsp_tools/clients/ontology_client_live.py,sha256=8uWoRxwlCvUHQZYQsQ5XojAlpEAqzIhFNYROQfsNWf4,5367
22
+ dsp_tools/clients/ontology_clients.py,sha256=juigGsfZ1uP42gtyEstDzaMfjeKcriS34mgYaFbJW-Y,989
23
+ dsp_tools/clients/ontology_create_client_live.py,sha256=zv32RRWanbIrLnb6kJ4s4vqgAD2ipc4xo_yOXTyZy3o,4492
24
+ dsp_tools/clients/ontology_get_client_live.py,sha256=bq8g0nID9ChCmH5_enxOTLML5IikFEMhJq-kqk5cyaM,2710
25
+ dsp_tools/clients/project_client.py,sha256=1nsp-RLRTqD1ePk824R4XKbAKCWMYwiGR9uzA-0qRqg,243
26
+ dsp_tools/clients/project_client_live.py,sha256=rymSE8gYrDXErM5k5UExFjABfmtN5f6Pr5Eye5kJdrE,1297
19
27
  dsp_tools/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
28
  dsp_tools/commands/create/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
29
  dsp_tools/commands/create/communicate_problems.py,sha256=GdAOiUZevrYFhRINyDMhcbXdUqtGDKb2nEelhdfSFR0,885
22
30
  dsp_tools/commands/create/constants.py,sha256=ZzWNn_zh-0Oy0SJmGivQbcAnQTmwT0akNchZUppXgh0,276
23
31
  dsp_tools/commands/create/create_on_server/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- dsp_tools/commands/create/create_on_server/cardinalities.py,sha256=QW0i6TSNmP-dGS2WSad1np9QHz41-A51ArspuAQZGJg,5260
32
+ dsp_tools/commands/create/create_on_server/cardinalities.py,sha256=bp-3NokfyhpE5ddKTkib9imFpZiMyRKcN-pHK_DHyfo,5518
33
+ dsp_tools/commands/create/create_on_server/lists.py,sha256=P4CsHHrbRMkfz66rRWbG6_MEIhm0kt8Pnou3mcGtdJ0,6759
25
34
  dsp_tools/commands/create/create_on_server/mappers.py,sha256=Lu2DJAICOZu7WP_1UDvyvRAi0T9ZGO88kvx0UfI6v5I,564
35
+ dsp_tools/commands/create/lists_only.py,sha256=pSgl0XykdguR9445QIAvDTTRbsBuicIxgjD-zFQQzD0,2079
26
36
  dsp_tools/commands/create/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- dsp_tools/commands/create/models/input_problems.py,sha256=Oa8-fQy2FTtmfXzMVdhBE9Cs3PlOgTWga4XmK5QkM7s,665
37
+ dsp_tools/commands/create/models/input_problems.py,sha256=mFww8a-sFBtWvSNxywiQTprTa-74jMkE45K2UqJxFEc,1169
28
38
  dsp_tools/commands/create/models/parsed_ontology.py,sha256=EUuD47SmWXyB74vGdxGwuvRzq1f4_YdciwYmqcEwqWc,815
29
- dsp_tools/commands/create/models/parsed_project.py,sha256=Gnl9gJEm5sNbccYG24cwT4doS-oqh_cywjbqk1V4wZQ,928
30
- dsp_tools/commands/create/models/rdf_ontology.py,sha256=TyXHmblr9j5XZFVqjLT516MrVYPgzjXWvTX4TckEPPk,361
31
- dsp_tools/commands/create/models/server_project_info.py,sha256=k5EVYo8ZJhMMB5XKja9Xl6CFQ_oLRFdRZPjMyj4XmO4,699
39
+ dsp_tools/commands/create/models/parsed_project.py,sha256=wtUicIHhwv324noBNrC8qmA4P8zNzqqR7J04dOdbgo0,1166
40
+ dsp_tools/commands/create/models/rdf_ontology.py,sha256=c51riv5ZwlIIblr9Wn7QStr4AjtO4Bo1-2bPMKSsTH8,226
41
+ dsp_tools/commands/create/models/server_project_info.py,sha256=DtN0TChUh9hPSdt4ENgjJxRoI9CVcFe6NurgF-d5i_I,1134
32
42
  dsp_tools/commands/create/parsing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
43
+ dsp_tools/commands/create/parsing/parse_lists.py,sha256=iL-ijELdAgk3BZ36dDugfX2vYo9u4cnHCQh9RyPHqdw,2074
33
44
  dsp_tools/commands/create/parsing/parse_ontology.py,sha256=4cqo2wa9wcLBszWXgPrixQgaHYPHfENQbF6dkeBVNiU,4268
34
- dsp_tools/commands/create/parsing/parse_project.py,sha256=CghB-pJ6RcllOP0jn8Hs50kRcxS2Q0iS8A_QNGbjzZU,4005
45
+ dsp_tools/commands/create/parsing/parse_project.py,sha256=wYxy0EDcLMZ8Ie9ET9jc434tU75V7fWenDi9ROwDvoo,4828
35
46
  dsp_tools/commands/create/parsing/parsing_utils.py,sha256=X-ALTAwcQE8dBRiagb_O9D89d7WGvwnq77cNkNZDNpc,1563
36
47
  dsp_tools/commands/create/serialisation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
37
48
  dsp_tools/commands/create/serialisation/ontology.py,sha256=NK4kjriHs7dt5fXNiIBc1z_mE9szI4YemJ--hkYYeCk,1581
@@ -65,7 +76,7 @@ dsp_tools/commands/ingest_xmlupload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
65
76
  dsp_tools/commands/ingest_xmlupload/bulk_ingest_client.py,sha256=i53VPo5bRf6FkGzEuQuZJIzHKO4_aJKkmz3jmIA5q3Y,7617
66
77
  dsp_tools/commands/ingest_xmlupload/create_resources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
67
78
  dsp_tools/commands/ingest_xmlupload/create_resources/apply_ingest_id.py,sha256=AM6nSDKQc0Oqrv2Z0Uyaz8ztcPJrUGnwN5tlpvBzaBg,2579
68
- dsp_tools/commands/ingest_xmlupload/create_resources/upload_xml.py,sha256=atfMF_8yaZ7qJ-ZzWLdLFlFEWvN3uiT3iqkINLUXxSQ,7796
79
+ dsp_tools/commands/ingest_xmlupload/create_resources/upload_xml.py,sha256=1m3_KBbboCTunUAHtAfKDZS9K5DGhr-_EfMj3VOZ-_g,7748
69
80
  dsp_tools/commands/ingest_xmlupload/create_resources/user_information.py,sha256=wR6PGR2DQvPS0YXELzCJ70fvzQnFvIzek3VFWVPoZk0,4883
70
81
  dsp_tools/commands/ingest_xmlupload/ingest_files/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
82
  dsp_tools/commands/ingest_xmlupload/ingest_files/ingest_files.py,sha256=ML_k_KyuNOYBcwy6nrqJ077vj72b_a04MbJRy95KPcA,2306
@@ -77,10 +88,9 @@ dsp_tools/commands/ingest_xmlupload/upload_files/upload_files.py,sha256=QXj58UiT
77
88
  dsp_tools/commands/project/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
89
  dsp_tools/commands/project/create/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
79
90
  dsp_tools/commands/project/create/parse_project.py,sha256=xYcFaUtKLZigxDZpD7O2JNueHmy_-Ar1iE2LJe97gos,4081
80
- dsp_tools/commands/project/create/project_create_all.py,sha256=GM1XjpRvGoT79wGO9VF27c8CBdV42dIOhcT3AdKSwzg,24888
81
- dsp_tools/commands/project/create/project_create_default_permissions.py,sha256=CygzQ4rFF6SYUCkSvrO6gkjpINWZh4wjq_2V0PExwso,5990
82
- dsp_tools/commands/project/create/project_create_lists.py,sha256=A9kKe4gVP1Ug869102bRXK5RraZUtGzv5cWyFfK_DEA,7963
83
- dsp_tools/commands/project/create/project_create_ontologies.py,sha256=Ie5WHTKg5S1bRCg3SmmbB1tjem3NwRrX3N32TeAWzyI,19465
91
+ dsp_tools/commands/project/create/project_create_all.py,sha256=9Am3ZjFyKsHAwEAoNl3rCRaFviJDkIQ4AaOYFm_xJgc,25145
92
+ dsp_tools/commands/project/create/project_create_default_permissions.py,sha256=4SPcyEIImW1ek_q94oLTtxndhkDNF_RNw13U_fKXsuM,6144
93
+ dsp_tools/commands/project/create/project_create_ontologies.py,sha256=DlDXJvrdrPpVO6cYyC4DpllYUn8rgQpF6RbRToO7X-A,20067
84
94
  dsp_tools/commands/project/create/project_validate.py,sha256=H5TVvqO5V63roGEde1J0n21twkajy4AkVSDGmZb4Jp8,27443
85
95
  dsp_tools/commands/project/get/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
96
  dsp_tools/commands/project/get/get.py,sha256=_5LxbSP5Fi0PyXODjvND3ZC9E_x91yk6Xb6tcldG5j0,6447
@@ -90,7 +100,7 @@ dsp_tools/commands/project/legacy_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5
90
100
  dsp_tools/commands/project/legacy_models/context.py,sha256=hT69iRVpT0RDySe_8LQofvryENuj1jiTgv1mqTMbS8U,12190
91
101
  dsp_tools/commands/project/legacy_models/group.py,sha256=iSfcGZK2w7Zn8Hs4r_GCosSTGqhQNOS1vget-Kw8Isc,8138
92
102
  dsp_tools/commands/project/legacy_models/helpers.py,sha256=pU5jUeeRZnEi9Y_fm0xAayBmpOAxvU8XD9CXwRSFNgA,850
93
- dsp_tools/commands/project/legacy_models/listnode.py,sha256=wqBps8RakCdg19n90yaqRQG4EtzY56eTbXspPA1Jnrs,14932
103
+ dsp_tools/commands/project/legacy_models/listnode.py,sha256=7Uyf4p-SYB_3NXM4bU_1QpBbi3KZjLfeGwXMvS5aksk,13838
94
104
  dsp_tools/commands/project/legacy_models/model.py,sha256=AzxebBc5Y19kPFvsr4cPLWrKxZj6aGeT_te8NkgaRl4,247
95
105
  dsp_tools/commands/project/legacy_models/ontology.py,sha256=uXX0U4FVzx53GIjTyZhCN96oxdSc1Jaq-O818XrsSEc,12557
96
106
  dsp_tools/commands/project/legacy_models/project.py,sha256=TlC-DPvaIxCdhnO82s_92lcC8--JzO840cLzrmrG4Fo,12012
@@ -106,35 +116,34 @@ dsp_tools/commands/resume_xmlupload/resume_xmlupload.py,sha256=MibH5CwQ_nmSzkwJI
106
116
  dsp_tools/commands/start_stack.py,sha256=Dj3fBKVgiF4iEaShhFB8vkcOJdBs8vZMR7uuNDEeeBs,20383
107
117
  dsp_tools/commands/validate_data/CLAUDE.md,sha256=dQYFJtiayYh45kwrtFZWCVDMfPhkqSCTpQ7EUAuO6pc,7733
108
118
  dsp_tools/commands/validate_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
109
- dsp_tools/commands/validate_data/api_clients.py,sha256=8LFiCQMwS22gWXvGo7p4DDtI8YiHfgVLBlmiA9ASaeI,5322
110
119
  dsp_tools/commands/validate_data/constants.py,sha256=Xr9iPYG4kpcgzUSy3ARjKv7dgSuMBVf2R69Uj7trcx0,2509
111
120
  dsp_tools/commands/validate_data/mappers.py,sha256=lA4Zdt2PHb4nvcOTv63oIPTI5Xs-5J2GSr3S1cDlZkM,7749
112
121
  dsp_tools/commands/validate_data/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
113
- dsp_tools/commands/validate_data/models/api_responses.py,sha256=RrHwxyx1o2j9sVCwZktTTSnRXHeathNmQxk2RBxJ93E,920
122
+ dsp_tools/commands/validate_data/models/api_responses.py,sha256=_Zs96nAC3pPY0hkfoJMzhpBZy8V5R1-1J2iJkiKSN7I,753
114
123
  dsp_tools/commands/validate_data/models/input_problems.py,sha256=QwUHcqONqveQbXaedKqbpqjpYNHSJbn0zDag0iQrCJg,3323
115
124
  dsp_tools/commands/validate_data/models/rdf_like_data.py,sha256=1TccR7UwC5idgrny6CQoFd-lPGzx7BdI8sorqWxgCv0,3313
116
125
  dsp_tools/commands/validate_data/models/validation.py,sha256=okYFrLhaSQCGfa8A7gR6Wz-nv0xsmyN5LlNgSqfVfG4,2296
117
126
  dsp_tools/commands/validate_data/prepare_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
127
  dsp_tools/commands/validate_data/prepare_data/get_rdf_like_data.py,sha256=sU_VmMAvvNsjKkld6Coc_HJLt32nzXOimvKRxIbte-o,11620
119
128
  dsp_tools/commands/validate_data/prepare_data/make_data_graph.py,sha256=TANm9WA_z-oPGkoMIR2BGZrHtAkizDlnK_5WDVxQRoQ,4098
120
- dsp_tools/commands/validate_data/prepare_data/prepare_data.py,sha256=u47rlKkxI1wF2_r-0NeGjimI-frG-laF3u4FiJ-v1Lk,8246
129
+ dsp_tools/commands/validate_data/prepare_data/prepare_data.py,sha256=LL4JplvcQ0HXXqg13xY9pEkuOv9jfaQxB4xJdgXRSQk,8284
121
130
  dsp_tools/commands/validate_data/process_validation_report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
131
  dsp_tools/commands/validate_data/process_validation_report/get_user_validation_message.py,sha256=W5VYJPs8J3VvJAaFDBGBuCQ3Xtonhn1iRUOxwgO7xV0,16148
123
132
  dsp_tools/commands/validate_data/process_validation_report/query_validation_result.py,sha256=ln7zOq0LgkaVIoTNv2O72Z0tK6WX0UrbwAph-n0tD3E,22299
124
133
  dsp_tools/commands/validate_data/process_validation_report/reformat_validation_results.py,sha256=YGJnYLHhmc_X4I6RqKDgnLClMo_bNVtzRZBER3uLWp8,6556
125
- dsp_tools/commands/validate_data/shacl_cli_validator.py,sha256=3PMFLwPgei76GI07lcboPrLYvjmYaHv7pg_dNvF2KlQ,2958
134
+ dsp_tools/commands/validate_data/shacl_cli_validator.py,sha256=4v8KM0GOkg1Zuq5ii29T2muUz3ZUsua7W6UhS9C3zcc,3079
126
135
  dsp_tools/commands/validate_data/sparql/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
127
136
  dsp_tools/commands/validate_data/sparql/cardinality_shacl.py,sha256=V45pljnAx6jvsE1VRDKMZjZ1HdmwoMUnPUCQrQIYHMU,7218
128
137
  dsp_tools/commands/validate_data/sparql/construct_shacl.py,sha256=pB8sHn8FiAEiweeIYHROUAJH0YeCk8NWbzEI98YuEIQ,3553
129
138
  dsp_tools/commands/validate_data/sparql/legal_info_shacl.py,sha256=2yhn5HfCJFJpOTB-3XNWfxP1KwW3zKxDfqPdhN_Sazg,1522
130
- dsp_tools/commands/validate_data/sparql/value_shacl.py,sha256=iEpBm4X-jARhGQU21VDK2KvOtMCHTXJzpm08Dda7x1w,13068
139
+ dsp_tools/commands/validate_data/sparql/value_shacl.py,sha256=uUkOlrMCcqzuVYQTXwTJOJw4RGDTd00y3OtLP41nY2c,13044
131
140
  dsp_tools/commands/validate_data/utils.py,sha256=L3kpuhn46x-OHap9RnN9QwUQjFYpkQFlFXzFKQfy5ZE,1990
132
- dsp_tools/commands/validate_data/validate_data.py,sha256=GKQv0G2pDnB_5wbUghk12wcCWBsc5hoNySsxuQ81C5U,13498
141
+ dsp_tools/commands/validate_data/validate_data.py,sha256=jMAqZfuy_HjHLYR58piXBFdb5oV4_UR8qdHBRYrUM7Q,13450
133
142
  dsp_tools/commands/validate_data/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
143
  dsp_tools/commands/validate_data/validation/check_duplicate_files.py,sha256=8HU7GZkTMXj68WrVTXadtQujjEP_MvkOnQb4iVtEHt4,2228
135
144
  dsp_tools/commands/validate_data/validation/check_for_unknown_classes.py,sha256=Vhr1-nJzd3vzlwSoDJTljY-eFMpFLpTEy_zIEZb5MJs,2966
136
- dsp_tools/commands/validate_data/validation/get_validation_report.py,sha256=jvzFXzyG6bcSNzs6Buj_-NV85g9pwr9spMz_OBG8MQk,4201
137
- dsp_tools/commands/validate_data/validation/validate_ontology.py,sha256=R5-aD9cFc4KSLbT_IanhzSibx71uJX_dBBHgkoHtLKY,4783
145
+ dsp_tools/commands/validate_data/validation/get_validation_report.py,sha256=pJrz-A9cziHS_MsmoAs-P5eyj5h-jV7Z9yZBVyvOpgE,4223
146
+ dsp_tools/commands/validate_data/validation/validate_ontology.py,sha256=ePBoe7cUzeZcA0hUY9-vmkT4SUpaFhmfNwYwU5tsG9w,4805
138
147
  dsp_tools/commands/xmlupload/CLAUDE.md,sha256=EOmh0nPs5ne9iAFCdhG6LHYaYBn4hMkM86G8UfMMsaU,10547
139
148
  dsp_tools/commands/xmlupload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
140
149
  dsp_tools/commands/xmlupload/iri_resolver.py,sha256=1vHj4jMNCG6ZB0-opDfuLwL0guieTQXMmWYfbCdhoUI,625
@@ -148,7 +157,7 @@ dsp_tools/commands/xmlupload/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQ
148
157
  dsp_tools/commands/xmlupload/models/bitstream_info.py,sha256=LQHmaSauocNlCmnKSn89tG05dza1rkH671Ii5LocoQQ,464
149
158
  dsp_tools/commands/xmlupload/models/formatted_text_value.py,sha256=fBHctT5cHbDCNIAKs6IlgsY93v1qkKAyMeVwNg5d8g8,200
150
159
  dsp_tools/commands/xmlupload/models/ingest.py,sha256=dwZMpKQJ7cJpgUXCVRzQpyzagoOWPLq5B2NGbsJZPyU,5770
151
- dsp_tools/commands/xmlupload/models/input_problems.py,sha256=Sw4_V6JVMRd2l8m9vL32BpUozQ5DYgbnK9nLNaxIaV0,1995
160
+ dsp_tools/commands/xmlupload/models/input_problems.py,sha256=agr0Qz2JFLlI7S9IeK09jqemxzPriTvuW5pYuTj4FGg,2017
152
161
  dsp_tools/commands/xmlupload/models/lookup_models.py,sha256=2rt1-tqvE-El-QDtDtxTGYMn3ZUN2JsHFwrmC01W4Kg,477
153
162
  dsp_tools/commands/xmlupload/models/permission.py,sha256=ptHV3sY5T0YVPf1zAboxKint4SajEfOI67OVl6YzfUY,1058
154
163
  dsp_tools/commands/xmlupload/models/permissions_parsed.py,sha256=frflZBEGKmcoz7-JZDBvYUamw5hSKuJe5R20Oq-umXE,3648
@@ -178,15 +187,15 @@ dsp_tools/commands/xmlupload/stash/stash_circular_references.py,sha256=EFcROk78B
178
187
  dsp_tools/commands/xmlupload/stash/stash_models.py,sha256=zIYKUyRIGY6SMiQRgA2AozyOKJwEwiq8nyXV06bEMiI,3300
179
188
  dsp_tools/commands/xmlupload/stash/upload_stashed_resptr_props.py,sha256=PTk-d9ZlSxMdrlE2gbd1k5WuHvROFn-e2pYhJJCi5sM,4212
180
189
  dsp_tools/commands/xmlupload/stash/upload_stashed_xml_texts.py,sha256=zMKUa2lx7zZ26bbL6uF-8vVypi8KKLgwBXqF-DADVV4,7460
181
- dsp_tools/commands/xmlupload/upload_config.py,sha256=4PBjzGIly0yh9k9I8IDYRWo81U1Bfuh5h8XitdzsGQE,2598
190
+ dsp_tools/commands/xmlupload/upload_config.py,sha256=7lz3PcrHOsTvEBBzDWTvygtNRaf6luAKo_qoOxJp0Ks,2586
182
191
  dsp_tools/commands/xmlupload/write_diagnostic_info.py,sha256=ODjCAdKZyxHYDUhpIVpdEwIzjP-2HFySrzWN6Tddb1A,1281
183
- dsp_tools/commands/xmlupload/xmlupload.py,sha256=q_xC9CEDSFb4lMmJoECKZrzTGfIWnAgBx0dnGuz33Oo,22373
192
+ dsp_tools/commands/xmlupload/xmlupload.py,sha256=82cNcy0x_FNjJkXRAijsu_T4m4tZHo7u5gJ74aSwC98,22349
184
193
  dsp_tools/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
185
194
  dsp_tools/config/logger_config.py,sha256=Bw2Gu5F2d8un_KNk0hvNtV7fvN2TlThqo6gSwqeccOU,2067
186
195
  dsp_tools/config/warnings_config.py,sha256=15_Lt227HLqhdn6v-zJbi1KG9Fo6Zi1_4fp_a-iY72w,1142
187
196
  dsp_tools/error/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
188
- dsp_tools/error/custom_warnings.py,sha256=7C2DscIz9k7IfM8uebIsKWPcWcSjwpDqbIRDaPw7bI8,1053
189
- dsp_tools/error/exceptions.py,sha256=jaKZE1aDWavHPIjYxc_upK9_tcPPEpaCd7PaIPuazNQ,5131
197
+ dsp_tools/error/custom_warnings.py,sha256=BPwvzZ9dxFMWYlWwIaDvTjdv24JFaDZU9-HW6MG5DK4,1294
198
+ dsp_tools/error/exceptions.py,sha256=z8e4ccF4ezJ9JO6SD02P6b49yuJ3yUYGPT9YS0ihoO0,6013
190
199
  dsp_tools/error/problems.py,sha256=DotzVg3MYvMJmernd9tTBmDHoT1MOkHdiWVv8iMoFSk,265
191
200
  dsp_tools/error/xmllib_errors.py,sha256=DpYCsBIx_GmsBAUlfk2VMqtzD5IGMRbd2yXTcrJFHR4,549
192
201
  dsp_tools/error/xmllib_warnings.py,sha256=sS9jJXGJtQqCiJ9P2zCM5gpIhTpChbujQz_fPvxLm8g,1557
@@ -204,7 +213,7 @@ dsp_tools/resources/schema/properties-only.json,sha256=a2APFD6mTiaM15VMktN2eZr6L
204
213
  dsp_tools/resources/schema/resources-only.json,sha256=PCCaZZ1vGEZdgwFcx9iGvNYbQywH_vImG8sDqu_OVQ0,4207
205
214
  dsp_tools/resources/start-stack/docker-compose.override-host.j2,sha256=ev36TSCZ7xFpnb7Fcw-s3iQLJkweHhNP2k3golvqcbs,255
206
215
  dsp_tools/resources/start-stack/docker-compose.override.yml,sha256=YsoEIWH6U2-M9wV5MkHR_xGpIppP3SDB8xDVWcVg3no,213
207
- dsp_tools/resources/start-stack/docker-compose.yml,sha256=qG9v49wq7iIl3XtCHzHV1c2yIP3vP1wJrsjBLi3--yA,2945
216
+ dsp_tools/resources/start-stack/docker-compose.yml,sha256=QxQe9F5ooWQsg3Rkg92hIqcF9GkBi-tl7zQA6Jfu1bM,2944
208
217
  dsp_tools/resources/start-stack/dsp-app-config.json,sha256=s1LZ81ch63mnQxQjldkaV7-3a_42xvxPmnuCvvPCB5c,584
209
218
  dsp_tools/resources/start-stack/dsp-app-config.override-host.j2,sha256=cVz6ybmJBcgF1FG7y6P4XjzbpMxqC6qKlrbcqAMOB2I,616
210
219
  dsp_tools/resources/validate_data/api-shapes-resource-cardinalities.ttl,sha256=xBG6zH9h6qakDeE7Yj28NmHvWpg-vYQ4k5e64WRdKn8,6861
@@ -212,18 +221,18 @@ dsp_tools/resources/validate_data/api-shapes.ttl,sha256=irPS80i3CEH4qUuokS5Y4jRs
212
221
  dsp_tools/resources/validate_data/shacl-cli-image.yml,sha256=xqjLfZOq1PbNFN9pfq4wN4Y1eSvkhHL6hbvY59uP2pM,125
213
222
  dsp_tools/resources/validate_data/validate-ontology.ttl,sha256=bPRUlPWJ4GQKzXWM3eKgs3pwcak-crDUeMp8g2j6xzU,4341
214
223
  dsp_tools/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
215
- dsp_tools/utils/ansi_colors.py,sha256=p2vq-wzfmE-wdDddvC26UcOA6Z1qhFTdzP0dPoW4sy0,1691
224
+ dsp_tools/utils/ansi_colors.py,sha256=aCMfANQ8lNtuJ33WgjNkTegI26ISGq8MElrLXrJua4s,1759
216
225
  dsp_tools/utils/data_formats/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
217
226
  dsp_tools/utils/data_formats/date_util.py,sha256=VLNQnSsUX6NB1IY3Ry5KCxCLgHHYN0TSSBRn8hyXN-4,4714
218
227
  dsp_tools/utils/data_formats/iri_util.py,sha256=oFcc3gcikmgJOf7iMhT4tfdUQg9wE7lUW5aysfHjylM,1030
219
228
  dsp_tools/utils/data_formats/shared.py,sha256=9AybXCAboojvRULZPud5e6B7UkjQOuN6f5fiVxwuZe8,2618
220
229
  dsp_tools/utils/data_formats/uri_util.py,sha256=9UGrbtxHVI0Ka0ttxd39KDhGeeP0xOdVLjt6HyV-Ic8,3257
221
- dsp_tools/utils/fuseki_bloating.py,sha256=yUCSijVf_Ne9iWUK_IzbPAkOMkN8Xt9ttPcWWRSIgMI,2381
230
+ dsp_tools/utils/fuseki_bloating.py,sha256=B1k_HS9sLGY2YLqS7wiFBHxthoW4FVsb3JH1YxUOxnQ,2530
222
231
  dsp_tools/utils/json_parsing.py,sha256=KlNvwnZoq-gJqnOVH7tiZMzgdld_3IunuOVvlEVXGXc,1684
223
232
  dsp_tools/utils/rdflib_constants.py,sha256=D5HO7oILBRiQI-bJj14pbCx6zhKY4RGqjIjq6S_IawU,652
224
233
  dsp_tools/utils/rdflib_utils.py,sha256=M9UCXMe8W3SDQ0DYh4i6lRwYkyWozrWLl19NP5A-RlY,284
225
234
  dsp_tools/utils/replace_id_with_iri.py,sha256=5M5vXWJIQ0oO4ELwIt_5QeYBvyGESBc2smuNThHiQUY,2928
226
- dsp_tools/utils/request_utils.py,sha256=KxiFpQ_IH1ZCIF-SknPjRMP5-ZtLP3wWzwSrEZDB2fk,6902
235
+ dsp_tools/utils/request_utils.py,sha256=JVJCCeHTfwXZnOlmsXJL4dHHBO6_q-4JdGEC8icIOzQ,8304
227
236
  dsp_tools/utils/xml_parsing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
228
237
  dsp_tools/utils/xml_parsing/get_lookups.py,sha256=RaBX_wWTmhxpvP1Ow5lbzNxekSyZ4SbuGZTFc18H1jQ,1386
229
238
  dsp_tools/utils/xml_parsing/get_parsed_resources.py,sha256=H3lLmWcBjuW5oN2fYV_Sv71brnH6E-ZsmwsceZ2l1yw,13496
@@ -256,11 +265,11 @@ dsp_tools/xmllib/models/licenses/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
256
265
  dsp_tools/xmllib/models/licenses/other.py,sha256=3S3kaVLHhgrVVG8d9PjApa3UwI3bor_bqx5OliW_Qsw,1986
257
266
  dsp_tools/xmllib/models/licenses/recommended.py,sha256=mxMg0wYrad_7vCbbtsLk7C3JwUeTse7wT-_mpiPVCKw,3924
258
267
  dsp_tools/xmllib/models/permissions.py,sha256=6pamw3q6CNV73OoFcIBZn6YibGTsSXnMoGy6AdkZI7o,1145
259
- dsp_tools/xmllib/models/res.py,sha256=c3edvilYZVDmv2O6Z36sSkHXcuKPAJLfWVpStDTMuJM,62857
268
+ dsp_tools/xmllib/models/res.py,sha256=hUOyyS5sU7pIfFwVo5lQoK62adBgC-cYkGV9MWXWbGA,62925
260
269
  dsp_tools/xmllib/models/root.py,sha256=x8_vrDSJ1pZUJUL8LR460dZe4Cg57G_Hy-Zfr2S29dw,13562
261
270
  dsp_tools/xmllib/value_checkers.py,sha256=Yx3r6_WoZ5Lev8Orp8yDzd03JvP2GBmFNSFT2dzrycM,10712
262
271
  dsp_tools/xmllib/value_converters.py,sha256=WMYS5hd1VlrLLBXnf6pv9yYoPBsv_2MxOO6xv-QsRW4,29218
263
- dsp_tools-17.0.0.post29.dist-info/WHEEL,sha256=M6du7VZflc4UPsGphmOXHANdgk8zessdJG0DBUuoA-U,78
264
- dsp_tools-17.0.0.post29.dist-info/entry_points.txt,sha256=qjRfEbkeAwLU_AE2Q-l4Y9irPNmu4Wna-3bfRp1bqV4,62
265
- dsp_tools-17.0.0.post29.dist-info/METADATA,sha256=FF_D8B5lb2KYa5zUpFZsJBWtXM6h3N1KYK1mwB0uDgU,4285
266
- dsp_tools-17.0.0.post29.dist-info/RECORD,,
272
+ dsp_tools-18.0.0.post3.dist-info/WHEEL,sha256=5w2T7AS2mz1-rW9CNagNYWRCaB0iQqBMYLwKdlgiR4Q,78
273
+ dsp_tools-18.0.0.post3.dist-info/entry_points.txt,sha256=qjRfEbkeAwLU_AE2Q-l4Y9irPNmu4Wna-3bfRp1bqV4,62
274
+ dsp_tools-18.0.0.post3.dist-info/METADATA,sha256=8RiY5uC7bUpxmhtHLqgUI0Zgx6imVNa6iKRz12SvCto,4284
275
+ dsp_tools-18.0.0.post3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.9.5
2
+ Generator: uv 0.9.7
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,200 +0,0 @@
1
- from typing import Any
2
- from typing import Optional
3
- from typing import Union
4
-
5
- from loguru import logger
6
-
7
- from dsp_tools.cli.args import ServerCredentials
8
- from dsp_tools.clients.authentication_client_live import AuthenticationClientLive
9
- from dsp_tools.clients.connection import Connection
10
- from dsp_tools.clients.connection_live import ConnectionLive
11
- from dsp_tools.commands.project.create.project_validate import validate_project
12
- from dsp_tools.commands.project.legacy_models.listnode import ListNode
13
- from dsp_tools.commands.project.legacy_models.project import Project
14
- from dsp_tools.error.exceptions import BaseError
15
- from dsp_tools.error.exceptions import InputError
16
- from dsp_tools.utils.json_parsing import parse_json_input
17
-
18
-
19
- def create_lists_on_server(
20
- lists_to_create: list[dict[str, Any]],
21
- con: Connection,
22
- project_remote: Project,
23
- ) -> tuple[dict[str, Any], bool]:
24
- """
25
- Creates the "lists" section of a JSON project definition on a DSP server.
26
- If a list with the same name is already existing in this project on the DSP server, this list is skipped.
27
- If a node or an entire list cannot be created, an error message is printed, but the process continues.
28
-
29
- Args:
30
- lists_to_create: "lists" section of a JSON project definition
31
- con: connection to the DSP server
32
- project_remote: representation of the project on the DSP server
33
-
34
- Raises:
35
- BaseError: if one of the lists to be created already exists on the DSP server, but it has no name
36
-
37
- Returns:
38
- tuple consisting of the IRIs of the list nodes and the success status (True if everything went well)
39
- """
40
-
41
- overall_success = True
42
-
43
- # retrieve existing lists
44
- try:
45
- existing_lists = ListNode.getAllLists(con=con, project_iri=project_remote.iri)
46
- except BaseError:
47
- err_msg = "Unable to retrieve existing lists on DSP server. Cannot check if your lists are already existing."
48
- print(f"WARNING: {err_msg}")
49
- logger.exception(err_msg)
50
- existing_lists = []
51
- overall_success = False
52
-
53
- current_project_lists: dict[str, Any] = {}
54
- for new_lst in lists_to_create:
55
- if existing_lst := [x for x in existing_lists if x.project == project_remote.iri and x.name == new_lst["name"]]:
56
- existing_list_name = existing_lst[0].name
57
- if not existing_list_name:
58
- raise BaseError(f"Node {existing_lst[0]} has no name.")
59
- current_project_lists[existing_list_name] = {
60
- "id": existing_lst[0].iri,
61
- "nodes": new_lst["nodes"],
62
- }
63
- print(f" WARNING: List '{new_lst['name']}' already exists on the DSP server. Skipping...")
64
- overall_success = False
65
- continue
66
-
67
- created_list, success = _create_list_node(con=con, project=project_remote, node=new_lst)
68
- current_project_lists.update(created_list)
69
- if not success:
70
- overall_success = False
71
- print(f" Created list '{new_lst['name']}'.")
72
-
73
- return current_project_lists, overall_success
74
-
75
-
76
- def _create_list_node(
77
- con: Connection,
78
- project: Project,
79
- node: dict[str, Any],
80
- parent_node: Optional[ListNode] = None,
81
- ) -> tuple[dict[str, Any], bool]:
82
- """
83
- Creates a list node on the DSP server, recursively scanning through all its subnodes, creating them as well.
84
- If a node cannot be created, an error message is printed, but the process continues.
85
-
86
- Args:
87
- con: connection to the DSP server
88
- project: project that holds the list where this node should be added to
89
- node: the node to be created
90
- parent_node: parent node of the node to be created (optional)
91
-
92
- Returns:
93
- Returns a tuple consisting of a dict and a bool.
94
- The dict contains the IRIs of the created list nodes,
95
- nested according to their hierarchy structure,
96
- i.e. ``{nodename: {"id": IRI, "nodes": {...}}}``.
97
- The bool is True if all nodes could be created,
98
- False if any node could not be created.
99
-
100
- Raises:
101
- BaseError: if the created node has no name
102
- """
103
- new_node: ListNode = ListNode(
104
- con=con,
105
- project=project,
106
- label=node["labels"],
107
- comments=node.get("comments"),
108
- name=node["name"],
109
- parent=parent_node,
110
- )
111
- try:
112
- new_node = new_node.create()
113
- except BaseError:
114
- print(f"WARNING: Cannot create list node '{node['name']}'.")
115
- logger.exception(f"Cannot create list node '{node['name']}'.")
116
- return {}, False
117
-
118
- # if node has child nodes, call the method recursively
119
- if node.get("nodes"):
120
- overall_success = True
121
- subnode_list = []
122
- for subnode in node["nodes"]:
123
- created_subnode, success = _create_list_node(con=con, project=project, node=subnode, parent_node=new_node)
124
- subnode_list.append(created_subnode)
125
- if not success:
126
- overall_success = False
127
- if not new_node.name:
128
- raise BaseError(f"Node {new_node} has no name.")
129
- return {new_node.name: {"id": new_node.iri, "nodes": subnode_list}}, overall_success
130
- else:
131
- if not new_node.name:
132
- raise BaseError(f"Node {new_node} has no name.")
133
- return {new_node.name: {"id": new_node.iri}}, True
134
-
135
-
136
- def create_only_lists(
137
- project_file_as_path_or_parsed: Union[str, dict[str, Any]],
138
- creds: ServerCredentials,
139
- ) -> tuple[dict[str, Any], bool]:
140
- """
141
- This function accepts a JSON project definition,
142
- connects to a DSP server,
143
- and uploads the "lists" section to the server.
144
-
145
- The project must already exist on the DSP server.
146
- If a list with the same name is already existing in this project on the DSP server, this list is skipped.
147
-
148
- Args:
149
- project_file_as_path_or_parsed: path to the JSON project definition, or parsed JSON object
150
- creds: credentials to connect to the DSP server
151
-
152
- Raises:
153
- InputError:
154
- - if the project cannot be read from the server
155
- - if the connection to the DSP server cannot be established
156
-
157
- BaseError:
158
- - if the input is invalid
159
- - if a problem occurred while trying to expand the Excel files
160
- - if the JSON file is invalid according to the schema
161
-
162
- Returns:
163
- Returns a tuple consisting of a dict and a bool.
164
- The dict contains the IRIs of the created list nodes,
165
- nested according to their hierarchy structure,
166
- i.e. ``{nodename: {"id": IRI, "nodes": {...}}}``.
167
- If there are no lists in the project definition,
168
- an empty dictionary is returned.
169
- The bool indicates if everything went smoothly during the process.
170
- If a warning or error occurred (e.g. one of the lists already exists,
171
- or one of the nodes could not be created),
172
- it is False.
173
- """
174
- project_definition = parse_json_input(project_file_as_path_or_parsed=project_file_as_path_or_parsed)
175
- if not project_definition.get("project", {}).get("lists"):
176
- return {}, True
177
- validate_project(project_definition)
178
- print("JSON project file is syntactically correct and passed validation.")
179
-
180
- auth = AuthenticationClientLive(creds.server, creds.user, creds.password)
181
- con = ConnectionLive(creds.server, auth)
182
-
183
- # retrieve the project
184
- shortcode = project_definition["project"]["shortcode"]
185
- project_local = Project(con=con, shortcode=shortcode)
186
- try:
187
- project_remote = project_local.read()
188
- except BaseError:
189
- err_msg = f"Unable to create the lists: The project {shortcode} cannot be found on the DSP server."
190
- logger.exception(err_msg)
191
- raise InputError(err_msg) from None
192
-
193
- # create new lists
194
- current_project_lists, success = create_lists_on_server(
195
- lists_to_create=project_definition["project"]["lists"],
196
- con=con,
197
- project_remote=project_remote,
198
- )
199
-
200
- return current_project_lists, success