csvpath 0.0.499__tar.gz → 0.0.501__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.499 → csvpath-0.0.501}/PKG-INFO +3 -3
- {csvpath-0.0.499 → csvpath-0.0.501}/README.md +2 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/config/config.ini +6 -4
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/cli/cli.py +16 -18
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/cli/drill_down.py +11 -13
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/csvpath.py +60 -73
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/csvpaths.py +13 -8
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/files/file_listener_ol.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/files/file_manager.py +0 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/files/file_registrar.py +4 -1
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/event.py +6 -6
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/event_result.py +11 -2
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/job.py +6 -6
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/ol_listener.py +1 -1
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/run.py +7 -7
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/run_state.py +6 -5
- {csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/sender.py +3 -3
- csvpath-0.0.501/csvpath/managers/integrations/slack/event.py +184 -0
- csvpath-0.0.501/csvpath/managers/integrations/slack/sender copy.py +49 -0
- csvpath-0.0.501/csvpath/managers/integrations/slack/sender.py +73 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/listener.py +0 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/metadata.py +2 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/paths/paths_listener_ol.py +1 -3
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/paths/paths_manager.py +0 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/paths/paths_registrar.py +17 -1
- csvpath-0.0.501/csvpath/managers/registrar.py +50 -0
- csvpath-0.0.501/csvpath/managers/results/readers/file_errors_reader.py +27 -0
- csvpath-0.0.501/csvpath/managers/results/readers/file_lines_reader.py +23 -0
- csvpath-0.0.501/csvpath/managers/results/readers/file_printouts_reader.py +55 -0
- csvpath-0.0.501/csvpath/managers/results/readers/file_unmatched_reader.py +20 -0
- csvpath-0.0.501/csvpath/managers/results/readers/readers.py +138 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/result.py +172 -115
- csvpath-0.0.501/csvpath/managers/results/result_file_reader.py +24 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/result_listener_ol.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/result_registrar.py +7 -3
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/result_serializer.py +15 -3
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/results_listener_ol.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/results_manager.py +77 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/results_registrar.py +2 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/run/run_listener_ol.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/run/run_registrar.py +1 -8
- csvpath-0.0.501/csvpath/matching/__init__.py +1 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/args.py +19 -30
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/any.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/empty.py +2 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/function.py +10 -9
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/function_finder.py +6 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/first_line.py +2 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/stats/minf.py +14 -7
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/stats/percent.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/regex.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/datef.py +3 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/decimal.py +11 -7
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/nonef.py +7 -9
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/string.py +2 -6
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/validity/failed.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/validity/line.py +12 -11
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/matcher.py +27 -19
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/equality.py +2 -27
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/expression.py +3 -14
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/matchable.py +19 -20
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/qualified.py +19 -7
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/reference.py +21 -45
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/expression_utility.py +3 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/lark_print_parser.py +49 -28
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/print_parser.py +7 -2
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/scanner.py +0 -6
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/config.py +45 -23
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/error.py +66 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/file_readers.py +22 -46
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/line_spooler.py +58 -13
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/pandas_data_reader.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/s3_data_reader.py +1 -1
- csvpath-0.0.501/docs/images/csvpath-logo-wordmark-tight-2.svg +39 -0
- csvpath-0.0.501/docs/images/logo-wordmark-3.svg +92 -0
- csvpath-0.0.501/docs/images/logo-wordmark-4.svg +59 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/pyproject.toml +1 -1
- csvpath-0.0.499/csvpath/managers/registrar.py +0 -60
- csvpath-0.0.499/csvpath/matching/__init__.py +0 -4
- {csvpath-0.0.499 → csvpath-0.0.501}/LICENSE +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/cli/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/files/file_cacher.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/files/file_metadata.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/paths/paths_metadata.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/result_metadata.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/results/results_metadata.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/run/run_listener_stdout.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/managers/run/run_metadata.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/all.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/andf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/between.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/exists.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/inf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/no.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/notf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/orf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/boolean/yes.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/count.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/count_bytes.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/count_headers.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/count_lines.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/count_scans.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/counter.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/every.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/has_matches.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/increment.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/tally.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/counting/total_lines.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/dates/now.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/function_factory.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/function_focus.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/append.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/collect.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/empty_stack.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/end.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/header_name.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/header_names_mismatch.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/headers.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/mismatch.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/replace.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/headers/reset_headers.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/advance.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/after_blank.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/dups.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/first.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/last.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/lines/stop.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/above.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/add.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/divide.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/equals.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/intf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/mod.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/multiply.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/round.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/subtotal.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/subtract.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/math/sum.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/misc/fingerprint.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/misc/importf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/misc/random.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/print/jinjaf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/print/print_line.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/print/print_queue.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/print/printf.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/print/table.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/stats/percent_unique.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/stats/stdev.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/concat.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/length.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/lower.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/metaphone.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/starts_with.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/strip.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/substring.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/strings/upper.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/testing/debug.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/boolean.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/types/type.py +1 -1
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/validity/fail.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/variables/get.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/variables/pushpop.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/variables/put.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/variables/track.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/functions/variables/variables.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/lark_parser.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/lark_transformer.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/header.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/term.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/productions/variable.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/exceptions.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/expression_encoder.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/matching/util/runtime_data_collector.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/explain_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/files_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/logic_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/mode_controller.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/print_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/return_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/run_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/source_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/transfer_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/unmatched_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/modes/validation_mode.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/__init__.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/exceptions.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/parser.out +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/parsetab.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/scanning/scanning_lexer.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/cache.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/class_loader.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/config_exception.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/exceptions.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/last_line_stats.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/line_counter.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/line_monitor.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/log_utility.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/metadata_parser.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/printer.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/csvpath/util/reference_parser.py +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/asbool.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/assignment.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/comments.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/config.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/examples.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/files.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/above.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/advance.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/after_blank.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/all.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/andor.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/any.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/average.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/between.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/collect.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/correlate.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/count.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/count_bytes.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/count_headers.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/counter.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/date.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/empty.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/empty_stack.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/end.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/every.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/fail.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/fingerprint.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/first.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/get.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/has_dups.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/has_matches.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/header.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/header_name.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/header_names_mismatch.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/implementing_functions.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/import.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/in.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/increment.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/intf.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/jinja.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/last.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/line.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/line_number.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/max.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/metaphone.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/mismatch.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/no.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/not.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/now.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/percent_unique.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/pop.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/print.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/print_line.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/print_queue.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/random.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/regex.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/replace.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/reset_headers.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/stdev.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/stop.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/string_functions.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/subtotal.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/subtract.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/sum.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/tally.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/total_lines.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/track.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/types.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/variables.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions/variables_and_headers.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/functions.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/grammar.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/headers.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/images/csvpath-icon-sm.png +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/images/logo-wordmark-white-on-black-trimmed-padded.png +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/images/logo-wordmark-white-trimmed.png +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/images/marquez-logo-sm.png +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/images/openlineage-logo-sm.png +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/paths.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/printing.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/qualifiers.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/references.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/docs/terms.md +0 -0
- {csvpath-0.0.499 → csvpath-0.0.501}/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.501
|
|
4
4
|
Summary: A declarative language for validating CSV, Excel, and other tabular data files
|
|
5
5
|
Author: David Kershaw
|
|
6
6
|
Author-email: dk107dk@hotmail.com
|
|
@@ -43,7 +43,7 @@ Project-URL: Github, https://github.com/csvpath/csvpath.git
|
|
|
43
43
|
Description-Content-Type: text/markdown
|
|
44
44
|
|
|
45
45
|
|
|
46
|
-
# <a href='https://www.csvpath.org/'><img src='https://github.com/csvpath/csvpath/blob/main/docs/images/
|
|
46
|
+
# <a href='https://www.csvpath.org/'><img src='https://github.com/csvpath/csvpath/blob/main/docs/images/logo-wordmark-4.svg'/></a>
|
|
47
47
|
|
|
48
48
|
The CsvPath language defines a declarative syntax for inspecting and validating CSV and Excel files, and other tabular data.
|
|
49
49
|
|
|
@@ -70,7 +70,7 @@ CsvPath is intended to fit with other DataOps and data quality tools. Files are
|
|
|
70
70
|
|
|
71
71
|
Read more about CsvPath and see CSV, Excel, and Data Frames validation examples at <a href='https://www.csvpath.org'>https://www.csvpath.org</a>.
|
|
72
72
|
|
|
73
|
-
If you need help, use the <a href='https://www.csvpath.org/getting-started/get-help'>contact form</a> or the <a href='https://github.com/csvpath/csvpath/issues'>issue tracker</a> or talk to one of our [sponsors](#sponsors).
|
|
73
|
+
If you need help, use the <a href='https://www.csvpath.org/getting-started/get-help'>contact form</a> or the <a href='https://github.com/csvpath/csvpath/issues'>issue tracker</a> or talk to one of our [sponsors, below](#sponsors).
|
|
74
74
|
|
|
75
75
|
  
|
|
76
76
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
# <a href='https://www.csvpath.org/'><img src='https://github.com/csvpath/csvpath/blob/main/docs/images/
|
|
2
|
+
# <a href='https://www.csvpath.org/'><img src='https://github.com/csvpath/csvpath/blob/main/docs/images/logo-wordmark-4.svg'/></a>
|
|
3
3
|
|
|
4
4
|
The CsvPath language defines a declarative syntax for inspecting and validating CSV and Excel files, and other tabular data.
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ CsvPath is intended to fit with other DataOps and data quality tools. Files are
|
|
|
26
26
|
|
|
27
27
|
Read more about CsvPath and see CSV, Excel, and Data Frames validation examples at <a href='https://www.csvpath.org'>https://www.csvpath.org</a>.
|
|
28
28
|
|
|
29
|
-
If you need help, use the <a href='https://www.csvpath.org/getting-started/get-help'>contact form</a> or the <a href='https://github.com/csvpath/csvpath/issues'>issue tracker</a> or talk to one of our [sponsors](#sponsors).
|
|
29
|
+
If you need help, use the <a href='https://www.csvpath.org/getting-started/get-help'>contact form</a> or the <a href='https://github.com/csvpath/csvpath/issues'>issue tracker</a> or talk to one of our [sponsors, below](#sponsors).
|
|
30
30
|
|
|
31
31
|
  
|
|
32
32
|
|
|
@@ -25,11 +25,13 @@ path = cache
|
|
|
25
25
|
imports = config/functions.imports
|
|
26
26
|
|
|
27
27
|
[listeners]
|
|
28
|
+
groups=marquez,slack
|
|
29
|
+
|
|
28
30
|
#uncomment for OpenLineage events to a local Marquez
|
|
29
|
-
#file = from csvpath.managers.files.file_listener_ol import OpenLineageFileListener
|
|
30
|
-
#paths = from csvpath.managers.paths.paths_listener_ol import OpenLineagePathsListener
|
|
31
|
-
#result = from csvpath.managers.results.result_listener_ol import OpenLineageResultListener
|
|
32
|
-
#results = from csvpath.managers.results.results_listener_ol import OpenLineageResultsListener
|
|
31
|
+
#marquez.file = from csvpath.managers.files.file_listener_ol import OpenLineageFileListener
|
|
32
|
+
#marquez.paths = from csvpath.managers.paths.paths_listener_ol import OpenLineagePathsListener
|
|
33
|
+
#marquez.result = from csvpath.managers.results.result_listener_ol import OpenLineageResultListener
|
|
34
|
+
#marquez.results = from csvpath.managers.results.results_listener_ol import OpenLineageResultsListener
|
|
33
35
|
|
|
34
36
|
[marquez]
|
|
35
37
|
base_url = http://localhost:5000
|
|
@@ -3,13 +3,13 @@ import os
|
|
|
3
3
|
import time
|
|
4
4
|
import traceback
|
|
5
5
|
from bullet import Bullet
|
|
6
|
-
from csvpath import
|
|
6
|
+
from csvpath import CsvPaths
|
|
7
7
|
from .drill_down import DrillDown
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
class Cli:
|
|
11
11
|
def __init__(self):
|
|
12
|
-
self.
|
|
12
|
+
self.csvpaths = CsvPaths()
|
|
13
13
|
|
|
14
14
|
def clear(self):
|
|
15
15
|
print(chr(27) + "[2J")
|
|
@@ -35,7 +35,7 @@ class Cli:
|
|
|
35
35
|
def _response(self, text: str) -> None:
|
|
36
36
|
sys.stdout.write(f"\u001b[30;1m{text}{Cli.REVERT}\n")
|
|
37
37
|
|
|
38
|
-
def
|
|
38
|
+
def action(self, text: str) -> None:
|
|
39
39
|
sys.stdout.write(f"\033[36m{text}{Cli.REVERT}\n")
|
|
40
40
|
|
|
41
41
|
def _input(self, prompt: str) -> str:
|
|
@@ -80,9 +80,9 @@ class Cli:
|
|
|
80
80
|
return
|
|
81
81
|
|
|
82
82
|
def _do(self, t: str) -> str | None:
|
|
83
|
+
if t == "quit":
|
|
84
|
+
return t
|
|
83
85
|
try:
|
|
84
|
-
if t == "quit":
|
|
85
|
-
return t
|
|
86
86
|
if t == "run":
|
|
87
87
|
self.run()
|
|
88
88
|
if t == "named-files":
|
|
@@ -112,8 +112,6 @@ class Cli:
|
|
|
112
112
|
DrillDown(self).name_paths()
|
|
113
113
|
if t == "list named-paths":
|
|
114
114
|
self.list_named_paths()
|
|
115
|
-
if t == "cancel":
|
|
116
|
-
return
|
|
117
115
|
|
|
118
116
|
def _results(self) -> None:
|
|
119
117
|
choices = ["open named-result", "list named-results", "cancel"]
|
|
@@ -125,7 +123,7 @@ class Cli:
|
|
|
125
123
|
|
|
126
124
|
def list_named_results(self):
|
|
127
125
|
self.clear()
|
|
128
|
-
names = self.
|
|
126
|
+
names = self.csvpaths.results_manager.list_named_results()
|
|
129
127
|
print(f"{len(names)} named-results names:")
|
|
130
128
|
for n in names:
|
|
131
129
|
self._response(f" {n}")
|
|
@@ -134,15 +132,15 @@ class Cli:
|
|
|
134
132
|
def open_named_result(self):
|
|
135
133
|
self.clear()
|
|
136
134
|
try:
|
|
137
|
-
names = self.
|
|
135
|
+
names = self.csvpaths.results_manager.list_named_results()
|
|
138
136
|
print(f"{len(names)} named-results names:")
|
|
139
137
|
names.append(self.CANCEL)
|
|
140
138
|
cli = Bullet(bullet=" > ", choices=names)
|
|
141
139
|
t = cli.launch()
|
|
142
140
|
if t == self.CANCEL:
|
|
143
141
|
return
|
|
144
|
-
t = f"{self.
|
|
145
|
-
self.
|
|
142
|
+
t = f"{self.csvpaths.config.archive_path}{os.sep}{t}"
|
|
143
|
+
self.action(f"Opening results at {t}...")
|
|
146
144
|
self.short_pause()
|
|
147
145
|
c = f"open {t}"
|
|
148
146
|
os.system(c)
|
|
@@ -151,7 +149,7 @@ class Cli:
|
|
|
151
149
|
|
|
152
150
|
def list_named_paths(self):
|
|
153
151
|
self.clear()
|
|
154
|
-
names = self.
|
|
152
|
+
names = self.csvpaths.paths_manager.named_paths_names
|
|
155
153
|
names.sort()
|
|
156
154
|
print(f"{len(names)} named-paths names:")
|
|
157
155
|
for n in names:
|
|
@@ -160,7 +158,7 @@ class Cli:
|
|
|
160
158
|
|
|
161
159
|
def list_named_files(self):
|
|
162
160
|
self.clear()
|
|
163
|
-
names = self.
|
|
161
|
+
names = self.csvpaths.file_manager.named_file_names
|
|
164
162
|
names.sort()
|
|
165
163
|
print(f"{len(names)} named-file names:")
|
|
166
164
|
for n in names:
|
|
@@ -170,12 +168,12 @@ class Cli:
|
|
|
170
168
|
def run(self):
|
|
171
169
|
self.clear()
|
|
172
170
|
print("What named-file? ")
|
|
173
|
-
files = self.
|
|
171
|
+
files = self.csvpaths.file_manager.named_file_names
|
|
174
172
|
cli = Bullet(bullet=" > ", choices=files)
|
|
175
173
|
file = cli.launch()
|
|
176
174
|
self.clear()
|
|
177
175
|
print("What named-paths? ")
|
|
178
|
-
allpaths = self.
|
|
176
|
+
allpaths = self.csvpaths.paths_manager.named_paths_names
|
|
179
177
|
cli = Bullet(bullet=" > ", choices=allpaths)
|
|
180
178
|
paths = cli.launch()
|
|
181
179
|
self.clear()
|
|
@@ -183,13 +181,13 @@ class Cli:
|
|
|
183
181
|
cli = Bullet(bullet=" > ", choices=["collect", "fast-forward"])
|
|
184
182
|
method = cli.launch()
|
|
185
183
|
self.clear()
|
|
186
|
-
self.
|
|
184
|
+
self.action(f"Running {paths} against {file} using {method}\n")
|
|
187
185
|
self.pause()
|
|
188
186
|
try:
|
|
189
187
|
if method == "collect":
|
|
190
|
-
self.
|
|
188
|
+
self.csvpaths.collect_paths(filename=file, pathsname=paths)
|
|
191
189
|
else:
|
|
192
|
-
self.
|
|
190
|
+
self.csvpaths.fast_forward_paths(filename=file, pathsname=paths)
|
|
193
191
|
except Exception:
|
|
194
192
|
print(traceback.format_exc())
|
|
195
193
|
self._return_to_cont()
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
from csvpath import CsvPath, CsvPaths
|
|
2
|
-
import sys
|
|
3
1
|
import os
|
|
4
2
|
from bullet import Bullet
|
|
5
3
|
|
|
@@ -22,21 +20,21 @@ class DrillDown:
|
|
|
22
20
|
# get path
|
|
23
21
|
#
|
|
24
22
|
t = self._get_add_type()
|
|
25
|
-
p = self._get_path(t, self._cli.
|
|
23
|
+
p = self._get_path(t, self._cli.csvpaths.config.csv_file_extensions)
|
|
26
24
|
if p is False:
|
|
27
25
|
return
|
|
28
26
|
#
|
|
29
27
|
# do the add
|
|
30
28
|
#
|
|
31
29
|
self._cli.clear()
|
|
32
|
-
self._cli.
|
|
30
|
+
self._cli.action(f"Adding: {p}\n")
|
|
33
31
|
self._cli.pause()
|
|
34
32
|
if t == "file":
|
|
35
|
-
self._cli.
|
|
33
|
+
self._cli.csvpaths.file_manager.add_named_file(name=name, path=p)
|
|
36
34
|
elif t == "dir":
|
|
37
|
-
self._cli.
|
|
35
|
+
self._cli.csvpaths.file_manager.add_named_files_from_dir(dirname=p)
|
|
38
36
|
else:
|
|
39
|
-
self._cli.
|
|
37
|
+
self._cli.csvpaths.file_manager.set_named_files_from_json(
|
|
40
38
|
name=name, filename=p
|
|
41
39
|
)
|
|
42
40
|
|
|
@@ -54,7 +52,7 @@ class DrillDown:
|
|
|
54
52
|
# get path
|
|
55
53
|
#
|
|
56
54
|
t = self._get_add_type()
|
|
57
|
-
exts = self._cli.
|
|
55
|
+
exts = self._cli.csvpaths.config.csvpath_file_extensions
|
|
58
56
|
p = self._get_path(t, exts)
|
|
59
57
|
if p is False:
|
|
60
58
|
return
|
|
@@ -62,14 +60,14 @@ class DrillDown:
|
|
|
62
60
|
# do the add
|
|
63
61
|
#
|
|
64
62
|
self._cli.clear()
|
|
65
|
-
self._cli.
|
|
63
|
+
self._cli.action(f"Adding: {p}\n")
|
|
66
64
|
self._cli.pause()
|
|
67
65
|
if t == "file":
|
|
68
|
-
self._cli.
|
|
66
|
+
self._cli.csvpaths.paths_manager.add_named_paths(name=name, from_file=p)
|
|
69
67
|
elif t == "dir":
|
|
70
|
-
self._cli.
|
|
68
|
+
self._cli.csvpaths.paths_manager.add_named_paths(name=name, from_dir=p)
|
|
71
69
|
else:
|
|
72
|
-
self._cli.
|
|
70
|
+
self._cli.csvpaths.paths_manager.add_named_paths(name=name, from_json=p)
|
|
73
71
|
|
|
74
72
|
# ============================
|
|
75
73
|
# Utilities
|
|
@@ -85,7 +83,7 @@ class DrillDown:
|
|
|
85
83
|
extensions.append("")
|
|
86
84
|
while p is not None and p != "" and not os.path.isfile(p):
|
|
87
85
|
self._cli.clear()
|
|
88
|
-
self._cli.
|
|
86
|
+
self._cli.action(f"{p}\n")
|
|
89
87
|
p = self._drill_down(
|
|
90
88
|
path=p,
|
|
91
89
|
json=True if t == "json" else False,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
""" CsvPath is the main class for the library. most of the magic
|
|
2
|
-
happens either here or in individual functions. """
|
|
2
|
+
happens either here or in individual functions. """ # pylint: disable=C0302
|
|
3
3
|
|
|
4
|
-
import csv
|
|
5
4
|
import time
|
|
6
5
|
import os
|
|
7
6
|
import hashlib
|
|
@@ -9,9 +8,13 @@ from datetime import datetime, timezone
|
|
|
9
8
|
from typing import List, Dict, Any
|
|
10
9
|
from collections.abc import Iterator
|
|
11
10
|
from abc import ABC, abstractmethod
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
11
|
+
from .util.config import Config
|
|
12
|
+
from .util.line_monitor import LineMonitor
|
|
13
|
+
from .util.log_utility import LogUtility
|
|
14
|
+
from .util.printer import Printer
|
|
15
|
+
from .util.file_readers import DataFileReader
|
|
16
|
+
from .util.line_spooler import LineSpooler, ListLineSpooler
|
|
17
|
+
from .modes.mode_controller import ModeController
|
|
15
18
|
from .matching.matcher import Matcher
|
|
16
19
|
from .scanning.scanner import Scanner
|
|
17
20
|
from .util.metadata_parser import MetadataParser
|
|
@@ -26,10 +29,6 @@ from .util.exceptions import (
|
|
|
26
29
|
CsvPathsException,
|
|
27
30
|
)
|
|
28
31
|
from .matching.util.exceptions import MatchException
|
|
29
|
-
from csvpath.util.printer import Printer
|
|
30
|
-
from csvpath.util.file_readers import DataFileReader
|
|
31
|
-
from csvpath.util.line_spooler import LineSpooler, ListLineSpooler
|
|
32
|
-
from csvpath.modes.mode_controller import ModeController
|
|
33
32
|
|
|
34
33
|
|
|
35
34
|
class CsvPathPublic(ABC):
|
|
@@ -327,12 +326,12 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
327
326
|
|
|
328
327
|
@will_run.setter
|
|
329
328
|
def will_run(self, mode) -> None:
|
|
330
|
-
self.
|
|
329
|
+
self.modes.run_mode.value = mode
|
|
331
330
|
|
|
332
331
|
#
|
|
333
332
|
# increases the total accumulated time spent doing c.matches() by t
|
|
334
333
|
#
|
|
335
|
-
def
|
|
334
|
+
def up_function_time_match(self, c, t) -> None:
|
|
336
335
|
if c not in self.function_times_match:
|
|
337
336
|
self.function_times_match[c] = 0
|
|
338
337
|
st = self.function_times_match[c]
|
|
@@ -346,7 +345,7 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
346
345
|
#
|
|
347
346
|
# increases the total accumulated time spent doing c.to_value() by t
|
|
348
347
|
#
|
|
349
|
-
def
|
|
348
|
+
def up_function_time_value(self, c, t) -> None:
|
|
350
349
|
if c not in self.function_times_value:
|
|
351
350
|
self.function_times_value[c] = 0
|
|
352
351
|
st = self.function_times_value[c]
|
|
@@ -406,29 +405,39 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
406
405
|
|
|
407
406
|
@property
|
|
408
407
|
def identity(self) -> str:
|
|
409
|
-
"""returns id or name if found in metadata.
|
|
410
|
-
|
|
411
|
-
the
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
408
|
+
"""returns id or name if found in metadata.
|
|
409
|
+
|
|
410
|
+
the id or name gets into metadata primarily if found
|
|
411
|
+
in an "external" comment in the csvpath. "external"
|
|
412
|
+
meaning outside the []s. comments are keyword:comment.
|
|
413
|
+
we take id, Id, ID and name, Name, NAME.
|
|
414
|
+
|
|
415
|
+
id is preferred over name. E.g. in:
|
|
416
|
+
~ name: my path description: an example id: this value wins ~
|
|
417
|
+
the id becomes the identity of the instance.
|
|
418
|
+
|
|
419
|
+
we prefer in this order: all-lower most, Initial-caps,
|
|
420
|
+
ALL-CAPS least
|
|
421
|
+
|
|
422
|
+
the ordering is relied on in Result and possibly
|
|
423
|
+
elsewhere.
|
|
415
424
|
"""
|
|
416
|
-
|
|
425
|
+
ret = None
|
|
417
426
|
if not self.metadata:
|
|
418
|
-
|
|
419
|
-
if "id" in self.metadata:
|
|
420
|
-
return self.metadata["id"]
|
|
421
|
-
if "Id" in self.metadata:
|
|
422
|
-
return self.metadata["Id"]
|
|
423
|
-
if "ID" in self.metadata:
|
|
424
|
-
return self.metadata["ID"]
|
|
425
|
-
if "name" in self.metadata:
|
|
426
|
-
return self.metadata["name"]
|
|
427
|
-
if "Name" in self.metadata:
|
|
428
|
-
return self.metadata["Name"]
|
|
427
|
+
ret = ""
|
|
429
428
|
if "NAME" in self.metadata:
|
|
430
|
-
|
|
431
|
-
|
|
429
|
+
ret = self.metadata["NAME"]
|
|
430
|
+
if "Name" in self.metadata:
|
|
431
|
+
ret = self.metadata["Name"]
|
|
432
|
+
if "name" in self.metadata:
|
|
433
|
+
ret = self.metadata["name"]
|
|
434
|
+
if "ID" in self.metadata:
|
|
435
|
+
ret = self.metadata["ID"]
|
|
436
|
+
if "Id" in self.metadata:
|
|
437
|
+
ret = self.metadata["Id"]
|
|
438
|
+
if "id" in self.metadata:
|
|
439
|
+
ret = self.metadata["id"]
|
|
440
|
+
return ret
|
|
432
441
|
|
|
433
442
|
@property
|
|
434
443
|
def config(self) -> Config: # pylint: disable=C0116
|
|
@@ -507,7 +516,7 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
507
516
|
def has_default_printer(self) -> bool:
|
|
508
517
|
if not self.printers:
|
|
509
518
|
self.printers = []
|
|
510
|
-
for
|
|
519
|
+
for p in self.printers:
|
|
511
520
|
if isinstance(p, StdOutPrinter):
|
|
512
521
|
return True
|
|
513
522
|
return False
|
|
@@ -522,15 +531,17 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
522
531
|
|
|
523
532
|
@property
|
|
524
533
|
def last_line(self):
|
|
534
|
+
"""this method only returns the default printer's last_line"""
|
|
525
535
|
if not self.printers or len(self.printers) == 0:
|
|
526
536
|
return None
|
|
527
537
|
return self.printers[0].last_line
|
|
528
538
|
|
|
529
539
|
@property
|
|
530
540
|
def lines_printed(self) -> int:
|
|
541
|
+
"""this method only returns the default printer's lines printed"""
|
|
531
542
|
if not self.printers or len(self.printers) == 0:
|
|
532
543
|
return -1
|
|
533
|
-
self.printers[0].lines_printed
|
|
544
|
+
return self.printers[0].lines_printed
|
|
534
545
|
|
|
535
546
|
@property
|
|
536
547
|
def is_frozen(self) -> bool:
|
|
@@ -631,10 +642,12 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
631
642
|
# - files-mode: all | no-data | no-unmatched | no-printouts | data | unmatched | errors | meta | vars | printouts
|
|
632
643
|
#
|
|
633
644
|
self.modes.update()
|
|
634
|
-
# self.update_arg_validation_mode_if()
|
|
635
645
|
|
|
636
646
|
# =====================
|
|
637
|
-
|
|
647
|
+
# in principle the modes should come through the mode controller like:
|
|
648
|
+
# self.modes.transfer_mode.value
|
|
649
|
+
# not wading into that today. low value.
|
|
650
|
+
#
|
|
638
651
|
@property
|
|
639
652
|
def transfer_mode(self) -> str:
|
|
640
653
|
return self.metadata.get("transfer-mode")
|
|
@@ -774,7 +787,7 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
774
787
|
i = data.find("]")
|
|
775
788
|
if i < 0:
|
|
776
789
|
raise InputException(f"Cannot find the scan part of this csvpath: {data}")
|
|
777
|
-
|
|
790
|
+
if i == len(data) - 1:
|
|
778
791
|
raise InputException(
|
|
779
792
|
f"The scan part of this csvpath cannot be last: {data}"
|
|
780
793
|
)
|
|
@@ -787,7 +800,6 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
787
800
|
|
|
788
801
|
if ndata == "":
|
|
789
802
|
raise InputException(f"There must be a match part of this csvpath: {data}")
|
|
790
|
-
|
|
791
803
|
if ndata[0] != "[":
|
|
792
804
|
raise InputException(f"Cannot find the match part of this csvpath: {data}")
|
|
793
805
|
if ndata[len(ndata) - 1] != "]":
|
|
@@ -1024,7 +1036,12 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
1024
1036
|
#
|
|
1025
1037
|
if self.scanner.filename is None:
|
|
1026
1038
|
raise FileException("There is no filename")
|
|
1027
|
-
|
|
1039
|
+
#
|
|
1040
|
+
# DataFileReader is abstract. instantiating it results in a concrete subclass.
|
|
1041
|
+
# pylint doesn't like that just because it doesn't see what we're doing.
|
|
1042
|
+
# otoh, is this a bad way to do it? not sure but it works fine.
|
|
1043
|
+
#
|
|
1044
|
+
reader = DataFileReader( # pylint: disable=E0110
|
|
1028
1045
|
self.scanner.filename, delimiter=self.delimiter, quotechar=self.quotechar
|
|
1029
1046
|
)
|
|
1030
1047
|
for line in reader.next():
|
|
@@ -1032,35 +1049,6 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
1032
1049
|
yield line
|
|
1033
1050
|
self.finalize()
|
|
1034
1051
|
|
|
1035
|
-
"""
|
|
1036
|
-
# potential replacement for method above
|
|
1037
|
-
# this is a proposal for having the results of one csvpath feed into another
|
|
1038
|
-
# in memory. the goal being to both shape the data chain-of-responsibility-style
|
|
1039
|
-
# and also to narrow the data for performance gains.
|
|
1040
|
-
#
|
|
1041
|
-
# we would need:
|
|
1042
|
-
# - csvpaths.chain_result_data
|
|
1043
|
-
# - named-path added to csvpath metadata early-on
|
|
1044
|
-
#
|
|
1045
|
-
# caching this here for now. jury is out on if it should be added.
|
|
1046
|
-
#
|
|
1047
|
-
def _next_line_new(self) -> List[Any]:
|
|
1048
|
-
self.logger.info("beginning to scan file: %s", self.scanner.filename)
|
|
1049
|
-
if self.csvpath and self.csvpaths.chain_result_data:
|
|
1050
|
-
rs = csvpath.result_manager.get_named_results(self.metadata["named-paths"])
|
|
1051
|
-
for line in rs[len(rs)-1].lines:
|
|
1052
|
-
yield line
|
|
1053
|
-
elif:
|
|
1054
|
-
with open(self.scanner.filename, "r", encoding="utf-8") as file:
|
|
1055
|
-
reader = csv.reader(
|
|
1056
|
-
file, delimiter=self.delimiter, quotechar=self.quotechar
|
|
1057
|
-
)
|
|
1058
|
-
for line in reader:
|
|
1059
|
-
self.track_line(line=line)
|
|
1060
|
-
yield line
|
|
1061
|
-
self.finalize()
|
|
1062
|
-
"""
|
|
1063
|
-
|
|
1064
1052
|
def finalize(self) -> None:
|
|
1065
1053
|
"""clears caches, etc. this is an internal method, but not _ because
|
|
1066
1054
|
it is part of the lifecycle and we might find a reason to call it
|
|
@@ -1176,8 +1164,7 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
1176
1164
|
raise InputException(
|
|
1177
1165
|
f"[{self.identity}] Line {self.line_monitor.physical_line_number}: unknown header name: {k}"
|
|
1178
1166
|
)
|
|
1179
|
-
|
|
1180
|
-
ls.append(line[k])
|
|
1167
|
+
ls.append(line[k])
|
|
1181
1168
|
return ls
|
|
1182
1169
|
|
|
1183
1170
|
def advance(self, ff: int = -1) -> None:
|
|
@@ -1210,12 +1197,12 @@ class CsvPath(CsvPathPublic, ErrorCollector, Printer): # pylint: disable=R0902,
|
|
|
1210
1197
|
self.get_total_lines_and_headers()
|
|
1211
1198
|
return self.line_monitor.physical_end_line_number
|
|
1212
1199
|
|
|
1213
|
-
def get_total_lines_and_headers(self) ->
|
|
1200
|
+
def get_total_lines_and_headers(self) -> None: # pylint: disable=C0116
|
|
1214
1201
|
if not self.scanner or not self.scanner.filename:
|
|
1215
1202
|
self.logger.error(
|
|
1216
|
-
|
|
1203
|
+
"Csvpath identified as %s has no filename. Since we could be error handling an exception is not raised.",
|
|
1204
|
+
self.identity,
|
|
1217
1205
|
)
|
|
1218
|
-
return -1
|
|
1219
1206
|
if self.csvpaths:
|
|
1220
1207
|
self.line_monitor = self.csvpaths.file_manager.cacher.get_new_line_monitor(
|
|
1221
1208
|
self.scanner.filename
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
|
|
4
4
|
from abc import ABC, abstractmethod
|
|
5
5
|
from typing import List, Any
|
|
6
|
-
import csv
|
|
7
6
|
import traceback
|
|
8
7
|
from datetime import datetime, timezone
|
|
9
8
|
from .util.error import ErrorHandler, ErrorCollector, Error
|
|
@@ -151,6 +150,8 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
151
150
|
self._run_time_str = None
|
|
152
151
|
|
|
153
152
|
def run_time_str(self, pathsname=None) -> str:
|
|
153
|
+
"""adds the stringified current run time to the named-paths
|
|
154
|
+
group home_dir to create the run_dir"""
|
|
154
155
|
if self._run_time_str is None and pathsname is None:
|
|
155
156
|
raise CsvPathsException(
|
|
156
157
|
"Cannot have None in both run_time_str and pathsname"
|
|
@@ -163,6 +164,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
163
164
|
|
|
164
165
|
@property
|
|
165
166
|
def current_run_time(self) -> datetime:
|
|
167
|
+
"""gets the time marking the start of the run. used to create the run home directory."""
|
|
166
168
|
if self._current_run_time is None:
|
|
167
169
|
self._current_run_time = datetime.now(timezone.utc)
|
|
168
170
|
return self._current_run_time
|
|
@@ -294,7 +296,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
294
296
|
ErrorHandler(
|
|
295
297
|
csvpaths=self, csvpath=csvpath, error_collector=result
|
|
296
298
|
).handle_error(ex)
|
|
297
|
-
except Exception as e:
|
|
299
|
+
except Exception as e: # pylint: disable=W0718
|
|
298
300
|
self.results_manager.save(result)
|
|
299
301
|
raise e
|
|
300
302
|
self.results_manager.save(result)
|
|
@@ -410,6 +412,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
410
412
|
self.logger.debug("Done loading csvpath")
|
|
411
413
|
|
|
412
414
|
def fast_forward_paths(self, *, pathsname, filename):
|
|
415
|
+
"""runs the named-paths group named without collecting matches."""
|
|
413
416
|
paths = self.paths_manager.get_named_paths(pathsname)
|
|
414
417
|
file = self.file_manager.get_named_file(filename)
|
|
415
418
|
self.logger.info("Prepping %s and %s", filename, pathsname)
|
|
@@ -471,7 +474,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
471
474
|
ErrorHandler(
|
|
472
475
|
csvpaths=self, csvpath=csvpath, error_collector=result
|
|
473
476
|
).handle_error(ex)
|
|
474
|
-
except Exception as e:
|
|
477
|
+
except Exception as e: # pylint: disable=W0718
|
|
475
478
|
self.results_manager.save(result)
|
|
476
479
|
raise e
|
|
477
480
|
self.results_manager.save(result)
|
|
@@ -487,7 +490,9 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
487
490
|
"Completed fast_forward_paths %s with %s paths", pathsname, len(paths)
|
|
488
491
|
)
|
|
489
492
|
|
|
490
|
-
def next_paths(
|
|
493
|
+
def next_paths(
|
|
494
|
+
self, *, pathsname, filename, collect: bool = False
|
|
495
|
+
): # pylint: disable=R0914
|
|
491
496
|
"""appends the Result for each CsvPath to the end of
|
|
492
497
|
each line it produces. this is so that the caller can easily
|
|
493
498
|
interrogate the CsvPath for its path parts, file, etc."""
|
|
@@ -562,14 +567,14 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
562
567
|
result.append(line)
|
|
563
568
|
result.unmatched = csvpath.unmatched
|
|
564
569
|
yield line
|
|
565
|
-
except Exception as ex:
|
|
570
|
+
except Exception as ex: # pylint: disable=W0718
|
|
566
571
|
ex.trace = traceback.format_exc()
|
|
567
572
|
ex.source = self
|
|
568
573
|
try:
|
|
569
574
|
ErrorHandler(
|
|
570
575
|
csvpaths=self, csvpath=csvpath, error_collector=result
|
|
571
576
|
).handle_error(ex)
|
|
572
|
-
except Exception as e:
|
|
577
|
+
except Exception as e: # pylint: disable=W0718
|
|
573
578
|
self.results_manager.save(result)
|
|
574
579
|
raise e
|
|
575
580
|
|
|
@@ -636,7 +641,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
636
641
|
filename,
|
|
637
642
|
)
|
|
638
643
|
|
|
639
|
-
def next_by_line( # pylint: disable=R0912
|
|
644
|
+
def next_by_line( # pylint: disable=R0912,R0915,R0914
|
|
640
645
|
self,
|
|
641
646
|
*,
|
|
642
647
|
pathsname,
|
|
@@ -780,7 +785,7 @@ class CsvPaths(CsvPathsPublic, CsvPathsCoordinator, ErrorCollector):
|
|
|
780
785
|
csvpath=self.current_matcher,
|
|
781
786
|
error_collector=self.current_matcher,
|
|
782
787
|
).handle_error(ex)
|
|
783
|
-
except Exception as e:
|
|
788
|
+
except Exception as e: # pylint: disable=W0718
|
|
784
789
|
for r in csvpath_objects:
|
|
785
790
|
result = r[1]
|
|
786
791
|
result.unmatched = r[0].unmatched
|
|
@@ -162,7 +162,6 @@ class FileManager:
|
|
|
162
162
|
self.registrar.register_complete(mdata)
|
|
163
163
|
|
|
164
164
|
def _copy_in(self, path, home) -> None:
|
|
165
|
-
# fname = self._simple_name(path)
|
|
166
165
|
fname = path if path.rfind(os.sep) == -1 else path[path.rfind(os.sep) + 1 :]
|
|
167
166
|
# creates
|
|
168
167
|
# a/file.csv -> named_files/name/file.csv/file.csv
|
|
@@ -18,7 +18,7 @@ class FileRegistrar(Registrar, Listener):
|
|
|
18
18
|
super().__init__(csvpaths)
|
|
19
19
|
self.csvpaths = csvpaths
|
|
20
20
|
self.config = csvpaths.config
|
|
21
|
-
self.
|
|
21
|
+
self.type = "file"
|
|
22
22
|
|
|
23
23
|
def get_fingerprint(self, home) -> str:
|
|
24
24
|
mpath = self.manifest_path(home)
|
|
@@ -110,6 +110,9 @@ class FileRegistrar(Registrar, Listener):
|
|
|
110
110
|
and "file_home" in _
|
|
111
111
|
and _["file_home"] == mdata.file_home
|
|
112
112
|
):
|
|
113
|
+
#
|
|
114
|
+
# leave as info so nobody has to dig to see why no update
|
|
115
|
+
#
|
|
113
116
|
self.csvpaths.logger.info("File has already been registered: %s", jdata)
|
|
114
117
|
return
|
|
115
118
|
self.distribute_update(mdata)
|
{csvpath-0.0.499/csvpath/managers → csvpath-0.0.501/csvpath/managers/integrations}/ol/event.py
RENAMED
|
@@ -11,12 +11,12 @@ from openlineage.client.event_v2 import Dataset, RunEvent
|
|
|
11
11
|
from openlineage.client.event_v2 import Job, Run, RunState
|
|
12
12
|
from openlineage.client.event_v2 import InputDataset, OutputDataset
|
|
13
13
|
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
19
|
-
from
|
|
14
|
+
from csvpath.managers.metadata import Metadata
|
|
15
|
+
from csvpath.managers.results.results_metadata import ResultsMetadata
|
|
16
|
+
from csvpath.managers.results.result_metadata import ResultMetadata
|
|
17
|
+
from csvpath.managers.paths.paths_metadata import PathsMetadata
|
|
18
|
+
from csvpath.managers.files.file_metadata import FileMetadata
|
|
19
|
+
from csvpath.managers.run.run_metadata import RunMetadata
|
|
20
20
|
|
|
21
21
|
from .job import JobBuilder
|
|
22
22
|
from .run import RunBuilder
|