heatmap_cli 0.22.30__tar.gz → 0.22.32__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.
- {heatmap_cli-0.22.30/src/heatmap_cli.egg-info → heatmap_cli-0.22.32}/PKG-INFO +1 -1
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/pyproject.toml +1 -1
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli/__init__.py +1 -8
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli/cli.py +6 -8
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32/src/heatmap_cli.egg-info}/PKG-INFO +1 -1
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/LICENSE.md +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/README.md +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/setup.cfg +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli/__main__.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli/heatmap.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli.egg-info/SOURCES.txt +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli.egg-info/dependency_links.txt +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli.egg-info/entry_points.txt +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli.egg-info/requires.txt +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/src/heatmap_cli.egg-info/top_level.txt +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_animate_by_week.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_annotate_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_cbar_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_cmap_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_cmax_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_cmin_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_debug_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_demo_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_end_date_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_env_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_heatmap_direct.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_heatmap_errors.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_heatmap_utils.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_help_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_output_dir_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_purge_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_quiet_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_start_date_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_title_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_verbose_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_version_flag.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_week_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_year_option.py +0 -0
- {heatmap_cli-0.22.30 → heatmap_cli-0.22.32}/tests/test_yes_flag.py +0 -0
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Programming Language :: Python",
|
|
26
26
|
"Topic :: Scientific/Engineering :: Visualization",
|
|
27
27
|
]
|
|
28
|
-
version = "0.22.
|
|
28
|
+
version = "0.22.32"
|
|
29
29
|
keywords = ["heatmap", "cli", "visualization", "calendar", "data-viz"]
|
|
30
30
|
dependencies = [
|
|
31
31
|
"matplotlib",
|
|
@@ -106,18 +106,11 @@ class DemoAction(argparse.Action):
|
|
|
106
106
|
namespace.input_filename = f"{namespace.output_dir}/sample.csv"
|
|
107
107
|
namespace.year = datetime.datetime.now(tz=datetime.timezone.utc).year
|
|
108
108
|
namespace.week = 52
|
|
109
|
-
namespace.demo = values
|
|
110
|
-
namespace.annotate = True
|
|
111
109
|
namespace.cbar = True
|
|
112
110
|
namespace.cmap = random.sample(CMAPS, cast("int", values))
|
|
113
|
-
namespace.cmap_min = False
|
|
114
|
-
namespace.cmap_max = False
|
|
115
|
-
namespace.format = "png"
|
|
116
|
-
namespace.title = False
|
|
117
111
|
namespace.debug = True
|
|
118
|
-
namespace.
|
|
112
|
+
namespace.demo = values
|
|
119
113
|
namespace.purge = True
|
|
120
|
-
namespace.yes = False
|
|
121
114
|
|
|
122
115
|
self._generate_sample_csv(namespace)
|
|
123
116
|
setup_logging(namespace)
|
|
@@ -72,9 +72,7 @@ def _valid_date(s: str) -> str:
|
|
|
72
72
|
argparse.ArgumentTypeError: If the date format is invalid.
|
|
73
73
|
"""
|
|
74
74
|
try:
|
|
75
|
-
datetime.datetime.strptime(s, "%Y-%m-%d")
|
|
76
|
-
tzinfo=datetime.timezone.utc,
|
|
77
|
-
)
|
|
75
|
+
datetime.datetime.strptime(s, "%Y-%m-%d") # noqa: DTZ007
|
|
78
76
|
except ValueError as error:
|
|
79
77
|
msg = f"invalid date format: '{s}', expected YYYY-MM-DD."
|
|
80
78
|
raise argparse.ArgumentTypeError(msg) from error
|
|
@@ -289,7 +287,7 @@ def build_parser() -> argparse.ArgumentParser:
|
|
|
289
287
|
default=True,
|
|
290
288
|
action=argparse.BooleanOptionalAction,
|
|
291
289
|
dest="annotate",
|
|
292
|
-
help="add count to each heatmap region",
|
|
290
|
+
help="add count to each heatmap region (use --no-annotate to disable)",
|
|
293
291
|
)
|
|
294
292
|
|
|
295
293
|
parser.add_argument(
|
|
@@ -388,7 +386,7 @@ def _process_args(
|
|
|
388
386
|
Raises:
|
|
389
387
|
SystemExit: If validation fails, typically via parser.error().
|
|
390
388
|
"""
|
|
391
|
-
# Handle --
|
|
389
|
+
# Handle --end-date overriding --year and --week
|
|
392
390
|
if parsed_args.end_date:
|
|
393
391
|
date = datetime.datetime.strptime(
|
|
394
392
|
parsed_args.end_date,
|
|
@@ -433,12 +431,12 @@ def main(args: Sequence[str] | None = None) -> None:
|
|
|
433
431
|
generation.
|
|
434
432
|
|
|
435
433
|
Args:
|
|
436
|
-
args (
|
|
434
|
+
args (Sequence[str] | None): Argument passed through the command line.
|
|
437
435
|
|
|
438
436
|
Returns:
|
|
439
437
|
None
|
|
440
438
|
"""
|
|
441
|
-
|
|
439
|
+
argv = args if args is not None else sys.argv[1:]
|
|
442
440
|
parser = build_parser()
|
|
443
441
|
# Use parse_known_args to potentially capture debug flag even if other args
|
|
444
442
|
# fail. However, we'll rely on the full parse_args within the try block for
|
|
@@ -447,7 +445,7 @@ def main(args: Sequence[str] | None = None) -> None:
|
|
|
447
445
|
debug_active = False # Initialize to False, will be set after parsing
|
|
448
446
|
|
|
449
447
|
try:
|
|
450
|
-
parsed_args = parser.parse_args(
|
|
448
|
+
parsed_args = parser.parse_args(argv)
|
|
451
449
|
debug_active = parsed_args.debug
|
|
452
450
|
|
|
453
451
|
processed_args = _process_args(parser, parsed_args)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|