csv-detective 0.9.2.dev1874__py3-none-any.whl → 0.9.3.dev0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. csv_detective/__init__.py +1 -2
  2. csv_detective/detect_fields/FR/geo/latitude_l93/__init__.py +1 -1
  3. csv_detective/detect_fields/FR/geo/latitude_wgs_fr_metropole/__init__.py +1 -1
  4. csv_detective/detect_fields/FR/geo/longitude_l93/__init__.py +1 -1
  5. csv_detective/detect_fields/FR/geo/longitude_wgs_fr_metropole/__init__.py +1 -1
  6. csv_detective/detect_fields/geo/latitude_wgs/__init__.py +1 -1
  7. csv_detective/detect_fields/geo/longitude_wgs/__init__.py +1 -1
  8. csv_detective/detect_fields/other/email/__init__.py +2 -2
  9. csv_detective/detect_fields/temp/date/__init__.py +1 -2
  10. csv_detective/detect_fields/temp/datetime_aware/__init__.py +7 -6
  11. csv_detective/detect_fields/temp/datetime_naive/__init__.py +4 -8
  12. csv_detective/detection/engine.py +1 -2
  13. csv_detective/detection/formats.py +14 -8
  14. csv_detective/detection/headers.py +2 -2
  15. csv_detective/explore_csv.py +11 -119
  16. csv_detective/load_tests.py +1 -2
  17. csv_detective/output/__init__.py +11 -14
  18. csv_detective/output/dataframe.py +1 -2
  19. csv_detective/output/example.py +12 -12
  20. csv_detective/output/profile.py +13 -10
  21. csv_detective/output/schema.py +7 -86
  22. csv_detective/parsing/excel.py +2 -3
  23. csv_detective/parsing/load.py +3 -4
  24. csv_detective/utils.py +4 -3
  25. csv_detective/validate.py +4 -5
  26. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/METADATA +18 -26
  27. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/RECORD +34 -36
  28. tests/test_fields.py +37 -4
  29. tests/test_file.py +68 -0
  30. venv/bin/activate_this.py +1 -1
  31. csv_detective/s3_utils.py +0 -44
  32. venv/bin/jp.py +0 -54
  33. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/WHEEL +0 -0
  34. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/entry_points.txt +0 -0
  35. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/licenses/LICENSE +0 -0
  36. {csv_detective-0.9.2.dev1874.dist-info → csv_detective-0.9.3.dev0.dist-info}/top_level.txt +0 -0
venv/bin/jp.py DELETED
@@ -1,54 +0,0 @@
1
- #!/home/circleci/project/venv/bin/python
2
-
3
- import sys
4
- import json
5
- import argparse
6
- from pprint import pformat
7
-
8
- import jmespath
9
- from jmespath import exceptions
10
-
11
-
12
- def main():
13
- parser = argparse.ArgumentParser()
14
- parser.add_argument('expression')
15
- parser.add_argument('-f', '--filename',
16
- help=('The filename containing the input data. '
17
- 'If a filename is not given then data is '
18
- 'read from stdin.'))
19
- parser.add_argument('--ast', action='store_true',
20
- help=('Pretty print the AST, do not search the data.'))
21
- args = parser.parse_args()
22
- expression = args.expression
23
- if args.ast:
24
- # Only print the AST
25
- expression = jmespath.compile(args.expression)
26
- sys.stdout.write(pformat(expression.parsed))
27
- sys.stdout.write('\n')
28
- return 0
29
- if args.filename:
30
- with open(args.filename, 'r') as f:
31
- data = json.load(f)
32
- else:
33
- data = sys.stdin.read()
34
- data = json.loads(data)
35
- try:
36
- sys.stdout.write(json.dumps(
37
- jmespath.search(expression, data), indent=4, ensure_ascii=False))
38
- sys.stdout.write('\n')
39
- except exceptions.ArityError as e:
40
- sys.stderr.write("invalid-arity: %s\n" % e)
41
- return 1
42
- except exceptions.JMESPathTypeError as e:
43
- sys.stderr.write("invalid-type: %s\n" % e)
44
- return 1
45
- except exceptions.UnknownFunctionError as e:
46
- sys.stderr.write("unknown-function: %s\n" % e)
47
- return 1
48
- except exceptions.ParseError as e:
49
- sys.stderr.write("syntax-error: %s\n" % e)
50
- return 1
51
-
52
-
53
- if __name__ == '__main__':
54
- sys.exit(main())