dsp-tools 17.0.0.post25__tar.gz → 17.0.0.post29__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.

Potentially problematic release.


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

Files changed (265) hide show
  1. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/PKG-INFO +1 -1
  2. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/pyproject.toml +1 -1
  3. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/cli/args.py +1 -0
  4. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/cli/call_action.py +42 -6
  5. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/cli/create_parsers.py +21 -0
  6. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/metadata_client.py +4 -4
  7. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/metadata_client_live.py +6 -5
  8. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/create_resources/upload_xml.py +4 -0
  9. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/models/input_problems.py +1 -0
  10. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/prepare_data/prepare_data.py +16 -9
  11. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/process_validation_report/get_user_validation_message.py +53 -23
  12. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validate_data.py +11 -3
  13. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/upload_config.py +1 -0
  14. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/xmlupload.py +1 -0
  15. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/exceptions.py +8 -0
  16. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/docs/index.md +0 -0
  17. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/__init__.py +0 -0
  18. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/cli/__init__.py +0 -0
  19. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/cli/entry_point.py +0 -0
  20. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/__init__.py +0 -0
  21. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/authentication_client.py +0 -0
  22. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/authentication_client_live.py +0 -0
  23. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/connection.py +0 -0
  24. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/connection_live.py +0 -0
  25. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/fuseki_metrics.py +0 -0
  26. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/legal_info_client.py +0 -0
  27. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/legal_info_client_live.py +0 -0
  28. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/ontology_client.py +0 -0
  29. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/clients/ontology_client_live.py +0 -0
  30. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/__init__.py +0 -0
  31. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/__init__.py +0 -0
  32. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/communicate_problems.py +0 -0
  33. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/constants.py +0 -0
  34. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/create_on_server/__init__.py +0 -0
  35. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/create_on_server/cardinalities.py +0 -0
  36. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/create_on_server/mappers.py +0 -0
  37. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/__init__.py +0 -0
  38. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/input_problems.py +0 -0
  39. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/parsed_ontology.py +0 -0
  40. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/parsed_project.py +0 -0
  41. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/rdf_ontology.py +0 -0
  42. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/models/server_project_info.py +0 -0
  43. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/parsing/__init__.py +0 -0
  44. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/parsing/parse_ontology.py +0 -0
  45. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/parsing/parse_project.py +0 -0
  46. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/parsing/parsing_utils.py +0 -0
  47. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/serialisation/__init__.py +0 -0
  48. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/create/serialisation/ontology.py +0 -0
  49. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/CLAUDE.md +0 -0
  50. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/__init__.py +0 -0
  51. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/json_header.py +0 -0
  52. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/__init__.py +0 -0
  53. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/compliance_checks.py +0 -0
  54. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/make_lists.py +0 -0
  55. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/models/__init__.py +0 -0
  56. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/models/deserialise.py +0 -0
  57. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/models/input_error.py +0 -0
  58. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/models/serialise.py +0 -0
  59. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/lists/utils.py +0 -0
  60. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/models/__init__.py +0 -0
  61. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/models/input_error.py +0 -0
  62. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/models/json_header.py +0 -0
  63. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/models/list_node_name.py +0 -0
  64. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/models/ontology.py +0 -0
  65. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/old_lists.py +0 -0
  66. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/project.py +0 -0
  67. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/properties.py +0 -0
  68. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/resources.py +0 -0
  69. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2json/utils.py +0 -0
  70. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2xml/__init__.py +0 -0
  71. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2xml/excel2xml_cli.py +0 -0
  72. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2xml/excel2xml_lib.py +0 -0
  73. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/excel2xml/propertyelement.py +0 -0
  74. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/id2iri.py +0 -0
  75. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/__init__.py +0 -0
  76. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/bulk_ingest_client.py +0 -0
  77. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/create_resources/__init__.py +0 -0
  78. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/create_resources/apply_ingest_id.py +0 -0
  79. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/create_resources/user_information.py +0 -0
  80. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/ingest_files/__init__.py +0 -0
  81. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/ingest_files/ingest_files.py +0 -0
  82. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/upload_files/__init__.py +0 -0
  83. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/upload_files/filechecker.py +0 -0
  84. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/upload_files/input_error.py +0 -0
  85. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/upload_files/upload_failures.py +0 -0
  86. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/ingest_xmlupload/upload_files/upload_files.py +0 -0
  87. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/__init__.py +0 -0
  88. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/__init__.py +0 -0
  89. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/parse_project.py +0 -0
  90. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/project_create_all.py +0 -0
  91. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/project_create_default_permissions.py +0 -0
  92. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/project_create_lists.py +0 -0
  93. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/project_create_ontologies.py +0 -0
  94. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/create/project_validate.py +0 -0
  95. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/get/__init__.py +0 -0
  96. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/get/get.py +0 -0
  97. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/get/get_permissions.py +0 -0
  98. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/get/get_permissions_legacy.py +0 -0
  99. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/__init__.py +0 -0
  100. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/context.py +0 -0
  101. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/group.py +0 -0
  102. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/helpers.py +0 -0
  103. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/listnode.py +0 -0
  104. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/model.py +0 -0
  105. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/ontology.py +0 -0
  106. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/project.py +0 -0
  107. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/propertyclass.py +0 -0
  108. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/resourceclass.py +0 -0
  109. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/legacy_models/user.py +0 -0
  110. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/models/__init__.py +0 -0
  111. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/models/permissions_client.py +0 -0
  112. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/models/permissions_models.py +0 -0
  113. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/project/models/project_definition.py +0 -0
  114. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/resume_xmlupload/__init__.py +0 -0
  115. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/resume_xmlupload/resume_xmlupload.py +0 -0
  116. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/start_stack.py +0 -0
  117. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/CLAUDE.md +0 -0
  118. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/__init__.py +0 -0
  119. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/api_clients.py +0 -0
  120. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/constants.py +0 -0
  121. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/mappers.py +0 -0
  122. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/models/__init__.py +0 -0
  123. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/models/api_responses.py +0 -0
  124. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/models/rdf_like_data.py +0 -0
  125. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/models/validation.py +0 -0
  126. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/prepare_data/__init__.py +0 -0
  127. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/prepare_data/get_rdf_like_data.py +0 -0
  128. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/prepare_data/make_data_graph.py +0 -0
  129. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/process_validation_report/__init__.py +0 -0
  130. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/process_validation_report/query_validation_result.py +0 -0
  131. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/process_validation_report/reformat_validation_results.py +0 -0
  132. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/shacl_cli_validator.py +0 -0
  133. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/sparql/__init__.py +0 -0
  134. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/sparql/cardinality_shacl.py +0 -0
  135. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/sparql/construct_shacl.py +0 -0
  136. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/sparql/legal_info_shacl.py +0 -0
  137. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/sparql/value_shacl.py +0 -0
  138. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/utils.py +0 -0
  139. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validation/__init__.py +0 -0
  140. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validation/check_duplicate_files.py +0 -0
  141. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validation/check_for_unknown_classes.py +0 -0
  142. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validation/get_validation_report.py +0 -0
  143. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/validate_data/validation/validate_ontology.py +0 -0
  144. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/CLAUDE.md +0 -0
  145. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/__init__.py +0 -0
  146. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/iri_resolver.py +0 -0
  147. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/__init__.py +0 -0
  148. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/constants.py +0 -0
  149. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/jsonld_utils.py +0 -0
  150. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_file_value.py +0 -0
  151. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_resource_and_values.py +0 -0
  152. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/make_rdf_graph/make_values.py +0 -0
  153. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/__init__.py +0 -0
  154. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/bitstream_info.py +0 -0
  155. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/formatted_text_value.py +0 -0
  156. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/ingest.py +0 -0
  157. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/input_problems.py +0 -0
  158. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/lookup_models.py +0 -0
  159. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/permission.py +0 -0
  160. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/permissions_parsed.py +0 -0
  161. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/processed/__init__.py +0 -0
  162. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/processed/file_values.py +0 -0
  163. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/processed/res.py +0 -0
  164. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/processed/values.py +0 -0
  165. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/rdf_models.py +0 -0
  166. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/upload_clients.py +0 -0
  167. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/models/upload_state.py +0 -0
  168. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/__init__.py +0 -0
  169. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/ark2iri.py +0 -0
  170. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/get_processed_resources.py +0 -0
  171. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/iiif_uri_validator.py +0 -0
  172. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/list_client.py +0 -0
  173. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/prepare_xml_input.py +0 -0
  174. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/read_validate_xml_file.py +0 -0
  175. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/prepare_xml_input/transform_input_values.py +0 -0
  176. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/project_client.py +0 -0
  177. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/resource_create_client.py +0 -0
  178. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/richtext_id2iri.py +0 -0
  179. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/__init__.py +0 -0
  180. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/analyse_circular_reference_graph.py +0 -0
  181. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/create_info_for_graph.py +0 -0
  182. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/graph_models.py +0 -0
  183. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/stash_circular_references.py +0 -0
  184. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/stash_models.py +0 -0
  185. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/upload_stashed_resptr_props.py +0 -0
  186. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/stash/upload_stashed_xml_texts.py +0 -0
  187. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/commands/xmlupload/write_diagnostic_info.py +0 -0
  188. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/config/__init__.py +0 -0
  189. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/config/logger_config.py +0 -0
  190. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/config/warnings_config.py +0 -0
  191. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/__init__.py +0 -0
  192. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/custom_warnings.py +0 -0
  193. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/problems.py +0 -0
  194. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/xmllib_errors.py +0 -0
  195. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/xmllib_warnings.py +0 -0
  196. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/xmllib_warnings_util.py +0 -0
  197. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/error/xsd_validation_error_msg.py +0 -0
  198. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/legacy_models/__init__.py +0 -0
  199. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/legacy_models/datetimestamp.py +0 -0
  200. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/legacy_models/langstring.py +0 -0
  201. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/legacy_models/projectContext.py +0 -0
  202. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/py.typed +0 -0
  203. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/schema/data.xsd +0 -0
  204. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/schema/lists-only.json +0 -0
  205. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/schema/project.json +0 -0
  206. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/schema/properties-only.json +0 -0
  207. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/schema/resources-only.json +0 -0
  208. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/start-stack/docker-compose.override-host.j2 +0 -0
  209. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/start-stack/docker-compose.override.yml +0 -0
  210. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/start-stack/docker-compose.yml +0 -0
  211. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/start-stack/dsp-app-config.json +0 -0
  212. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/start-stack/dsp-app-config.override-host.j2 +0 -0
  213. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/validate_data/api-shapes-resource-cardinalities.ttl +0 -0
  214. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/validate_data/api-shapes.ttl +0 -0
  215. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/validate_data/shacl-cli-image.yml +0 -0
  216. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/resources/validate_data/validate-ontology.ttl +0 -0
  217. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/__init__.py +0 -0
  218. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/ansi_colors.py +0 -0
  219. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/data_formats/__init__.py +0 -0
  220. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/data_formats/date_util.py +0 -0
  221. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/data_formats/iri_util.py +0 -0
  222. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/data_formats/shared.py +0 -0
  223. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/data_formats/uri_util.py +0 -0
  224. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/fuseki_bloating.py +0 -0
  225. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/json_parsing.py +0 -0
  226. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/rdflib_constants.py +0 -0
  227. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/rdflib_utils.py +0 -0
  228. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/replace_id_with_iri.py +0 -0
  229. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/request_utils.py +0 -0
  230. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/__init__.py +0 -0
  231. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/get_lookups.py +0 -0
  232. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/get_parsed_resources.py +0 -0
  233. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/models/__init__.py +0 -0
  234. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/models/parsed_resource.py +0 -0
  235. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/utils/xml_parsing/parse_clean_validate_xml.py +0 -0
  236. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/CLAUDE.md +0 -0
  237. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/__init__.py +0 -0
  238. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/general_functions.py +0 -0
  239. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/__init__.py +0 -0
  240. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/checkers.py +0 -0
  241. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/circumvent_circular_imports.py +0 -0
  242. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/constants.py +0 -0
  243. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/input_converters.py +0 -0
  244. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/serialise_file_value.py +0 -0
  245. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/serialise_resource.py +0 -0
  246. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/serialise_values.py +0 -0
  247. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/internal/type_aliases.py +0 -0
  248. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/__init__.py +0 -0
  249. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/config_options.py +0 -0
  250. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/date_formats.py +0 -0
  251. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/dsp_base_resources.py +0 -0
  252. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/__init__.py +0 -0
  253. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/file_values.py +0 -0
  254. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/geometry.py +0 -0
  255. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/migration_metadata.py +0 -0
  256. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/serialise_permissions.py +0 -0
  257. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/internal/values.py +0 -0
  258. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/licenses/__init__.py +0 -0
  259. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/licenses/other.py +0 -0
  260. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/licenses/recommended.py +0 -0
  261. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/permissions.py +0 -0
  262. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/res.py +0 -0
  263. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/models/root.py +0 -0
  264. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/value_checkers.py +0 -0
  265. {dsp_tools-17.0.0.post25 → dsp_tools-17.0.0.post29}/src/dsp_tools/xmllib/value_converters.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dsp-tools
3
- Version: 17.0.0.post25
3
+ Version: 17.0.0.post29
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>
@@ -2,7 +2,7 @@
2
2
 
3
3
  [project]
4
4
  name = "dsp-tools"
5
- version = "17.0.0.post25"
5
+ version = "17.0.0.post29"
6
6
  description = "DSP-TOOLS is a Python package with a command line interface that helps you interact with a DaSCH service platform (DSP) server."
7
7
  authors = [
8
8
  { name = "DaSCH - Swiss National Data and Service Center for the Humanities", email = "info@dasch.swiss" },
@@ -25,6 +25,7 @@ class ValidateDataConfig:
25
25
  ignore_duplicate_files_warning: bool
26
26
  is_on_prod_server: bool
27
27
  skip_ontology_validation: bool
28
+ do_not_request_resource_metadata_from_db: bool
28
29
 
29
30
 
30
31
  class ValidationSeverity(Enum):
@@ -31,6 +31,8 @@ from dsp_tools.commands.xmlupload.xmlupload import xmlupload
31
31
  from dsp_tools.error.exceptions import DockerNotReachableError
32
32
  from dsp_tools.error.exceptions import DspApiNotReachableError
33
33
  from dsp_tools.error.exceptions import InputError
34
+ from dsp_tools.error.exceptions import UserDirectoryNotFoundError
35
+ from dsp_tools.error.exceptions import UserFilepathNotFoundError
34
36
  from dsp_tools.utils.xml_parsing.parse_clean_validate_xml import parse_and_validate_xml_file
35
37
 
36
38
  LOCALHOST_API = "http://0.0.0.0:3333"
@@ -119,6 +121,8 @@ def _call_start_stack(args: argparse.Namespace) -> bool:
119
121
 
120
122
 
121
123
  def _call_id2iri(args: argparse.Namespace) -> bool:
124
+ _check_filepath_exists(Path(args.xmlfile))
125
+ _check_filepath_exists(Path(args.mapping))
122
126
  return id2iri(
123
127
  xml_file=args.xmlfile,
124
128
  json_file=args.mapping,
@@ -127,6 +131,7 @@ def _call_id2iri(args: argparse.Namespace) -> bool:
127
131
 
128
132
 
129
133
  def _call_excel2properties(args: argparse.Namespace) -> bool:
134
+ _check_filepath_exists(Path(args.excelfile))
130
135
  _, _, success = excel2properties(
131
136
  excelfile=args.excelfile,
132
137
  path_to_output_file=args.properties_section,
@@ -135,6 +140,7 @@ def _call_excel2properties(args: argparse.Namespace) -> bool:
135
140
 
136
141
 
137
142
  def _call_excel2resources(args: argparse.Namespace) -> bool:
143
+ _check_filepath_exists(Path(args.excelfile))
138
144
  _, _, success = excel2resources(
139
145
  excelfile=args.excelfile,
140
146
  path_to_output_file=args.resources_section,
@@ -143,6 +149,7 @@ def _call_excel2resources(args: argparse.Namespace) -> bool:
143
149
 
144
150
 
145
151
  def _call_old_excel2lists(args: argparse.Namespace) -> bool:
152
+ _check_directory_exists(Path(args.excelfolder))
146
153
  _, success = old_excel2lists(
147
154
  excelfolder=args.excelfolder,
148
155
  path_to_output_file=args.lists_section,
@@ -152,6 +159,7 @@ def _call_old_excel2lists(args: argparse.Namespace) -> bool:
152
159
 
153
160
 
154
161
  def _call_excel2lists(args: argparse.Namespace) -> bool:
162
+ _check_directory_exists(Path(args.excelfolder))
155
163
  _, success = excel2lists(
156
164
  excelfolder=args.excelfolder,
157
165
  path_to_output_file=args.lists_section,
@@ -160,6 +168,7 @@ def _call_excel2lists(args: argparse.Namespace) -> bool:
160
168
 
161
169
 
162
170
  def _call_excel2json(args: argparse.Namespace) -> bool:
171
+ _check_directory_exists(Path(args.excelfolder))
163
172
  return excel2json(
164
173
  data_model_files=args.excelfolder,
165
174
  path_to_output_file=args.project_definition,
@@ -167,6 +176,7 @@ def _call_excel2json(args: argparse.Namespace) -> bool:
167
176
 
168
177
 
169
178
  def _call_old_excel2json(args: argparse.Namespace) -> bool:
179
+ _check_directory_exists(Path(args.excelfolder))
170
180
  return old_excel2json(
171
181
  data_model_files=args.excelfolder,
172
182
  path_to_output_file=args.project_definition,
@@ -175,8 +185,10 @@ def _call_old_excel2json(args: argparse.Namespace) -> bool:
175
185
 
176
186
  def _call_upload_files(args: argparse.Namespace) -> bool:
177
187
  _check_health_with_docker_on_localhost(args.server)
188
+ xml_path = Path(args.xml_file)
189
+ _check_filepath_exists(xml_path)
178
190
  return upload_files(
179
- xml_file=Path(args.xml_file),
191
+ xml_file=xml_path,
180
192
  creds=_get_creds(args),
181
193
  imgdir=Path(args.imgdir),
182
194
  )
@@ -189,21 +201,29 @@ def _call_ingest_files(args: argparse.Namespace) -> bool:
189
201
 
190
202
  def _call_ingest_xmlupload(args: argparse.Namespace) -> bool:
191
203
  _check_health_with_docker(args.server)
204
+ xml_path = Path(args.xml_file)
205
+ _check_filepath_exists(xml_path)
192
206
  interrupt_after = args.interrupt_after if args.interrupt_after > 0 else None
193
207
  return ingest_xmlupload(
194
- xml_file=Path(args.xml_file),
208
+ xml_file=xml_path,
195
209
  creds=_get_creds(args),
196
210
  interrupt_after=interrupt_after,
197
211
  skip_validation=args.skip_validation,
198
212
  skip_ontology_validation=args.skip_ontology_validation,
199
213
  id2iri_replacement_file=args.id2iri_replacement_with_file,
214
+ do_not_request_resource_metadata_from_db=args.do_not_request_resource_metadata_from_db,
200
215
  )
201
216
 
202
217
 
203
218
  def _call_xmlupload(args: argparse.Namespace) -> bool:
204
219
  _check_health_with_docker(args.server)
220
+ xml_path = Path(args.xmlfile)
221
+ _check_filepath_exists(xml_path)
222
+ id_2_iri_file = args.id2iri_replacement_with_file
223
+ if id_2_iri_file:
224
+ _check_filepath_exists(Path(id_2_iri_file))
205
225
  if args.validate_only:
206
- success = parse_and_validate_xml_file(Path(args.xmlfile))
226
+ success = parse_and_validate_xml_file(xml_path)
207
227
  print("The XML file is syntactically correct.")
208
228
  return success
209
229
  else:
@@ -221,7 +241,7 @@ def _call_xmlupload(args: argparse.Namespace) -> bool:
221
241
  f"is not part of the allowed values: info, warning, error."
222
242
  )
223
243
  return xmlupload(
224
- input_file=Path(args.xmlfile),
244
+ input_file=xml_path,
225
245
  creds=_get_creds(args),
226
246
  imgdir=args.imgdir,
227
247
  config=UploadConfig(
@@ -231,20 +251,24 @@ def _call_xmlupload(args: argparse.Namespace) -> bool:
231
251
  ignore_duplicate_files_warning=args.ignore_duplicate_files_warning,
232
252
  validation_severity=severity,
233
253
  skip_ontology_validation=args.skip_ontology_validation,
234
- id2iri_replacement_file=args.id2iri_replacement_with_file,
254
+ do_not_request_resource_metadata_from_db=args.do_not_request_resource_metadata_from_db,
255
+ id2iri_replacement_file=id_2_iri_file,
235
256
  ),
236
257
  )
237
258
 
238
259
 
239
260
  def _call_validate_data(args: argparse.Namespace) -> bool:
240
261
  _check_health_with_docker(args.server)
262
+ xml_path = Path(args.xmlfile)
263
+ _check_filepath_exists(xml_path)
241
264
  return validate_data(
242
- filepath=Path(args.xmlfile),
265
+ filepath=xml_path,
243
266
  creds=_get_creds(args),
244
267
  save_graphs=args.save_graphs,
245
268
  ignore_duplicate_files_warning=args.ignore_duplicate_files_warning,
246
269
  skip_ontology_validation=args.skip_ontology_validation,
247
270
  id2iri_replacement_file=args.id2iri_replacement_with_file,
271
+ do_not_request_resource_metadata_from_db=args.do_not_request_resource_metadata_from_db,
248
272
  )
249
273
 
250
274
 
@@ -259,6 +283,7 @@ def _call_resume_xmlupload(args: argparse.Namespace) -> bool:
259
283
 
260
284
  def _call_get(args: argparse.Namespace) -> bool:
261
285
  _check_health_with_docker_on_localhost(args.server)
286
+ _check_directory_exists(Path(args.project_definition).parent)
262
287
  return get_project(
263
288
  project_identifier=args.project,
264
289
  outfile_path=args.project_definition,
@@ -269,6 +294,7 @@ def _call_get(args: argparse.Namespace) -> bool:
269
294
 
270
295
  def _call_create(args: argparse.Namespace) -> bool:
271
296
  _check_health_with_docker_on_localhost(args.server)
297
+ _check_filepath_exists(Path(args.project_definition))
272
298
  success = False
273
299
  match args.lists_only, args.validate_only:
274
300
  case True, True:
@@ -340,3 +366,13 @@ def _check_api_health(api_url: str) -> None:
340
366
  msg = "The DSP-API responded with a request exception. Please contact the DaSCH engineering team for help."
341
367
  logger.error(msg)
342
368
  raise DspApiNotReachableError(msg) from None
369
+
370
+
371
+ def _check_filepath_exists(file_path: Path) -> None:
372
+ if not file_path.exists():
373
+ raise UserFilepathNotFoundError(file_path)
374
+
375
+
376
+ def _check_directory_exists(dir_path: Path) -> None:
377
+ if not dir_path.is_dir():
378
+ raise UserDirectoryNotFoundError(dir_path)
@@ -242,6 +242,13 @@ def _add_ingest_xmlupload(
242
242
  "--id2iri-replacement-with-file",
243
243
  help="replaces internal IDs of an XML file by IRIs provided in this mapping file",
244
244
  )
245
+ subparser.add_argument(
246
+ "--do-not-request-resource-metadata-from-db",
247
+ action="store_true",
248
+ help=(
249
+ "Do not request IRIs of existing resources from the db (references to existing resources won't be checked)"
250
+ ),
251
+ )
245
252
 
246
253
 
247
254
  def _add_xmlupload(
@@ -279,6 +286,13 @@ def _add_xmlupload(
279
286
  help="Which severity level of validation message should be printed out",
280
287
  default="info",
281
288
  )
289
+ subparser.add_argument(
290
+ "--do-not-request-resource-metadata-from-db",
291
+ action="store_true",
292
+ help=(
293
+ "Do not request IRIs of existing resources from the db (references to existing resources won't be checked)"
294
+ ),
295
+ )
282
296
  subparser.add_argument(
283
297
  "--id2iri-replacement-with-file",
284
298
  help="replaces internal IDs of an XML file by IRIs provided in this mapping file",
@@ -309,6 +323,13 @@ def _add_validate_data(
309
323
  "--id2iri-replacement-with-file",
310
324
  help="replaces internal IDs of an XML file by IRIs provided in this mapping file",
311
325
  )
326
+ subparser.add_argument(
327
+ "--do-not-request-resource-metadata-from-db",
328
+ action="store_true",
329
+ help=(
330
+ "Do not request IRIs of existing resources from the db (references to existing resources won't be checked)"
331
+ ),
332
+ )
312
333
  subparser.add_argument(
313
334
  "--save-graphs", action="store_true", help="Save the data, onto and shacl graph as ttl files."
314
335
  )
@@ -6,9 +6,9 @@ from typing import Protocol
6
6
  from dsp_tools.clients.authentication_client import AuthenticationClient
7
7
 
8
8
 
9
- class MetadataRetrieval(Enum):
10
- SUCCESS = auto()
11
- FAILURE = auto()
9
+ class ExistingResourcesRetrieved(Enum):
10
+ TRUE = auto()
11
+ FALSE = auto()
12
12
 
13
13
 
14
14
  @dataclass
@@ -20,5 +20,5 @@ class MetadataClient(Protocol):
20
20
  server: str
21
21
  authentication_client: AuthenticationClient
22
22
 
23
- def get_resource_metadata(self, shortcode: str) -> tuple[MetadataRetrieval, list[dict[str, str]]]:
23
+ def get_resource_metadata(self, shortcode: str) -> tuple[ExistingResourcesRetrieved, list[dict[str, str]]]:
24
24
  """Get all resource metadata from one project."""
@@ -4,8 +4,8 @@ import requests
4
4
  from loguru import logger
5
5
 
6
6
  from dsp_tools.clients.authentication_client import AuthenticationClient
7
+ from dsp_tools.clients.metadata_client import ExistingResourcesRetrieved
7
8
  from dsp_tools.clients.metadata_client import MetadataClient
8
- from dsp_tools.clients.metadata_client import MetadataRetrieval
9
9
  from dsp_tools.utils.request_utils import RequestParameters
10
10
  from dsp_tools.utils.request_utils import log_request
11
11
  from dsp_tools.utils.request_utils import log_response
@@ -18,7 +18,7 @@ class MetadataClientLive(MetadataClient):
18
18
  server: str
19
19
  authentication_client: AuthenticationClient
20
20
 
21
- def get_resource_metadata(self, shortcode: str) -> tuple[MetadataRetrieval, list[dict[str, str]]]:
21
+ def get_resource_metadata(self, shortcode: str) -> tuple[ExistingResourcesRetrieved, list[dict[str, str]]]:
22
22
  url = f"{self.server}/v2/metadata/projects/{shortcode}/resources?format=JSON"
23
23
  header = {"Authorization": f"Bearer {self.authentication_client.get_token()}"}
24
24
  params = RequestParameters(method="GET", url=url, timeout=TIMEOUT, headers=header)
@@ -33,10 +33,11 @@ class MetadataClientLive(MetadataClient):
33
33
  if response.ok:
34
34
  # we log the response separately because if it was successful it will be too big
35
35
  log_response(response, include_response_content=False)
36
- return MetadataRetrieval.SUCCESS, response.json()
36
+ logger.debug(f"{len(response.json())} NUMBER OF RESOURCES RETRIEVED")
37
+ return ExistingResourcesRetrieved.TRUE, response.json()
37
38
  # here the response text is important
38
39
  log_response(response)
39
- return MetadataRetrieval.FAILURE, []
40
+ return ExistingResourcesRetrieved.FALSE, []
40
41
  except Exception as err: # noqa: BLE001 (blind exception)
41
42
  logger.error(err)
42
- return MetadataRetrieval.FAILURE, []
43
+ return ExistingResourcesRetrieved.FALSE, []
@@ -43,6 +43,7 @@ def ingest_xmlupload(
43
43
  skip_validation: bool = False,
44
44
  skip_ontology_validation: bool = False,
45
45
  id2iri_replacement_file: str | None = None,
46
+ do_not_request_resource_metadata_from_db: bool = False,
46
47
  ) -> bool:
47
48
  """
48
49
  This function reads an XML file
@@ -59,6 +60,8 @@ def ingest_xmlupload(
59
60
  skip_validation: skip the SHACL validation
60
61
  skip_ontology_validation: skip the ontology validation
61
62
  id2iri_replacement_file: to replace internal IDs of an XML file by IRIs provided in this mapping file
63
+ do_not_request_resource_metadata_from_db: if true do not request metadata information from the api
64
+ for existing resources
62
65
 
63
66
  Returns:
64
67
  True if all resources could be uploaded without errors; False if one of the resources could not be
@@ -115,6 +118,7 @@ def ingest_xmlupload(
115
118
  ignore_duplicate_files_warning=True,
116
119
  is_on_prod_server=is_on_prod_like_server,
117
120
  skip_ontology_validation=skip_ontology_validation,
121
+ do_not_request_resource_metadata_from_db=do_not_request_resource_metadata_from_db,
118
122
  ),
119
123
  auth=auth,
120
124
  )
@@ -114,5 +114,6 @@ class ProblemType(StrEnum):
114
114
  LINK_TARGET_TYPE_MISMATCH = "Linked Resource Type Mismatch"
115
115
  LINK_TARGET_OF_ANOTHER_PROJECT = "Linked Resource is from another project"
116
116
  LINK_TARGET_IS_IRI_OF_PROJECT = "Linked resource is an IRI of the project"
117
+ LINK_TARGET_NOT_FOUND_IN_DB = "Linked resource is an IRI and could not be found in the database."
117
118
  INEXISTENT_LINKED_RESOURCE = "Linked Resource does not exist"
118
119
  DUPLICATE_VALUE = "Your input is duplicated"
@@ -8,7 +8,7 @@ from rdflib import URIRef
8
8
 
9
9
  from dsp_tools.clients.authentication_client import AuthenticationClient
10
10
  from dsp_tools.clients.legal_info_client_live import LegalInfoClientLive
11
- from dsp_tools.clients.metadata_client import MetadataRetrieval
11
+ from dsp_tools.clients.metadata_client import ExistingResourcesRetrieved
12
12
  from dsp_tools.clients.metadata_client_live import MetadataClientLive
13
13
  from dsp_tools.commands.validate_data.api_clients import ListClient
14
14
  from dsp_tools.commands.validate_data.api_clients import OntologyClient
@@ -47,13 +47,16 @@ def prepare_data_for_validation_from_parsed_resource(
47
47
  permission_ids: list[str],
48
48
  auth: AuthenticationClient,
49
49
  shortcode: str,
50
- ) -> tuple[RDFGraphs, set[str], MetadataRetrieval]:
50
+ do_not_request_resource_metadata_from_db: bool,
51
+ ) -> tuple[RDFGraphs, set[str], ExistingResourcesRetrieved]:
51
52
  used_iris = {x.res_type for x in parsed_resources}
52
- proj_info, metadata_retrieval_success = _get_project_specific_information_from_api(auth, shortcode)
53
+ proj_info, existing_resources_retrieved = _get_project_specific_information_from_api(
54
+ auth, shortcode, do_not_request_resource_metadata_from_db
55
+ )
53
56
  list_lookup = _make_list_lookup(proj_info.all_lists)
54
57
  data_rdf = _make_data_graph_from_parsed_resources(parsed_resources, authorship_lookup, list_lookup)
55
58
  rdf_graphs = _create_graphs(data_rdf, shortcode, auth, proj_info, permission_ids)
56
- return rdf_graphs, used_iris, metadata_retrieval_success
59
+ return rdf_graphs, used_iris, existing_resources_retrieved
57
60
 
58
61
 
59
62
  def _make_list_lookup(project_lists: list[OneList]) -> ListLookup:
@@ -66,18 +69,22 @@ def _make_list_lookup(project_lists: list[OneList]) -> ListLookup:
66
69
 
67
70
 
68
71
  def _get_project_specific_information_from_api(
69
- auth: AuthenticationClient, shortcode: str
70
- ) -> tuple[ProjectDataFromApi, MetadataRetrieval]:
72
+ auth: AuthenticationClient, shortcode: str, do_not_request_resource_metadata_from_db: bool
73
+ ) -> tuple[ProjectDataFromApi, ExistingResourcesRetrieved]:
71
74
  list_client = ListClient(auth.server, shortcode)
72
75
  all_lists = list_client.get_lists()
73
76
  enabled_licenses = _get_license_iris(shortcode, auth)
74
- retrieval_status, formatted_metadata = _get_metadata_info(auth, shortcode)
75
- return ProjectDataFromApi(all_lists, enabled_licenses, formatted_metadata), retrieval_status
77
+ if do_not_request_resource_metadata_from_db:
78
+ existing_resources_retrieved = ExistingResourcesRetrieved.FALSE
79
+ formatted_metadata: list[InfoForResourceInDB] = []
80
+ else:
81
+ existing_resources_retrieved, formatted_metadata = _get_metadata_info(auth, shortcode)
82
+ return ProjectDataFromApi(all_lists, enabled_licenses, formatted_metadata), existing_resources_retrieved
76
83
 
77
84
 
78
85
  def _get_metadata_info(
79
86
  auth: AuthenticationClient, shortcode: str
80
- ) -> tuple[MetadataRetrieval, list[InfoForResourceInDB]]:
87
+ ) -> tuple[ExistingResourcesRetrieved, list[InfoForResourceInDB]]:
81
88
  metadata_client = MetadataClientLive(auth.server, auth)
82
89
  retrieval_status, metadata = metadata_client.get_resource_metadata(shortcode)
83
90
  formatted_metadata = [InfoForResourceInDB(x["resourceIri"], x["resourceClassIri"]) for x in metadata]
@@ -3,6 +3,7 @@ from collections import defaultdict
3
3
  import pandas as pd
4
4
 
5
5
  from dsp_tools.cli.args import ValidationSeverity
6
+ from dsp_tools.clients.metadata_client import ExistingResourcesRetrieved
6
7
  from dsp_tools.commands.validate_data.models.input_problems import AllProblems
7
8
  from dsp_tools.commands.validate_data.models.input_problems import DuplicateFileWarning
8
9
  from dsp_tools.commands.validate_data.models.input_problems import InputProblem
@@ -20,9 +21,14 @@ PROBLEM_TYPES_IGNORE_STR_ENUM_INFO = {ProblemType.GENERIC, ProblemType.FILE_VALU
20
21
 
21
22
 
22
23
  def sort_user_problems(
23
- all_problems: AllProblems, duplicate_file_warnings: DuplicateFileWarning | None, shortcode: str
24
+ all_problems: AllProblems,
25
+ duplicate_file_warnings: DuplicateFileWarning | None,
26
+ shortcode: str,
27
+ existing_resources_retrieved: ExistingResourcesRetrieved,
24
28
  ) -> SortedProblems:
25
- iris_removed, links_level_info = _separate_resource_links_to_iris_of_own_project(all_problems.problems, shortcode)
29
+ iris_removed, links_level_info = _separate_resource_links_to_iris_of_own_project(
30
+ all_problems.problems, shortcode, existing_resources_retrieved
31
+ )
26
32
  filtered_problems = _filter_out_duplicate_problems(iris_removed)
27
33
  violations, warnings, info = _separate_according_to_severity(filtered_problems)
28
34
  if duplicate_file_warnings:
@@ -47,37 +53,61 @@ def _separate_according_to_severity(
47
53
 
48
54
 
49
55
  def _separate_resource_links_to_iris_of_own_project(
50
- problems: list[InputProblem], shortcode: str
56
+ problems: list[InputProblem], shortcode: str, existing_resources_retrieved: ExistingResourcesRetrieved
51
57
  ) -> tuple[list[InputProblem], list[InputProblem]]:
52
58
  link_level_info = []
53
59
  all_others = []
54
- resource_iri_start = "http://rdfh.ch/"
55
- project_resource_iri = f"{resource_iri_start}{shortcode}/"
56
60
  for prblm in problems:
57
61
  if prblm.problem_type != ProblemType.INEXISTENT_LINKED_RESOURCE:
58
62
  all_others.append(prblm)
59
- continue
60
- if not prblm.input_value:
61
- all_others.append(prblm)
62
- elif prblm.input_value.startswith(project_resource_iri):
63
- prblm.message = (
64
- "You used an absolute IRI to reference an existing resource in the DB. "
65
- "If this resource does not exist or is not of the correct type, an xmlupload will fail."
66
- )
67
- prblm.problem_type = ProblemType.LINK_TARGET_IS_IRI_OF_PROJECT
68
- link_level_info.append(prblm)
69
- elif prblm.input_value.startswith(resource_iri_start):
70
- prblm.message = (
71
- "You used an absolute IRI to reference an existing resource of another project in the DB. "
72
- "Cross-Project resource links are not permitted."
73
- )
74
- prblm.problem_type = ProblemType.LINK_TARGET_OF_ANOTHER_PROJECT
75
- all_others.append(prblm)
76
63
  else:
77
- all_others.append(prblm)
64
+ is_violation, triaged_problem = _determined_link_value_message_and_level(
65
+ prblm, shortcode, existing_resources_retrieved
66
+ )
67
+ if is_violation:
68
+ all_others.append(triaged_problem)
69
+ else:
70
+ link_level_info.append(triaged_problem)
78
71
  return all_others, link_level_info
79
72
 
80
73
 
74
+ def _determined_link_value_message_and_level(
75
+ problem: InputProblem, shortcode: str, existing_resources_retrieved: ExistingResourcesRetrieved
76
+ ) -> tuple[bool, InputProblem]:
77
+ is_violation = True
78
+ resource_iri_start = "http://rdfh.ch/"
79
+ project_resource_iri = f"{resource_iri_start}{shortcode}/"
80
+ if not problem.input_value:
81
+ return is_violation, problem
82
+ if problem.input_value.startswith(project_resource_iri):
83
+ # case IRI and matches those of the projects itself
84
+ if existing_resources_retrieved == ExistingResourcesRetrieved.TRUE:
85
+ # if metadata was sucessfully retrieved, then the IRI is wrong
86
+ problem.problem_type = ProblemType.LINK_TARGET_NOT_FOUND_IN_DB
87
+ problem.message = (
88
+ "You used an absolute IRI to reference an existing resource in the DB. "
89
+ "We could not find a reference to this resource in the database."
90
+ )
91
+ return is_violation, problem
92
+ # if we could not retrieve the metadata, then we cannot verify if it exists or not, so it is only an info
93
+ problem.problem_type = ProblemType.LINK_TARGET_IS_IRI_OF_PROJECT
94
+ problem.message = (
95
+ "You used an absolute IRI to reference an existing resource in the DB. "
96
+ "If this resource does not exist or is not of the correct type, an xmlupload will fail."
97
+ )
98
+ return not is_violation, problem
99
+ if problem.input_value.startswith(resource_iri_start):
100
+ # case IRI, but does not contain the shortcode of the project
101
+ problem.message = (
102
+ "You used an absolute IRI to reference an existing resource of another project in the DB. "
103
+ "Cross-Project resource links are not permitted."
104
+ )
105
+ problem.problem_type = ProblemType.LINK_TARGET_OF_ANOTHER_PROJECT
106
+ return is_violation, problem
107
+ # all other cases, it is not an IRI and must be an internal ID that does not exist in the XML
108
+ return is_violation, problem
109
+
110
+
81
111
  def _filter_out_duplicate_problems(problems: list[InputProblem]) -> list[InputProblem]:
82
112
  grouped, without_res_id = _group_problems_by_resource(problems)
83
113
  filtered = without_res_id
@@ -10,6 +10,7 @@ from dsp_tools.cli.args import ValidateDataConfig
10
10
  from dsp_tools.cli.args import ValidationSeverity
11
11
  from dsp_tools.clients.authentication_client import AuthenticationClient
12
12
  from dsp_tools.clients.authentication_client_live import AuthenticationClientLive
13
+ from dsp_tools.clients.metadata_client import ExistingResourcesRetrieved
13
14
  from dsp_tools.commands.validate_data.models.input_problems import OntologyValidationProblem
14
15
  from dsp_tools.commands.validate_data.models.input_problems import SortedProblems
15
16
  from dsp_tools.commands.validate_data.models.input_problems import UnknownClassesInData
@@ -51,6 +52,7 @@ def validate_data(
51
52
  save_graphs: bool,
52
53
  skip_ontology_validation: bool,
53
54
  id2iri_replacement_file: str | None,
55
+ do_not_request_resource_metadata_from_db: bool,
54
56
  ) -> bool:
55
57
  """
56
58
  Takes a file and project information and validates it against the ontologies on the server.
@@ -62,6 +64,7 @@ def validate_data(
62
64
  save_graphs: if this flag is set, all the graphs will be saved in a folder
63
65
  skip_ontology_validation: skip the ontology validation
64
66
  id2iri_replacement_file: to replace internal IDs of an XML file by IRIs provided in this mapping file
67
+ do_not_request_resource_metadata_from_db: true if no metadata for existing resources should be requested
65
68
 
66
69
  Returns:
67
70
  True if no errors that impede an xmlupload were found.
@@ -78,6 +81,7 @@ def validate_data(
78
81
  ignore_duplicate_files_warning=ignore_duplicate_files_warning,
79
82
  is_on_prod_server=is_prod_like_server(creds.server),
80
83
  skip_ontology_validation=skip_ontology_validation,
84
+ do_not_request_resource_metadata_from_db=do_not_request_resource_metadata_from_db,
81
85
  )
82
86
  auth = AuthenticationClientLive(server=creds.server, email=creds.user, password=creds.password)
83
87
 
@@ -104,14 +108,17 @@ def validate_parsed_resources(
104
108
  config: ValidateDataConfig,
105
109
  auth: AuthenticationClient,
106
110
  ) -> bool:
107
- rdf_graphs, used_iris, _ = prepare_data_for_validation_from_parsed_resource(
111
+ rdf_graphs, used_iris, existing_resources_retrieved = prepare_data_for_validation_from_parsed_resource(
108
112
  parsed_resources=parsed_resources,
109
113
  authorship_lookup=authorship_lookup,
110
114
  permission_ids=permission_ids,
111
115
  auth=auth,
112
116
  shortcode=shortcode,
117
+ do_not_request_resource_metadata_from_db=config.do_not_request_resource_metadata_from_db,
118
+ )
119
+ validation_result = _validate_data(
120
+ rdf_graphs, used_iris, parsed_resources, config, shortcode, existing_resources_retrieved
113
121
  )
114
- validation_result = _validate_data(rdf_graphs, used_iris, parsed_resources, config, shortcode)
115
122
  if validation_result.no_problems:
116
123
  logger.debug("No validation errors found.")
117
124
  print(NO_VALIDATION_ERRORS_FOUND_MSG)
@@ -143,6 +150,7 @@ def _validate_data(
143
150
  parsed_resources: list[ParsedResource],
144
151
  config: ValidateDataConfig,
145
152
  shortcode: str,
153
+ existing_resources_retrieved: ExistingResourcesRetrieved,
146
154
  ) -> ValidateDataResult:
147
155
  logger.debug(f"Validate-data called with the following config: {vars(config)}")
148
156
  # Check if unknown classes are used
@@ -171,7 +179,7 @@ def _validate_data(
171
179
  )
172
180
  return ValidateDataResult(False, sorted_problems, report)
173
181
  reformatted = reformat_validation_graph(report)
174
- sorted_problems = sort_user_problems(reformatted, duplicate_file_warnings, shortcode)
182
+ sorted_problems = sort_user_problems(reformatted, duplicate_file_warnings, shortcode, existing_resources_retrieved)
175
183
  return ValidateDataResult(False, sorted_problems, report)
176
184
 
177
185
 
@@ -56,6 +56,7 @@ class UploadConfig:
56
56
  ignore_duplicate_files_warning: bool = False
57
57
  validation_severity: ValidationSeverity = field(default_factory=lambda: ValidationSeverity.INFO)
58
58
  id2iri_replacement_file: str | None = None
59
+ do_not_request_resource_metadata_from_db: bool = False
59
60
 
60
61
  def with_server_info(
61
62
  self,
@@ -177,6 +177,7 @@ def _handle_validation(
177
177
  ignore_duplicate_files_warning=ignore_duplicates,
178
178
  is_on_prod_server=is_on_prod_like_server,
179
179
  skip_ontology_validation=config.skip_ontology_validation,
180
+ do_not_request_resource_metadata_from_db=config.do_not_request_resource_metadata_from_db,
180
181
  ),
181
182
  auth=auth,
182
183
  )
@@ -77,6 +77,14 @@ class UserFilepathNotFoundError(InputError):
77
77
  super().__init__(msg)
78
78
 
79
79
 
80
+ class UserDirectoryNotFoundError(InputError):
81
+ """This error is raised if a directory from the user does not exist."""
82
+
83
+ def __init__(self, directory: str | Path) -> None:
84
+ msg = f"The provided directory does not exist: {directory}"
85
+ super().__init__(msg)
86
+
87
+
80
88
  class JSONFileParsingError(InputError):
81
89
  """This error should be raised if the user provided input file cannot be parsed."""
82
90