csvpath 0.0.580__tar.gz → 0.0.581__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.
Files changed (375) hide show
  1. {csvpath-0.0.580 → csvpath-0.0.581}/PKG-INFO +1 -1
  2. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/files/file_manager.py +10 -7
  3. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/files/file_metadata.py +7 -2
  4. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/files/file_registrar.py +1 -1
  5. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/files/files_listener.py +1 -1
  6. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/paths/paths_manager.py +23 -0
  7. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/paths/paths_registrar.py +4 -2
  8. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/result.py +1 -2
  9. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/line_spooler.py +85 -33
  10. {csvpath-0.0.580 → csvpath-0.0.581}/pyproject.toml +1 -1
  11. {csvpath-0.0.580 → csvpath-0.0.581}/LICENSE +0 -0
  12. {csvpath-0.0.580 → csvpath-0.0.581}/README.md +0 -0
  13. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/config.ini +0 -0
  14. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/extra-functions.imports +0 -0
  15. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/function.imports +0 -0
  16. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-local-azure.ini +0 -0
  17. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-local-filesystem-mysql.ini +0 -0
  18. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-local-gcs.ini +0 -0
  19. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-local-s3.ini +0 -0
  20. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-local-sftp.ini +0 -0
  21. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-windows-azure.ini +0 -0
  22. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-windows-gcs.ini +0 -0
  23. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-windows-local.ini +0 -0
  24. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-windows-s3.ini +0 -0
  25. {csvpath-0.0.580 → csvpath-0.0.581}/assets/config/jenkins-windows-sftp.ini +0 -0
  26. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/azure-pipeline.gopipeline.json +0 -0
  27. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/azure.sh +0 -0
  28. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/gcs-pipeline.gopipeline.json +0 -0
  29. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/gcs.sh +0 -0
  30. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/local-pipeline.gopipeline copy.json +0 -0
  31. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/local.sh +0 -0
  32. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/s3-pipeline.gopipeline.json +0 -0
  33. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/s3.sh +0 -0
  34. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/sftp-pipeline.gopipeline.json +0 -0
  35. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/mac/sftp.sh +0 -0
  36. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/azure.bat +0 -0
  37. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/gcs.bat +0 -0
  38. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/local.bat +0 -0
  39. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/s3.bat +0 -0
  40. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/sftp.bat +0 -0
  41. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/windows-azure.gopipeline.json +0 -0
  42. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/windows-gcs.gopipeline.json +0 -0
  43. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/windows-local.gopipeline.json +0 -0
  44. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/windows-s3.gopipeline.json +0 -0
  45. {csvpath-0.0.580 → csvpath-0.0.581}/assets/gocd/windows/windows-sftp.gopipeline.json +0 -0
  46. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_auto_arrival.bat +0 -0
  47. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_auto_arrival.py +0 -0
  48. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_auto_arrival.sh +0 -0
  49. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_mailbox_arrival.bat +0 -0
  50. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_mailbox_arrival.py +0 -0
  51. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sftpplus/handle_mailbox_arrival.sh +0 -0
  52. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sqlite/csvpath +0 -0
  53. {csvpath-0.0.580 → csvpath-0.0.581}/assets/integrations/sqlite/schema.sql +0 -0
  54. {csvpath-0.0.580 → csvpath-0.0.581}/config/config.ini +0 -0
  55. {csvpath-0.0.580 → csvpath-0.0.581}/config/env.json +0 -0
  56. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/__init__.py +0 -0
  57. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/__init__.py +0 -0
  58. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/asker.py +0 -0
  59. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/cli.py +0 -0
  60. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/const.py +0 -0
  61. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/debug_config.py +0 -0
  62. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/drill_down.py +0 -0
  63. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/function_describer.py +0 -0
  64. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/function_lister.py +0 -0
  65. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/cli/selecter.py +0 -0
  66. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/csvpath.py +0 -0
  67. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/csvpaths.py +0 -0
  68. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/__init__.py +0 -0
  69. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/errors/error.py +0 -0
  70. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/errors/error_collector.py +0 -0
  71. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/errors/error_comms.py +0 -0
  72. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/errors/error_manager.py +0 -0
  73. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/files/lines_and_headers_cacher.py +0 -0
  74. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ckan/ckan.py +0 -0
  75. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ckan/ckan_listener.py +0 -0
  76. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ckan/datafile.py +0 -0
  77. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ckan/dataset.py +0 -0
  78. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/event.py +0 -0
  79. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/event_result.py +0 -0
  80. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/file_listener_ol.py +0 -0
  81. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/job.py +0 -0
  82. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/ol_listener.py +0 -0
  83. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/paths_listener_ol.py +0 -0
  84. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/result_listener_ol.py +0 -0
  85. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/results_listener_ol.py +0 -0
  86. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/run.py +0 -0
  87. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/run_listener_ol.py +0 -0
  88. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/run_state.py +0 -0
  89. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/ol/sender.py +0 -0
  90. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/error_metrics.py +0 -0
  91. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/metrics.py +0 -0
  92. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_error_listener.py +0 -0
  93. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_file_listener.py +0 -0
  94. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_listener.py +0 -0
  95. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_paths_listener.py +0 -0
  96. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_result_listener.py +0 -0
  97. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/otlp/otlp_results_listener.py +0 -0
  98. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/scripts/scripts_results_listener.py +0 -0
  99. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftp/sftp_sender.py +0 -0
  100. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftpplus/arrival_handler.py +0 -0
  101. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftpplus/rpc.py +0 -0
  102. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftpplus/sftpplus_listener.py +0 -0
  103. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftpplus/transfer_creator.py +0 -0
  104. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sftpplus/transfers.py +0 -0
  105. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/slack/event.py +0 -0
  106. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/slack/sender.py +0 -0
  107. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/engine.py +0 -0
  108. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/sql_file_listener.py +0 -0
  109. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/sql_listener.py +0 -0
  110. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/sql_paths_listener.py +0 -0
  111. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/sql_result_listener.py +0 -0
  112. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/sql_results_listener.py +0 -0
  113. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/tables.py +0 -0
  114. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sql/updates.py +0 -0
  115. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sqlite/schema.sql +0 -0
  116. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sqlite/sqlite_result_listener.py +0 -0
  117. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/sqlite/sqlite_results_listener.py +0 -0
  118. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/webhook/webhook_listener.py +0 -0
  119. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/integrations/webhook/webhook_results_listener.py +0 -0
  120. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/listener.py +0 -0
  121. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/metadata.py +0 -0
  122. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/paths/paths_listener.py +0 -0
  123. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/paths/paths_metadata.py +0 -0
  124. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/registrar.py +0 -0
  125. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/readers/file_errors_reader.py +0 -0
  126. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/readers/file_lines_reader.py +0 -0
  127. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/readers/file_printouts_reader.py +0 -0
  128. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/readers/file_unmatched_reader.py +0 -0
  129. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/readers/readers.py +0 -0
  130. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/result_file_reader.py +0 -0
  131. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/result_metadata.py +0 -0
  132. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/result_registrar.py +0 -0
  133. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/result_serializer.py +0 -0
  134. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/results_manager.py +0 -0
  135. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/results_metadata.py +0 -0
  136. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/results/results_registrar.py +0 -0
  137. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/run/run_listener_stdout.py +0 -0
  138. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/run/run_metadata.py +0 -0
  139. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/run/run_registrar.py +0 -0
  140. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/managers/test_listener.py +0 -0
  141. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/__init__.py +0 -0
  142. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/__init__.py +0 -0
  143. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/args.py +0 -0
  144. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/args_helper.py +0 -0
  145. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/all.py +0 -0
  146. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/andf.py +0 -0
  147. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/any.py +0 -0
  148. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/between.py +0 -0
  149. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/empty.py +0 -0
  150. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/exists.py +0 -0
  151. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/inf.py +0 -0
  152. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/no.py +0 -0
  153. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/notf.py +0 -0
  154. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/orf.py +0 -0
  155. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/boolean/yes.py +0 -0
  156. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/count.py +0 -0
  157. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/count_bytes.py +0 -0
  158. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/count_headers.py +0 -0
  159. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/count_lines.py +0 -0
  160. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/count_scans.py +0 -0
  161. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/counter.py +0 -0
  162. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/every.py +0 -0
  163. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/has_matches.py +0 -0
  164. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/increment.py +0 -0
  165. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/tally.py +0 -0
  166. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/counting/total_lines.py +0 -0
  167. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/dates/now.py +0 -0
  168. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/dates/part.py +0 -0
  169. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/dates/roll.py +0 -0
  170. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/function.py +0 -0
  171. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/function_factory.py +0 -0
  172. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/function_finder.py +0 -0
  173. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/function_focus.py +0 -0
  174. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/append.py +0 -0
  175. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/collect.py +0 -0
  176. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/empty_stack.py +0 -0
  177. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/end.py +0 -0
  178. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/header_name.py +0 -0
  179. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/header_names_mismatch.py +0 -0
  180. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/headers.py +0 -0
  181. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/headers_stack.py +0 -0
  182. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/insert.py +0 -0
  183. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/line_before.py +0 -0
  184. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/mismatch.py +0 -0
  185. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/remove.py +0 -0
  186. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/rename.py +0 -0
  187. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/replace.py +0 -0
  188. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/headers/reset_headers.py +0 -0
  189. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/json/jsonpath.py +0 -0
  190. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/advance.py +0 -0
  191. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/after_blank.py +0 -0
  192. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/dups.py +0 -0
  193. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/first.py +0 -0
  194. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/first_line.py +0 -0
  195. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/last.py +0 -0
  196. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/lines/stop.py +0 -0
  197. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/above.py +0 -0
  198. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/add.py +0 -0
  199. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/divide.py +0 -0
  200. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/equals.py +0 -0
  201. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/intf.py +0 -0
  202. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/mod.py +0 -0
  203. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/multiply.py +0 -0
  204. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/odd.py +0 -0
  205. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/round.py +0 -0
  206. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/subtotal.py +0 -0
  207. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/subtract.py +0 -0
  208. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/math/sum.py +0 -0
  209. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/misc/fingerprint.py +0 -0
  210. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/misc/importf.py +0 -0
  211. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/misc/random.py +0 -0
  212. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/print/jinjaf.py +0 -0
  213. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/print/print_line.py +0 -0
  214. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/print/print_queue.py +0 -0
  215. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/print/printf.py +0 -0
  216. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/print/table.py +0 -0
  217. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/stats/minf.py +0 -0
  218. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/stats/nminmax.py +0 -0
  219. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/stats/percent.py +0 -0
  220. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/stats/percent_unique.py +0 -0
  221. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/stats/stdev.py +0 -0
  222. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/alter.py +0 -0
  223. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/caps.py +0 -0
  224. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/concat.py +0 -0
  225. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/contains.py +0 -0
  226. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/format.py +0 -0
  227. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/length.py +0 -0
  228. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/lower.py +0 -0
  229. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/metaphone.py +0 -0
  230. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/regex.py +0 -0
  231. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/starts_with.py +0 -0
  232. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/strip.py +0 -0
  233. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/substring.py +0 -0
  234. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/strings/upper.py +0 -0
  235. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/testing/debug.py +0 -0
  236. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/__init__.py +0 -0
  237. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/blank.py +0 -0
  238. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/boolean.py +0 -0
  239. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/datatype.py +0 -0
  240. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/datef.py +0 -0
  241. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/decimal.py +0 -0
  242. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/email.py +0 -0
  243. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/nonef.py +0 -0
  244. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/string.py +0 -0
  245. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/type.py +0 -0
  246. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/url.py +0 -0
  247. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/types/wildcard.py +0 -0
  248. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/validity/fail.py +0 -0
  249. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/validity/failed.py +0 -0
  250. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/validity/line.py +0 -0
  251. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/clear.py +0 -0
  252. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/get.py +0 -0
  253. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/index_of.py +0 -0
  254. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/pushpop.py +0 -0
  255. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/put.py +0 -0
  256. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/track.py +0 -0
  257. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/variables/variables.py +0 -0
  258. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/functions/xml/xpath.py +0 -0
  259. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/lark_parser.py +0 -0
  260. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/lark_transformer.py +0 -0
  261. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/matcher.py +0 -0
  262. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/__init__.py +0 -0
  263. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/equality.py +0 -0
  264. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/expression.py +0 -0
  265. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/header.py +0 -0
  266. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/matchable.py +0 -0
  267. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/qualified.py +0 -0
  268. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/reference.py +0 -0
  269. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/term.py +0 -0
  270. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/productions/variable.py +0 -0
  271. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/exceptions.py +0 -0
  272. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/expression_encoder.py +0 -0
  273. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/expression_utility.py +0 -0
  274. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/lark_print_parser.py +0 -0
  275. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/print_parser.py +0 -0
  276. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/matching/util/runtime_data_collector.py +0 -0
  277. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/error_mode.py +0 -0
  278. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/explain_mode.py +0 -0
  279. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/files_mode.py +0 -0
  280. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/logic_mode.py +0 -0
  281. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/mode_controller.py +0 -0
  282. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/print_mode.py +0 -0
  283. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/return_mode.py +0 -0
  284. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/run_mode.py +0 -0
  285. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/source_mode.py +0 -0
  286. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/transfer_mode.py +0 -0
  287. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/unmatched_mode.py +0 -0
  288. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/modes/validation_mode.py +0 -0
  289. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/scanning/__init__.py +0 -0
  290. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/scanning/scanner2.py +0 -0
  291. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/scanning/scanner2_parser.py +0 -0
  292. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/scanning/scanner2_transformer.py +0 -0
  293. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_data_reader.py +0 -0
  294. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_data_writer.py +0 -0
  295. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_fingerprinter.py +0 -0
  296. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_json_data_reader.py +0 -0
  297. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_nos.py +0 -0
  298. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_utils.py +0 -0
  299. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/azure/azure_xlsx_data_reader.py +0 -0
  300. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/backend_check.py +0 -0
  301. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/box.py +0 -0
  302. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/cache.py +0 -0
  303. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/caser.py +0 -0
  304. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/class_loader.py +0 -0
  305. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/code.py +0 -0
  306. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/config.py +0 -0
  307. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/config_env.py +0 -0
  308. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/config_exception.py +0 -0
  309. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/date_util.py +0 -0
  310. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/exceptions.py +0 -0
  311. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/file_info.py +0 -0
  312. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/file_readers.py +0 -0
  313. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/file_writers.py +0 -0
  314. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_data_reader.py +0 -0
  315. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_data_writer.py +0 -0
  316. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_fingerprinter.py +0 -0
  317. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_json_data_reader.py +0 -0
  318. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_nos.py +0 -0
  319. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_utils.py +0 -0
  320. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/gcs/gcs_xlsx_data_reader.py +0 -0
  321. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/hasher.py +0 -0
  322. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/http/http_data_reader.py +0 -0
  323. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/intermediary.py +0 -0
  324. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/json/json_data_reader.py +0 -0
  325. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/json/json_reader_helper.py +0 -0
  326. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/last_line_stats.py +0 -0
  327. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/line_counter.py +0 -0
  328. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/line_monitor.py +0 -0
  329. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/log_utility.py +0 -0
  330. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/metadata_parser.py +0 -0
  331. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/nos.py +0 -0
  332. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/pandas_data_reader.py +0 -0
  333. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/path_util.py +0 -0
  334. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/printer.py +0 -0
  335. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/py_file_utility.py +0 -0
  336. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/files_reference_finder_2.py +0 -0
  337. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/files_tools/fingerprint_finder.py +0 -0
  338. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/files_tools/range_finder.py +0 -0
  339. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/ref_utils.py +0 -0
  340. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_exceptions.py +0 -0
  341. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_grammar.py +0 -0
  342. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_manifest_entry_finder.py +0 -0
  343. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_parser.py +0 -0
  344. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_results.py +0 -0
  345. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/reference_transformer.py +0 -0
  346. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_reference_finder_2.py +0 -0
  347. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/data_finder.py +0 -0
  348. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/date_filter.py +0 -0
  349. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/identity_finder.py +0 -0
  350. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/path_filter.py +0 -0
  351. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/resolve_possibles.py +0 -0
  352. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/token_filters.py +0 -0
  353. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/results_tools/yesterday_or_today_translator.py +0 -0
  354. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/references/tools/date_completer.py +0 -0
  355. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/run_home_maker.py +0 -0
  356. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_data_reader.py +0 -0
  357. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_data_writer.py +0 -0
  358. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_fingerprinter.py +0 -0
  359. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_json_data_reader.py +0 -0
  360. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_nos.py +0 -0
  361. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_utils.py +0 -0
  362. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/s3/s3_xlsx_data_reader.py +0 -0
  363. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_config.py +0 -0
  364. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_data_reader.py +0 -0
  365. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_data_writer.py +0 -0
  366. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_fingerprinter.py +0 -0
  367. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_json_data_reader.py +0 -0
  368. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_nos.py +0 -0
  369. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_walk.py +0 -0
  370. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sftp/sftp_xlsx_data_reader.py +0 -0
  371. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/sqliter.py +0 -0
  372. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/template_util.py +0 -0
  373. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/var_utility.py +0 -0
  374. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/xlsx/xlsx_data_reader.py +0 -0
  375. {csvpath-0.0.580 → csvpath-0.0.581}/csvpath/util/xlsx/xlsx_reader_helper.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: csvpath
3
- Version: 0.0.580
3
+ Version: 0.0.581
4
4
  Summary: A data preboarding framework for ingesting, managing, and validating CSV, Excel, and other tabular data files using a Collect, Store, Validate, Publish architecture to create a trusted publisher for downstream data consumers.
5
5
  Author: David Kershaw
6
6
  Author-email: info@csvpath.org
@@ -387,8 +387,6 @@ class FileManager:
387
387
  #
388
388
  self.legal_name(name)
389
389
  p = Nos(self.named_files_dir).join(name)
390
- # p = os.path.join(self.named_files_dir, name)
391
- # nos = self.nos
392
390
  nos = Nos(p)
393
391
  if nos.dir_exists():
394
392
  nos.remove()
@@ -458,7 +456,8 @@ class FileManager:
458
456
  #
459
457
  def add_named_files_from_dir(
460
458
  self, dirname: str, *, name=None, template: str = None, recurse=True
461
- ):
459
+ ) -> list[str]:
460
+ ret = []
462
461
  #
463
462
  # legal_name handled at add_named_file
464
463
  #
@@ -474,7 +473,6 @@ class FileManager:
474
473
  dlist = nos.listdir(files_only=True, recurse=recurse)
475
474
  for i, _ in enumerate(dlist):
476
475
  dlist[i] = f"{nos.join(_)}"
477
-
478
476
  base = dirname
479
477
  #
480
478
  # collect all full paths that are files and have correct extensions
@@ -499,11 +497,14 @@ class FileManager:
499
497
  else:
500
498
  # path = os.path.join(base, p)
501
499
  path = Nos(base).join(p)
502
- self.add_named_file(name=n, path=path, template=template)
500
+ ref = self.add_named_file(name=n, path=path, template=template)
501
+ if ref is not None:
502
+ ret.append(ref)
503
503
  else:
504
504
  self._csvpaths.logger.debug(
505
505
  "%s is not in accept list", Nos(base).join(p)
506
506
  )
507
+ return ret
507
508
 
508
509
  def can_load(self, path: str) -> bool:
509
510
  #
@@ -533,7 +534,7 @@ class FileManager:
533
534
 
534
535
  def add_named_file(
535
536
  self, *, name: NamedFileName, path: str, template: str = None
536
- ) -> None:
537
+ ) -> str | None:
537
538
  self.csvpaths.logger.info("Adding named file %s from %s", name, path)
538
539
  if not self.can_load(path):
539
540
  #
@@ -607,8 +608,11 @@ class FileManager:
607
608
  name_home = self.named_file_home(name)
608
609
  rpath, h = self._fingerprint(home)
609
610
  self.csvpaths.logger.debug("Fingerprint of %s: %s", path, h)
611
+ ret = f"${name}.files.{h}"
612
+ self.csvpaths.logger.debug("Reference to named-file: %s", ret)
610
613
  mdata = FileMetadata(self.csvpaths.config)
611
614
  mdata.named_file_name = name
615
+ mdata.named_file_ref = ret
612
616
  #
613
617
  # we need the declared path, incl. any extra path info, in order
614
618
  # to know if we are being pointed at a sub-portion of the data, e.g.
@@ -634,7 +638,6 @@ class FileManager:
634
638
  # the fingerprint is the most precise way of referencing a particular
635
639
  # named-file version.
636
640
  #
637
- ret = f"${name}.files.{h}"
638
641
  self.csvpaths.logger.debug("Registered %s", ret)
639
642
  return ret
640
643
  except Exception as ex:
@@ -22,6 +22,11 @@ class FileMetadata(Metadata):
22
22
  self.mark: str = None
23
23
  # like csv
24
24
  self.type: str = None
25
- self.file_size = 0
25
+ self.file_size: int = 0
26
26
  self.template: str = None
27
- self.fingerprint = None
27
+ self.fingerprint: str = None
28
+ #
29
+ # named_file_ref is the most specific reference possible it is
30
+ # in the form $name.files.fingerprint
31
+ #
32
+ self.named_file_ref: str = None
@@ -38,7 +38,6 @@ class FileRegistrar(Registrar, Listener):
38
38
  if nos.physical_dirs() and not nos.dir_exists():
39
39
  raise InputException(f"Named file home does not exist: {home}")
40
40
  mf = Nos(home).join("manifest.json")
41
- # mf = os.path.join(home, "manifest.json")
42
41
  nos.path = mf
43
42
  if not nos.exists():
44
43
  self.intermediary.put_json(mf, [])
@@ -124,6 +123,7 @@ class FileRegistrar(Registrar, Listener):
124
123
  manifest_path = mdata.manifest_path
125
124
  mani = {}
126
125
  mani["type"] = t
126
+ mani["reference"] = mdata.named_file_ref
127
127
  mani["file"] = rpath
128
128
  mani["file_home"] = mdata.file_home
129
129
  mani["fingerprint"] = h
@@ -33,7 +33,6 @@ class FilesListener(Listener): # Registrar,
33
33
  def manifest_path(self) -> str:
34
34
  root = self.config.get(section="inputs", name="files")
35
35
  mf = Nos(root).join("manifest.json")
36
- # mf = os.path.join(root, "manifest.json")
37
36
  if not Nos(mf).exists():
38
37
  with DataFileWriter(path=mf, mode="w") as writer:
39
38
  writer.append("[]")
@@ -63,6 +62,7 @@ class FilesListener(Listener): # Registrar,
63
62
  mani["named_file_name"] = mdata.named_file_name
64
63
  mani["origin_path"] = mdata.origin_path
65
64
  mani["fingerprint"] = mdata.fingerprint
65
+ mani["reference"] = mdata.named_file_ref
66
66
  mani["file_path"] = mdata.file_path
67
67
  mani["file_home"] = mdata.file_home
68
68
  mani["file_name"] = mdata.file_name
@@ -412,6 +412,29 @@ class PathsManager:
412
412
  self.csvpaths.logger.debug("Adding %s to %s", _, name)
413
413
  s = self._str_from_list(paths)
414
414
  group_file_path = self._copy_in(name, s, append=append)
415
+ #
416
+ # capture the fingerprint here before/as soon as we write the bytes
417
+ #
418
+ # self.registrar._fingerprint(s)
419
+ #
420
+ # we should capture the fingerprint here. the way we do it today, we
421
+ # have Hasher read the file. However, that opens up a race condition. may
422
+ # not be likely, but we could have a conflict. there are a few problems.
423
+ # for local files we can use the same Hasher code by writing a temp file
424
+ # and hashing that. non-local files are harder because we don't know for
425
+ # 100% certain that the same bytes will result in the same hash if we do
426
+ # the hashing ourselves vs get it from the backend. given that non-local
427
+ # backends are inherently performance challenged we would prefer to not
428
+ # push even the relatively small group files back and forth to check that
429
+ # they haven't changed. however, since we can see the point in time where
430
+ # an updated happened to compare it to the point in time when a run
431
+ # happened we can make a good guess if we have a race and analyze
432
+ # accordingly. not perfect, but also not a complete information gap, so
433
+ # this is probably good enough for now.
434
+ #
435
+ # h = Hasher().hash(s)
436
+ #
437
+
415
438
  #
416
439
  # the paths have to be reacquired because we might be appending.
417
440
  #
@@ -120,7 +120,6 @@ class PathsRegistrar(Registrar, Listener):
120
120
  def manifest_path(self, name: str) -> None:
121
121
  nhome = self.manager.named_paths_home(name)
122
122
  mf = Nos(nhome).join("manifest.json")
123
- # mf = os.path.join(nhome, "manifest.json")
124
123
  if not Nos(mf).exists():
125
124
  self.intermediary.put_json(mf, [])
126
125
  return mf
@@ -141,10 +140,13 @@ class PathsRegistrar(Registrar, Listener):
141
140
  return sname
142
141
 
143
142
  def _fingerprint(self, *, name=None, group_file_path=None) -> str:
143
+ #
144
+ # in a more perfect world this fingerprint would be generated at the time
145
+ # we write the group file bytes. as is looks like a fairly large race condition.
146
+ #
144
147
  if group_file_path is None and name is not None:
145
148
  home = self.manager.named_paths_home(name)
146
149
  group_file_path = Nos(home).join("group.csvpaths")
147
- # group_file_path = os.path.join(home, "group.csvpaths")
148
150
  elif group_file_path is None and name is None:
149
151
  raise InputException(
150
152
  "Either the named-paths name or the path to the group file must be provided"
@@ -198,14 +198,13 @@ class Result(ErrorCollector, Printer, Listener): # pylint: disable=R0902
198
198
  def manifest(self) -> dict:
199
199
  p = self.instance_dir
200
200
  p = Nos(p).join("manifest.json")
201
- # p = os.path.join(p, "manifest.json")
202
201
  with DataFileReader(p) as reader:
203
202
  return json.load(reader.source)
204
203
 
205
204
  @property
206
205
  def identity_or_index(self) -> str:
207
206
  s = self._csvpath.identity
208
- if f"{s}".strip() == "":
207
+ if s is None or f"{s}".strip() == "":
209
208
  s = self.run_index
210
209
  return s
211
210
 
@@ -2,8 +2,10 @@ import os
2
2
  import csv
3
3
  import json
4
4
  import boto3
5
+ import logging
5
6
  from pathlib import Path
6
7
  from abc import ABC, abstractmethod
8
+
7
9
  from .exceptions import InputException
8
10
  from .file_readers import DataFileReader
9
11
  from .file_writers import DataFileWriter
@@ -14,7 +16,7 @@ from .path_util import PathUtility as pathu
14
16
 
15
17
  class LineSpooler(ABC):
16
18
  def __init__(self, myresult) -> None:
17
- self.result = myresult if myresult is not None else None
19
+ self.result = myresult
18
20
  self.sink = None
19
21
  self._count = 0
20
22
  self.closed = False
@@ -60,13 +62,26 @@ class ListLineSpooler(LineSpooler):
60
62
 
61
63
 
62
64
  class CsvLineSpooler(LineSpooler):
63
- def __init__(self, myresult) -> None:
65
+ def __init__(
66
+ self,
67
+ myresult,
68
+ *,
69
+ path: str = None,
70
+ logger: logging.Logger = None,
71
+ delimiter: str = ",",
72
+ quotechar: str = '"',
73
+ ) -> None:
64
74
  super().__init__(myresult)
65
- self._path = None
75
+ self._path = path
66
76
  self.writer = None
77
+ self._logger = logger
78
+ self._delimiter = delimiter
79
+ self._quotechar = quotechar
67
80
 
68
81
  @property
69
82
  def path(self) -> str:
83
+ if self._path is None:
84
+ self._instance_data_file_path()
70
85
  return self._path
71
86
 
72
87
  @path.setter
@@ -74,14 +89,40 @@ class CsvLineSpooler(LineSpooler):
74
89
  p = pathu.resep(p)
75
90
  self._path = p
76
91
 
92
+ @property
93
+ def logger(self) -> logging.Logger:
94
+ if self._logger:
95
+ return self._logger
96
+ if self.result is not None and self.result.csvpath is not None:
97
+ return self.result.csvpath.logger
98
+ return logging.getLogger(self.__class__.__name__)
99
+
100
+ @property
101
+ def delimiter(self) -> str:
102
+ if self._delimiter is not None:
103
+ return self._delimiter
104
+ if self.result is not None and self.result.csvpath is not None:
105
+ return self.result.csvpath.delimiter
106
+ else:
107
+ self.logger.error("No delimiter available")
108
+
109
+ @property
110
+ def quotechar(self) -> str:
111
+ if self._quotechar is not None:
112
+ return self._quotechar
113
+ if self.result is not None and self.result.csvpath is not None:
114
+ return self.result.csvpath.quotechar
115
+ else:
116
+ self.logger.error("No quotechar available")
117
+
77
118
  def __iter__(self):
78
119
  return self
79
120
 
80
121
  def to_list(self) -> list[str]:
81
- if self.path is None:
82
- self._instance_data_file_path()
83
- if Nos(self.path).exists() is False:
84
- self.result.csvpath.logger.debug(
122
+ if not self.path:
123
+ return []
124
+ if self.path is not None and Nos(self.path).exists() is False:
125
+ self.logger.debug(
85
126
  "There is no data.csv at %s. This may or may not be a problem.",
86
127
  self.path,
87
128
  )
@@ -90,15 +131,15 @@ class CsvLineSpooler(LineSpooler):
90
131
  for line in DataFileReader(
91
132
  self.path,
92
133
  filetype="csv",
93
- delimiter=self.result.csvpath.delimiter,
94
- quotechar=self.result.csvpath.quotechar,
134
+ delimiter=self.delimiter,
135
+ quotechar=self.quotechar,
95
136
  ).next():
96
137
  lst.append(line)
97
138
  return lst
98
139
 
99
140
  def __len__(self) -> int:
100
141
  if self._count is None or self._count <= 0:
101
- if self.result is not None and self.result.instance_dir:
142
+ if self.result is not None and self.result.instance_dir is not None:
102
143
  d = Nos(self.result.instance_dir).join("meta.json")
103
144
  if Nos(d).exists() is True:
104
145
  with DataFileReader(d) as file:
@@ -108,9 +149,10 @@ class CsvLineSpooler(LineSpooler):
108
149
  return self._count
109
150
 
110
151
  def load_if(self) -> None:
111
- p = self._instance_data_file_path()
112
- if p is not None:
113
- self.sink = self._open_file(p)
152
+ if self.path is None:
153
+ ...
154
+ else:
155
+ self.sink = self._open_file(self.path)
114
156
  self.writer = csv.writer(self.sink)
115
157
 
116
158
  def _open_file(self, path: str):
@@ -119,10 +161,10 @@ class CsvLineSpooler(LineSpooler):
119
161
  return dw.sink
120
162
 
121
163
  def next(self):
122
- if self.path is None:
123
- self._instance_data_file_path()
164
+ if not self.path:
165
+ ...
124
166
  if Nos(self.path).exists() is False:
125
- self.result.csvpath.logger.debug(
167
+ self.logger.debug(
126
168
  "There is no data.csv at %s. This may or may not be a problem.",
127
169
  self.path,
128
170
  )
@@ -130,31 +172,35 @@ class CsvLineSpooler(LineSpooler):
130
172
  for line in DataFileReader(
131
173
  self.path,
132
174
  filetype="csv",
133
- delimiter=self.result.csvpath.delimiter,
134
- quotechar=self.result.csvpath.quotechar,
175
+ delimiter=self.delimiter,
176
+ quotechar=self.quotechar,
135
177
  ).next():
136
178
  yield line
137
179
 
138
180
  def _warn_if(self) -> None:
139
- if self.result is not None and self.result.csvpath:
140
- self.result.csvpath.logger.warning(
141
- "CsvLineSpooler cannot find instance_data_file_path yet within %s",
181
+ if self.result is not None and self.result.csvpath is not None:
182
+ self.logger.warning(
183
+ "CsvLineSpooler cannot find data file path yet within %s",
142
184
  self.result.run_dir,
143
185
  )
186
+ else:
187
+ self.logger.warning("No path available")
144
188
 
145
189
  def _instance_data_file_path(self):
190
+ if self._path is not None:
191
+ return
146
192
  if self.result is None:
147
193
  self._warn_if()
148
- return None
194
+ return
149
195
  if self.result.csvpath is None:
150
196
  self._warn_if()
151
- return None
197
+ return
152
198
  if self.result.csvpath.scanner is None:
153
199
  self._warn_if()
154
- return None
200
+ return
155
201
  if self.result.csvpath.scanner.filename is None:
156
202
  self._warn_if()
157
- return None
203
+ return
158
204
  #
159
205
  # data file could be not there. we can in principle make sure that doesn't happen.
160
206
  # if we did, tho, we would need to be sure we don't create the dir so early that
@@ -162,21 +208,23 @@ class CsvLineSpooler(LineSpooler):
162
208
  # one case. leave the concern about the existence of the path aside for now.
163
209
  #
164
210
  self.path = self.result.data_file_path
165
- return self.path
166
211
 
167
212
  def append(self, line) -> None:
168
213
  if not self.writer:
169
214
  self.load_if()
170
215
  if not self.writer:
171
- raise InputException(f"Cannot write to data file for {self.result}")
216
+ msg = None
217
+ if self.result:
218
+ msg = f"Cannot write to data file for {self.result}"
219
+ else:
220
+ msg = f"Cannot write to {self.path}"
221
+ raise InputException(msg)
172
222
  self.writer.writerows([line])
173
223
  self._count += 1
174
224
 
175
225
  def bytes_written(self) -> int:
176
- p = self._instance_data_file_path()
177
- # there may be no file if we're on/before line 0 of the data.csv. that is Ok.
178
226
  try:
179
- i = FileInfo.info(p)
227
+ i = FileInfo.info(self.path)
180
228
  if i and "bytes" in i:
181
229
  return i["bytes"]
182
230
  else:
@@ -194,9 +242,13 @@ class CsvLineSpooler(LineSpooler):
194
242
  # drop the sink so no chance for recurse
195
243
  self.sink = None
196
244
  try:
197
- c = self.csvpath if self.csvpath else self.csvpaths
198
- c.error_manager.handle_error(source=self, msg=f"{ex}")
245
+ if self.csvpath:
246
+ self.csvpath.error_manager.handle_error(source=self, msg=f"{ex}")
247
+ elif self.csvpaths:
248
+ self.csvpaths.error_manager.handle_error(source=self, msg=f"{ex}")
249
+ else:
250
+ self.logger.error(str(ex))
199
251
  except Exception as e:
200
- self.result.csvpath.logger.error(
252
+ self.logger.error(
201
253
  f"Caught {e}. Not raising an exception because closing."
202
254
  )
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "csvpath"
3
- version = "0.0.580"
3
+ version = "0.0.581"
4
4
  description = "A data preboarding framework for ingesting, managing, and validating CSV, Excel, and other tabular data files using a Collect, Store, Validate, Publish architecture to create a trusted publisher for downstream data consumers."
5
5
  authors = ["David Kershaw <info@csvpath.org>"]
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes