Coverage for src/es_fieldusage/defaults.py: 100%
7 statements
« prev ^ index » next coverage.py v7.7.1, created at 2025-03-26 17:48 -0600
« prev ^ index » next coverage.py v7.7.1, created at 2025-03-26 17:48 -0600
1"""Default values and constants"""
3# pylint: disable=E1120
4import typing as t
5import os
8# This value is hard-coded in the Dockerfile, so don't change it
9FILEPATH_OVERRIDE: str = '/fileoutput'
11INDEXNAME: str = 'es-fieldusage'
13EPILOG: str = 'Learn more at https://github.com/untergeek/es-fieldusage'
15HELP_OPTIONS: t.Dict[str, t.List[str]] = {'help_option_names': ['-h', '--help']}
17OPTS: t.Dict[str, t.Dict[str, t.Any]] = {
18 'report': {
19 'help': 'Show a summary report',
20 'default': True,
21 'show_default': True,
22 },
23 'headers': {
24 'help': 'Show block headers for un|accessed fields',
25 'default': True,
26 'show_default': True,
27 },
28 'accessed': {
29 'help': 'Show accessed fields',
30 'default': False,
31 'show_default': True,
32 },
33 'unaccessed': {
34 'help': 'Show unaccessed fields',
35 'default': False,
36 'show_default': True,
37 },
38 'counts': {
39 'help': 'Show field access counts',
40 'default': False,
41 'show_default': True,
42 },
43 'delimiter': {
44 'help': 'Value delimiter if access counts are shown',
45 'type': str,
46 'default': ',',
47 'show_default': True,
48 },
49 'index': {
50 'help': 'Create one file per index found',
51 'default': False,
52 'show_default': True,
53 },
54 'indexname': {
55 'help': 'Write results to named ES index',
56 'default': INDEXNAME,
57 'show_default': True,
58 },
59 'filepath': {
60 'help': 'Path where files will be written',
61 'default': os.getcwd(),
62 'show_default': True,
63 },
64 'prefix': {
65 'help': 'Filename prefix',
66 'default': 'es_fieldusage',
67 'show_default': True,
68 },
69 'suffix': {
70 'help': 'Filename suffix',
71 'default': 'csv',
72 'show_default': True,
73 },
74 'show_hidden': {'help': 'Show all options', 'is_flag': True, 'default': False},
75}