csvpath 0.0.511__tar.gz → 0.0.513__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.
- {csvpath-0.0.511 → csvpath-0.0.513}/PKG-INFO +8 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/README.md +4 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/config/config.ini +1 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/cli/cli.py +30 -23
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/cli/drill_down.py +60 -22
- csvpath-0.0.513/csvpath/cli/error.py +61 -0
- csvpath-0.0.513/csvpath/cli/select.py +68 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/csvpath.py +159 -105
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/csvpaths.py +113 -56
- csvpath-0.0.513/csvpath/managers/errors/error.py +165 -0
- csvpath-0.0.513/csvpath/managers/errors/error_collector.py +60 -0
- csvpath-0.0.513/csvpath/managers/errors/error_comms.py +60 -0
- csvpath-0.0.513/csvpath/managers/errors/error_manager.py +226 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/files/file_manager.py +14 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/files/file_registrar.py +4 -2
- csvpath-0.0.513/csvpath/managers/integrations/otlp/error_metrics.py +29 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/otlp/metrics.py +1 -1
- csvpath-0.0.513/csvpath/managers/integrations/otlp/otlp_error_listener.py +68 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/otlp/otlp_result_listener.py +6 -4
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/otlp/otlp_results_listener.py +5 -5
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftpplus/arrival_handler.py +5 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftpplus/rpc.py +0 -20
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftpplus/sftpplus_listener.py +39 -10
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/listener.py +4 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/metadata.py +3 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/paths/paths_manager.py +81 -13
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/paths/paths_registrar.py +4 -2
- csvpath-0.0.513/csvpath/managers/registrar.py +83 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/readers/file_errors_reader.py +1 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/readers/readers.py +1 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/result.py +24 -6
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/result_registrar.py +4 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/results_manager.py +57 -13
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/results_registrar.py +4 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/run/run_registrar.py +4 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/args.py +85 -70
- csvpath-0.0.513/csvpath/matching/functions/args_helper.py +241 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/any.py +4 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/empty.py +8 -6
- csvpath-0.0.513/csvpath/matching/functions/boolean/orf.py +86 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/counter.py +15 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/every.py +11 -4
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/tally.py +9 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/function.py +102 -101
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/function_factory.py +13 -4
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/replace.py +12 -6
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/advance.py +12 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/first_line.py +9 -4
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/stop.py +4 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/above.py +2 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/add.py +13 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/divide.py +4 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/equals.py +2 -0
- csvpath-0.0.513/csvpath/matching/functions/math/intf.py +59 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/multiply.py +4 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/round.py +22 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/subtotal.py +1 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/subtract.py +4 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/misc/fingerprint.py +5 -5
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/misc/importf.py +20 -6
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/misc/random.py +25 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/print/printf.py +21 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/stats/minf.py +1 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/stats/percent.py +5 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/concat.py +2 -2
- csvpath-0.0.513/csvpath/matching/functions/strings/contains.py +54 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/regex.py +10 -3
- csvpath-0.0.513/csvpath/matching/functions/strings/starts_with.py +49 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/types/__init__.py +2 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/types/boolean.py +15 -6
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/types/datef.py +30 -42
- csvpath-0.0.513/csvpath/matching/functions/types/decimal.py +138 -0
- csvpath-0.0.513/csvpath/matching/functions/types/email.py +42 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/types/nonef.py +14 -13
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/types/string.py +16 -22
- csvpath-0.0.513/csvpath/matching/functions/types/type.py +10 -0
- csvpath-0.0.513/csvpath/matching/functions/types/url.py +40 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/validity/failed.py +4 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/validity/line.py +77 -73
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/lark_parser.py +6 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/matcher.py +56 -28
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/equality.py +56 -49
- csvpath-0.0.513/csvpath/matching/productions/expression.py +106 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/matchable.py +13 -56
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/qualified.py +20 -3
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/reference.py +27 -13
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/variable.py +3 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/expression_utility.py +60 -30
- csvpath-0.0.513/csvpath/modes/error_mode.py +25 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/mode_controller.py +4 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/validation_mode.py +16 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/parsetab.py +7 -7
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/config.py +37 -15
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/file_info.py +0 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/file_readers.py +2 -18
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/file_writers.py +2 -2
- csvpath-0.0.513/csvpath/util/hasher.py +48 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/line_monitor.py +2 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/line_spooler.py +3 -13
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/log_utility.py +1 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/s3/s3_data_reader.py +4 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/s3/s3_xlsx_data_reader.py +2 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/var_utility.py +2 -0
- csvpath-0.0.513/docs/functions/contains.md +26 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/counter.md +1 -1
- csvpath-0.0.513/docs/functions/email.md +41 -0
- csvpath-0.0.513/docs/functions/equal.md +34 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/fingerprint.md +2 -2
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/intf.md +1 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/line.md +12 -12
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/max.md +1 -1
- csvpath-0.0.513/docs/functions/print.md +92 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/replace.md +3 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/reset_headers.md +1 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/stop.md +6 -1
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/string_functions.md +6 -1
- csvpath-0.0.513/docs/functions/types.md +84 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions.md +20 -8
- csvpath-0.0.513/docs/images/opentelemetry.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/pyproject.toml +4 -3
- csvpath-0.0.511/csvpath/managers/registrar.py +0 -50
- csvpath-0.0.511/csvpath/matching/functions/boolean/orf.py +0 -57
- csvpath-0.0.511/csvpath/matching/functions/math/intf.py +0 -141
- csvpath-0.0.511/csvpath/matching/functions/strings/starts_with.py +0 -27
- csvpath-0.0.511/csvpath/matching/functions/types/decimal.py +0 -99
- csvpath-0.0.511/csvpath/matching/functions/types/type.py +0 -14
- csvpath-0.0.511/csvpath/matching/productions/expression.py +0 -107
- csvpath-0.0.511/csvpath/util/error.py +0 -330
- csvpath-0.0.511/docs/functions/print.md +0 -66
- csvpath-0.0.511/docs/functions/types.md +0 -48
- {csvpath-0.0.511 → csvpath-0.0.513}/LICENSE +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/cli/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/files/file_cacher.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/files/file_metadata.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ckan/ckan.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ckan/ckan_listener.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ckan/datafile.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ckan/dataset.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/event.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/event_result.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/file_listener_ol.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/job.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/ol_listener.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/paths_listener_ol.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/result_listener_ol.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/results_listener_ol.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/run.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/run_listener_ol.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/run_state.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/ol/sender.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/otlp/otlp_listener.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftp/sftp_sender.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftpplus/transfer_creator.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/sftpplus/transfers.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/slack/event.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/integrations/slack/sender.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/paths/paths_metadata.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/readers/file_lines_reader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/readers/file_printouts_reader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/readers/file_unmatched_reader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/result_file_reader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/result_metadata.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/result_serializer.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/results/results_metadata.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/run/run_listener_stdout.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/managers/run/run_metadata.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/all.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/andf.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/between.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/exists.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/inf.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/no.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/notf.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/boolean/yes.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/count.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/count_bytes.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/count_headers.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/count_lines.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/count_scans.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/has_matches.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/increment.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/counting/total_lines.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/dates/now.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/function_finder.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/function_focus.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/append.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/collect.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/empty_stack.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/end.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/header_name.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/header_names_mismatch.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/headers.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/mismatch.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/headers/reset_headers.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/after_blank.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/dups.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/first.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/lines/last.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/mod.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/math/sum.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/print/jinjaf.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/print/print_line.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/print/print_queue.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/print/table.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/stats/percent_unique.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/stats/stdev.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/length.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/lower.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/metaphone.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/strip.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/substring.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/strings/upper.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/testing/debug.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/validity/fail.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/variables/get.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/variables/pushpop.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/variables/put.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/variables/track.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/functions/variables/variables.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/lark_transformer.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/header.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/productions/term.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/exceptions.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/expression_encoder.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/lark_print_parser.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/print_parser.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/matching/util/runtime_data_collector.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/explain_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/files_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/logic_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/print_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/return_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/run_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/source_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/transfer_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/modes/unmatched_mode.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/__init__.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/exceptions.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/parser.out +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/scanner.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/scanning/scanning_lexer.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/box.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/cache.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/class_loader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/config_exception.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/exceptions.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/last_line_stats.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/line_counter.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/metadata_parser.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/nos.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/pandas_data_reader.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/printer.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/reference_parser.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/s3/s3_data_writer.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/s3/s3_fingerprinter.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/csvpath/util/s3/s3_utils.py +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/asbool.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/assignment.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/comments.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/config.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/examples.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/files.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/above.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/advance.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/after_blank.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/all.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/andor.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/any.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/average.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/between.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/collect.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/correlate.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/count.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/count_bytes.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/count_headers.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/date.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/empty.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/empty_stack.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/end.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/every.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/fail.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/first.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/get.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/has_dups.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/has_matches.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/header.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/header_name.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/header_names_mismatch.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/implementing_functions.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/import.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/in.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/increment.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/jinja.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/last.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/line_number.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/metaphone.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/mismatch.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/no.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/not.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/now.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/percent_unique.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/pop.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/print_line.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/print_queue.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/random.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/regex.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/stdev.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/subtotal.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/subtract.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/sum.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/tally.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/total_lines.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/track.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/variables.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/functions/variables_and_headers.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/grammar.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/headers.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/ckan-logo-sm.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/csvpath-icon-sm.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/csvpath-logo-wordmark-tight-2.svg +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/logo-wordmark-3.svg +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/logo-wordmark-4.svg +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/logo-wordmark-white-on-black-trimmed-padded.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/logo-wordmark-white-trimmed.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/marquez-logo-sm.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/images/openlineage-logo-sm.png +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/paths.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/printing.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/qualifiers.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/references.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/terms.md +0 -0
- {csvpath-0.0.511 → csvpath-0.0.513}/docs/variables.md +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: csvpath
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.513
|
|
4
4
|
Summary: An edge governance framework for managing and validating CSV, Excel, and other tabular data files
|
|
5
5
|
Author: David Kershaw
|
|
6
6
|
Author-email: dk107dk@hotmail.com
|
|
@@ -24,8 +24,8 @@ Classifier: Topic :: Text Processing
|
|
|
24
24
|
Classifier: Topic :: Utilities
|
|
25
25
|
Provides-Extra: pandas
|
|
26
26
|
Requires-Dist: boto3 (>=1.35.91,<2.0.0)
|
|
27
|
-
Requires-Dist: bullet (>=2.2.0,<3.0.0)
|
|
28
27
|
Requires-Dist: ckanapi (>=4.8,<5.0)
|
|
28
|
+
Requires-Dist: email-validator (>=2.2.0,<3.0.0)
|
|
29
29
|
Requires-Dist: inflect (>=7.4.0,<8.0.0)
|
|
30
30
|
Requires-Dist: jinja2 (>=3.1.4,<4.0.0)
|
|
31
31
|
Requires-Dist: lark (>=1.2.2,<2.0.0)
|
|
@@ -35,6 +35,7 @@ Requires-Dist: openlineage-python (>=1.25.0,<2.0.0)
|
|
|
35
35
|
Requires-Dist: opentelemetry-distro[otlp] (>=0.50b0,<0.51)
|
|
36
36
|
Requires-Dist: paramiko (>=3.5.0,<4.0.0)
|
|
37
37
|
Requires-Dist: ply (>=3.11,<4.0)
|
|
38
|
+
Requires-Dist: prompt-toolkit (>=3.0.50,<4.0.0)
|
|
38
39
|
Requires-Dist: pylightxl (>=1.61,<2.0)
|
|
39
40
|
Requires-Dist: pytest (>=8.3.3,<9.0.0)
|
|
40
41
|
Requires-Dist: python-dateutil (>=2.9.0.post0,<3.0.0)
|
|
@@ -42,6 +43,7 @@ Requires-Dist: pytz (>=2024.2,<2025.0)
|
|
|
42
43
|
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
43
44
|
Requires-Dist: smart-open (>=7.1.0,<8.0.0)
|
|
44
45
|
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
|
|
46
|
+
Requires-Dist: validators (>=0.34.0,<0.35.0)
|
|
45
47
|
Project-URL: Csvpath.org, https://www.csvpath.org
|
|
46
48
|
Project-URL: Github, https://github.com/csvpath/csvpath.git
|
|
47
49
|
Description-Content-Type: text/markdown
|
|
@@ -72,6 +74,9 @@ CsvPath can stream lineage events to an OpenLineage server, such as the open sou
|
|
|
72
74
|
<a href='https://peppy-sprite-186812.netlify.app/' >
|
|
73
75
|
<img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/marquez-logo-sm.png" alt="Marquez Server"/></a>
|
|
74
76
|
|
|
77
|
+
DataOps demands observability! Pipe CsvPath events through OpenTelemetry to your APM or observability platform. Read about <a href='https://www.csvpath.org/getting-started/integrations/getting-started-with-csvpath-+-opentelemetry' target="_blank">how to get started here</a>, with an example using Grafana.
|
|
78
|
+
<br/><img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/opentelemetry.png" alt="OpenTelemetry Logo"/>
|
|
79
|
+
|
|
75
80
|
Need to publish validated datasets to a CKAN data portal? <a href="https://www.csvpath.org/getting-started/getting-started-with-csvpath-+-ckan" target="_blank">Read about how CsvPath is integrated with CKAN</a>.
|
|
76
81
|
<a href="https://ckan.org/" target="_blank"><img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/ckan-logo-sm.png" alt="CKAN Data Portal"/></a>
|
|
77
82
|
|
|
@@ -125,7 +130,7 @@ CsvPath's goal is to make simple validations almost trivial and more complex sit
|
|
|
125
130
|
<a name="install"></a>
|
|
126
131
|
# Install
|
|
127
132
|
|
|
128
|
-
<a href='https://pypi.org/project/csvpath/'>CsvPath is available on PyPi</a>. Install with
|
|
133
|
+
<a href='https://pypi.org/project/csvpath/'>CsvPath is available on PyPi</a>. It has been tested on 3.10, 3.11 and 3.13. Install with
|
|
129
134
|
```
|
|
130
135
|
pip install csvpath
|
|
131
136
|
```
|
|
@@ -24,6 +24,9 @@ CsvPath can stream lineage events to an OpenLineage server, such as the open sou
|
|
|
24
24
|
<a href='https://peppy-sprite-186812.netlify.app/' >
|
|
25
25
|
<img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/marquez-logo-sm.png" alt="Marquez Server"/></a>
|
|
26
26
|
|
|
27
|
+
DataOps demands observability! Pipe CsvPath events through OpenTelemetry to your APM or observability platform. Read about <a href='https://www.csvpath.org/getting-started/integrations/getting-started-with-csvpath-+-opentelemetry' target="_blank">how to get started here</a>, with an example using Grafana.
|
|
28
|
+
<br/><img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/opentelemetry.png" alt="OpenTelemetry Logo"/>
|
|
29
|
+
|
|
27
30
|
Need to publish validated datasets to a CKAN data portal? <a href="https://www.csvpath.org/getting-started/getting-started-with-csvpath-+-ckan" target="_blank">Read about how CsvPath is integrated with CKAN</a>.
|
|
28
31
|
<a href="https://ckan.org/" target="_blank"><img target='_blank' src="https://github.com/csvpath/csvpath/blob/main/docs/images/ckan-logo-sm.png" alt="CKAN Data Portal"/></a>
|
|
29
32
|
|
|
@@ -77,7 +80,7 @@ CsvPath's goal is to make simple validations almost trivial and more complex sit
|
|
|
77
80
|
<a name="install"></a>
|
|
78
81
|
# Install
|
|
79
82
|
|
|
80
|
-
<a href='https://pypi.org/project/csvpath/'>CsvPath is available on PyPi</a>. Install with
|
|
83
|
+
<a href='https://pypi.org/project/csvpath/'>CsvPath is available on PyPi</a>. It has been tested on 3.10, 3.11 and 3.13. Install with
|
|
81
84
|
```
|
|
82
85
|
pip install csvpath
|
|
83
86
|
```
|
|
@@ -30,6 +30,7 @@ groups =
|
|
|
30
30
|
|
|
31
31
|
otlp.result = from csvpath.managers.integrations.otlp.otlp_result_listener import OpenTelemetryResultListener
|
|
32
32
|
otlp.results = from csvpath.managers.integrations.otlp.otlp_results_listener import OpenTelemetryResultsListener
|
|
33
|
+
otlp.errors = from csvpath.managers.integrations.otlp.otlp_error_listener import OpenTelemetryErrorListener
|
|
33
34
|
|
|
34
35
|
# add sftpplus to the list of groups above to automate registration and named-paths group runs on file arrival at an SFTPPlus server
|
|
35
36
|
sftpplus.paths = from csvpath.managers.integrations.sftpplus.sftpplus_listener import SftpPlusListener
|
|
@@ -2,9 +2,10 @@ import sys
|
|
|
2
2
|
import os
|
|
3
3
|
import time
|
|
4
4
|
import traceback
|
|
5
|
-
from bullet import Bullet
|
|
6
5
|
from csvpath import CsvPaths
|
|
7
6
|
from .drill_down import DrillDown
|
|
7
|
+
from .select import Select
|
|
8
|
+
from .error import Error
|
|
8
9
|
|
|
9
10
|
|
|
10
11
|
class Cli:
|
|
@@ -24,7 +25,9 @@ class Cli:
|
|
|
24
25
|
SIDEBAR_COLOR = "\033[36m"
|
|
25
26
|
REVERT = "\033[0m"
|
|
26
27
|
STOP_HERE = f"{SIDEBAR_COLOR}{ITALIC}... done picking dir{REVERT}"
|
|
28
|
+
STOP_HERE2 = "👍 pick this dir"
|
|
27
29
|
CANCEL = f"{SIDEBAR_COLOR}{ITALIC}... cancel{REVERT}"
|
|
30
|
+
CANCEL2 = "← cancel"
|
|
28
31
|
|
|
29
32
|
def _return_to_cont(self):
|
|
30
33
|
print(
|
|
@@ -51,26 +54,28 @@ class Cli:
|
|
|
51
54
|
|
|
52
55
|
def ask(self, choices: list[str]) -> str:
|
|
53
56
|
self.clear()
|
|
54
|
-
|
|
55
|
-
|
|
57
|
+
if choices[len(choices) - 1] == Cli.CANCEL:
|
|
58
|
+
choices[len(choices) - 1] = Cli.CANCEL2
|
|
59
|
+
if choices[len(choices) - 2] == Cli.STOP_HERE:
|
|
60
|
+
choices[len(choices) - 2] = Cli.STOP_HERE2
|
|
61
|
+
cs = [(s, s) for s in choices]
|
|
62
|
+
t = Select().ask(title="", values=cs, cancel_value="CANCEL")
|
|
63
|
+
self.clear()
|
|
56
64
|
return t
|
|
57
65
|
|
|
58
66
|
def loop(self):
|
|
59
67
|
while True:
|
|
60
68
|
t = None
|
|
61
69
|
try:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
],
|
|
72
|
-
)
|
|
73
|
-
t = b.launch()
|
|
70
|
+
choices = [
|
|
71
|
+
"named-files",
|
|
72
|
+
"named-paths",
|
|
73
|
+
"named-results",
|
|
74
|
+
"run",
|
|
75
|
+
"config",
|
|
76
|
+
"quit",
|
|
77
|
+
]
|
|
78
|
+
t = self.ask(choices)
|
|
74
79
|
except KeyboardInterrupt:
|
|
75
80
|
self.end()
|
|
76
81
|
return
|
|
@@ -91,12 +96,17 @@ class Cli:
|
|
|
91
96
|
self._paths()
|
|
92
97
|
if t == "named-results":
|
|
93
98
|
self._results()
|
|
99
|
+
if t == "config":
|
|
100
|
+
self._config()
|
|
94
101
|
except KeyboardInterrupt:
|
|
95
102
|
return "quit"
|
|
96
103
|
except Exception:
|
|
97
104
|
print(traceback.format_exc())
|
|
98
105
|
self._return_to_cont()
|
|
99
106
|
|
|
107
|
+
def _config(self) -> None:
|
|
108
|
+
Error(self).show()
|
|
109
|
+
|
|
100
110
|
def _files(self) -> None:
|
|
101
111
|
choices = ["add named-file", "list named-files", "cancel"]
|
|
102
112
|
t = self.ask(choices)
|
|
@@ -135,8 +145,7 @@ class Cli:
|
|
|
135
145
|
names = self.csvpaths.results_manager.list_named_results()
|
|
136
146
|
print(f"{len(names)} named-results names:")
|
|
137
147
|
names.append(self.CANCEL)
|
|
138
|
-
|
|
139
|
-
t = cli.launch()
|
|
148
|
+
t = self.ask(names)
|
|
140
149
|
if t == self.CANCEL:
|
|
141
150
|
return
|
|
142
151
|
t = f"{self.csvpaths.config.archive_path}{os.sep}{t}"
|
|
@@ -169,17 +178,15 @@ class Cli:
|
|
|
169
178
|
self.clear()
|
|
170
179
|
print("What named-file? ")
|
|
171
180
|
files = self.csvpaths.file_manager.named_file_names
|
|
172
|
-
|
|
173
|
-
file = cli.launch()
|
|
181
|
+
file = self.ask(files)
|
|
174
182
|
self.clear()
|
|
175
183
|
print("What named-paths? ")
|
|
176
184
|
allpaths = self.csvpaths.paths_manager.named_paths_names
|
|
177
|
-
|
|
178
|
-
paths = cli.launch()
|
|
185
|
+
paths = self.ask(allpaths)
|
|
179
186
|
self.clear()
|
|
187
|
+
choices = ["collect", "fast-forward"]
|
|
180
188
|
print("What method? ")
|
|
181
|
-
|
|
182
|
-
method = cli.launch()
|
|
189
|
+
method = self.ask(choices)
|
|
183
190
|
self.clear()
|
|
184
191
|
self.action(f"Running {paths} against {file} using {method}\n")
|
|
185
192
|
self.pause()
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import os
|
|
2
|
-
|
|
2
|
+
import traceback
|
|
3
|
+
from .error import Error
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class DrillDown:
|
|
@@ -29,14 +30,30 @@ class DrillDown:
|
|
|
29
30
|
self._cli.clear()
|
|
30
31
|
self._cli.action(f"Adding: {p}\n")
|
|
31
32
|
self._cli.pause()
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
33
|
+
try:
|
|
34
|
+
if t == "file":
|
|
35
|
+
self._cli.csvpaths.file_manager.add_named_file(name=name, path=p)
|
|
36
|
+
elif t == "dir":
|
|
37
|
+
self._cli.csvpaths.file_manager.add_named_files_from_dir(dirname=p)
|
|
38
|
+
else:
|
|
39
|
+
self._cli.csvpaths.file_manager.set_named_files_from_json(filename=p)
|
|
40
|
+
except Exception:
|
|
41
|
+
cfg = None
|
|
42
|
+
while cfg in [None, "c", "e"]:
|
|
43
|
+
print("There was an error.")
|
|
44
|
+
print("Click 'e' and return to print the stack trace. ")
|
|
45
|
+
print("Click 'c' and return to change config options. ")
|
|
46
|
+
print("Click return to continue. ")
|
|
47
|
+
cfg = input("")
|
|
48
|
+
if cfg == "c":
|
|
49
|
+
Error(self).show()
|
|
50
|
+
elif cfg == "e":
|
|
51
|
+
self._cli.clear()
|
|
52
|
+
print(traceback.format_exc())
|
|
53
|
+
input("\n\nClick return to continue")
|
|
54
|
+
else:
|
|
55
|
+
return
|
|
56
|
+
self._cli.clear()
|
|
40
57
|
|
|
41
58
|
# ============================
|
|
42
59
|
# Paths
|
|
@@ -62,12 +79,34 @@ class DrillDown:
|
|
|
62
79
|
self._cli.clear()
|
|
63
80
|
self._cli.action(f"Adding: {p}\n")
|
|
64
81
|
self._cli.pause()
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
try:
|
|
83
|
+
if t == "file":
|
|
84
|
+
self._cli.csvpaths.paths_manager.add_named_paths_from_file(
|
|
85
|
+
name=name, file_path=p
|
|
86
|
+
)
|
|
87
|
+
elif t == "dir":
|
|
88
|
+
self._cli.csvpaths.paths_manager.add_named_paths_from_dir(
|
|
89
|
+
name=name, directory=p
|
|
90
|
+
)
|
|
91
|
+
else:
|
|
92
|
+
self._cli.csvpaths.paths_manager.add_named_paths_from_json(file_path=p)
|
|
93
|
+
except Exception:
|
|
94
|
+
cfg = None
|
|
95
|
+
while cfg in [None, "c", "e"]:
|
|
96
|
+
print("There was an error.")
|
|
97
|
+
print("Click 'e' and return to print the stack trace. ")
|
|
98
|
+
print("Click 'c' and return to change config options. ")
|
|
99
|
+
print("Click return to continue. ")
|
|
100
|
+
cfg = input("")
|
|
101
|
+
if cfg == "c":
|
|
102
|
+
Error(self).show()
|
|
103
|
+
elif cfg == "e":
|
|
104
|
+
self._cli.clear()
|
|
105
|
+
print(traceback.format_exc())
|
|
106
|
+
input("\n\nClick return to continue")
|
|
107
|
+
else:
|
|
108
|
+
return
|
|
109
|
+
self._cli.clear()
|
|
71
110
|
|
|
72
111
|
# ============================
|
|
73
112
|
# Utilities
|
|
@@ -100,9 +139,9 @@ class DrillDown:
|
|
|
100
139
|
|
|
101
140
|
def _get_add_type(self) -> str:
|
|
102
141
|
self._cli.clear()
|
|
142
|
+
choices = ["dir", "file", "json"]
|
|
103
143
|
t = None
|
|
104
|
-
|
|
105
|
-
t = cli.launch()
|
|
144
|
+
t = self._cli.ask(choices)
|
|
106
145
|
return t
|
|
107
146
|
|
|
108
147
|
def _drill_down(self, *, path, extensions, json=False, dir_only=False) -> str:
|
|
@@ -115,11 +154,10 @@ class DrillDown:
|
|
|
115
154
|
names = self._filter_extensions(path, names, extensions)
|
|
116
155
|
names.sort()
|
|
117
156
|
names = self._decorate(path, names, select_dir=dir_only)
|
|
118
|
-
|
|
119
|
-
t
|
|
120
|
-
if t == self._cli.STOP_HERE:
|
|
157
|
+
t = self._cli.ask(names)
|
|
158
|
+
if t in [self._cli.STOP_HERE, self._cli.STOP_HERE2]:
|
|
121
159
|
return (path, True)
|
|
122
|
-
if t
|
|
160
|
+
if t in [self._cli.CANCEL, self._cli.CANCEL2]:
|
|
123
161
|
return (path, False)
|
|
124
162
|
if t.startswith("📂 ") or t.startswith("📄 "):
|
|
125
163
|
t = t[2:]
|
|
@@ -128,7 +166,7 @@ class DrillDown:
|
|
|
128
166
|
def _decorate(self, path, names, select_dir=False) -> list[str]:
|
|
129
167
|
ns = []
|
|
130
168
|
for n in names:
|
|
131
|
-
if n
|
|
169
|
+
if n in [self._cli.STOP_HERE, self._cli.STOP_HERE2]:
|
|
132
170
|
pass
|
|
133
171
|
elif os.path.isfile(os.path.join(path, n)):
|
|
134
172
|
n = f"📄 {n}"
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
from prompt_toolkit.shortcuts import message_dialog
|
|
2
|
+
from prompt_toolkit.shortcuts import checkboxlist_dialog
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class Error:
|
|
6
|
+
def __init__(self, holder):
|
|
7
|
+
self._holder = holder
|
|
8
|
+
if hasattr(holder, "_cli"):
|
|
9
|
+
self._cli = self._holder._cli
|
|
10
|
+
else:
|
|
11
|
+
self._cli = holder
|
|
12
|
+
self._paths = self._cli.csvpaths
|
|
13
|
+
self._config = self._paths.config
|
|
14
|
+
|
|
15
|
+
def show(self):
|
|
16
|
+
log_loc = self._config.get(section="logging", name="log_file")
|
|
17
|
+
cfg_loc = self._config.config_path
|
|
18
|
+
|
|
19
|
+
raising = "suppress" if self.is_raising() else "raise"
|
|
20
|
+
raising_msg = f"Change error policy to {raising} exceptions."
|
|
21
|
+
|
|
22
|
+
debugging = "INFO" if self.is_debugging() else "DEBUG"
|
|
23
|
+
debugging_msg = f"Set logging to {debugging}. (Your log file is at {log_loc})."
|
|
24
|
+
|
|
25
|
+
results = checkboxlist_dialog(
|
|
26
|
+
title="Config Settings",
|
|
27
|
+
text=f"These settings are in your config file at {cfg_loc}. Changing them may help you debug. \nNote that surpressing errors is effective only when running CsvPath expressions, not when loading files.\n",
|
|
28
|
+
values=[
|
|
29
|
+
("flip_debug", debugging_msg),
|
|
30
|
+
("flip_raise", raising_msg),
|
|
31
|
+
],
|
|
32
|
+
).run()
|
|
33
|
+
|
|
34
|
+
if results and "flip_raise" in results:
|
|
35
|
+
if self.is_raising():
|
|
36
|
+
self._config.add_to_config("errors", "csvpaths", "print")
|
|
37
|
+
self._config.add_to_config("errors", "csvpath", "print")
|
|
38
|
+
else:
|
|
39
|
+
self._config.add_to_config("errors", "csvpaths", "print, raise")
|
|
40
|
+
self._config.add_to_config("errors", "csvpath", "print, raise")
|
|
41
|
+
|
|
42
|
+
if results and "flip_debug" in results:
|
|
43
|
+
if self.is_debugging():
|
|
44
|
+
self._config.add_to_config("logging", "csvpath", "info")
|
|
45
|
+
self._config.add_to_config("logging", "csvpaths", "info")
|
|
46
|
+
else:
|
|
47
|
+
self._config.add_to_config("logging", "csvpath", "debug")
|
|
48
|
+
self._config.add_to_config("logging", "csvpaths", "debug")
|
|
49
|
+
if results:
|
|
50
|
+
self._config.save_config()
|
|
51
|
+
self._config.reload()
|
|
52
|
+
self._cli.csvpaths._set_managers()
|
|
53
|
+
|
|
54
|
+
def is_debugging(self) -> bool:
|
|
55
|
+
psd = self._config.get(section="logging", name="csvpaths")
|
|
56
|
+
pd = self._config.get(section="logging", name="csvpath")
|
|
57
|
+
return psd is True and pd is True
|
|
58
|
+
|
|
59
|
+
def is_raising(self) -> bool:
|
|
60
|
+
policy = self._config.get(section="errors", name="csvpath")
|
|
61
|
+
return self._paths.ecoms.do_i_raise() and "raise" in policy
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# from __future__ import unicode_literals
|
|
2
|
+
from typing import Sequence, Tuple, Optional, TypeVar
|
|
3
|
+
from prompt_toolkit.application import Application
|
|
4
|
+
from prompt_toolkit.key_binding.defaults import load_key_bindings
|
|
5
|
+
from prompt_toolkit.key_binding.key_bindings import KeyBindings, merge_key_bindings
|
|
6
|
+
from prompt_toolkit.layout import Layout
|
|
7
|
+
from prompt_toolkit.layout.containers import HSplit
|
|
8
|
+
from prompt_toolkit.widgets import RadioList, Label
|
|
9
|
+
from prompt_toolkit.keys import Keys
|
|
10
|
+
from prompt_toolkit.formatted_text import AnyFormattedText
|
|
11
|
+
from prompt_toolkit.styles import BaseStyle
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
T = TypeVar("T")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class Select:
|
|
18
|
+
def ask(
|
|
19
|
+
self,
|
|
20
|
+
title: str = "",
|
|
21
|
+
values: Sequence[Tuple[T, AnyFormattedText]] = None,
|
|
22
|
+
default: Optional[T] = None,
|
|
23
|
+
cancel_value: Optional[T] = None,
|
|
24
|
+
style: Optional[BaseStyle] = None,
|
|
25
|
+
async_: bool = False,
|
|
26
|
+
) -> T:
|
|
27
|
+
#
|
|
28
|
+
# this class sourced from https://github.com/prompt-toolkit/python-prompt-toolkit/issues/756
|
|
29
|
+
#
|
|
30
|
+
radio_list = RadioList(values, default)
|
|
31
|
+
#
|
|
32
|
+
# Remove the enter key binding so that we can augment it
|
|
33
|
+
#
|
|
34
|
+
radio_list.control.key_bindings.remove("enter")
|
|
35
|
+
bindings = KeyBindings()
|
|
36
|
+
#
|
|
37
|
+
# Replace the enter key binding to select the value and also submit it
|
|
38
|
+
#
|
|
39
|
+
|
|
40
|
+
@bindings.add("enter")
|
|
41
|
+
def exit_with_value(event):
|
|
42
|
+
#
|
|
43
|
+
# enter exits the select, returning the highlighted value
|
|
44
|
+
#
|
|
45
|
+
radio_list._handle_enter()
|
|
46
|
+
event.app.exit(result=radio_list.current_value)
|
|
47
|
+
|
|
48
|
+
@bindings.add("c-c")
|
|
49
|
+
def backup_exit_with_value(event):
|
|
50
|
+
#
|
|
51
|
+
# ctrl-c exits the user interface with the cancel_value
|
|
52
|
+
#
|
|
53
|
+
event.app.exit(result=cancel_value)
|
|
54
|
+
|
|
55
|
+
#
|
|
56
|
+
# Create and run the mini inline application
|
|
57
|
+
#
|
|
58
|
+
application = Application(
|
|
59
|
+
layout=Layout(HSplit([Label(title), radio_list])),
|
|
60
|
+
key_bindings=merge_key_bindings([load_key_bindings(), bindings]),
|
|
61
|
+
mouse_support=True,
|
|
62
|
+
style=style,
|
|
63
|
+
full_screen=False,
|
|
64
|
+
)
|
|
65
|
+
if async_:
|
|
66
|
+
return application.run_async()
|
|
67
|
+
else:
|
|
68
|
+
return application.run()
|