heatmap_cli 0.29.0__tar.gz → 0.29.2__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.29.0/src/heatmap_cli.egg-info → heatmap_cli-0.29.2}/PKG-INFO +1 -1
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/pyproject.toml +5 -1
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli/heatmap.py +10 -7
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2/src/heatmap_cli.egg-info}/PKG-INFO +1 -1
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli.egg-info/SOURCES.txt +1 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_env_flag.py +3 -2
- heatmap_cli-0.29.2/tests/test_main.py +41 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/LICENSE.md +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/README.md +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/setup.cfg +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli/__init__.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli/__main__.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli/cli.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli/py.typed +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli.egg-info/dependency_links.txt +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli.egg-info/entry_points.txt +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli.egg-info/requires.txt +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/src/heatmap_cli.egg-info/top_level.txt +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_agg_backend.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_animate_by_week.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_animate_future_day.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_animate_no_frames.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_animate_open.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_annotate_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_annotation_truncation.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_cbar_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_cmap_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_cmax_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_cmin_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_configure_cbar.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_debug_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_demo_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_end_date_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_direct.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_errors.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_open.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_style_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_utils.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_heatmap_wrapper.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_help_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_iso_53_week_year.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_no_annotate.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_open_heatmap.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_output_dir_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_purge_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_quiet_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_refresh_output_dir.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_setup_logging.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_start_date_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_supported_formats.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_title_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_version_flag.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_week_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_year_option.py +0 -0
- {heatmap_cli-0.29.0 → heatmap_cli-0.29.2}/tests/test_yes_flag.py +0 -0
|
@@ -28,7 +28,7 @@ classifiers = [
|
|
|
28
28
|
"Programming Language :: Python",
|
|
29
29
|
"Topic :: Scientific/Engineering :: Visualization",
|
|
30
30
|
]
|
|
31
|
-
version = "0.29.
|
|
31
|
+
version = "0.29.2"
|
|
32
32
|
keywords = ["heatmap", "cli", "visualization", "calendar", "data-viz"]
|
|
33
33
|
dependencies = [
|
|
34
34
|
"matplotlib",
|
|
@@ -111,6 +111,10 @@ pretty = true
|
|
|
111
111
|
show_column_numbers = true
|
|
112
112
|
show_error_codes = true
|
|
113
113
|
|
|
114
|
+
[[tool.mypy.overrides]]
|
|
115
|
+
module = "noxfile"
|
|
116
|
+
disallow_untyped_decorators = false
|
|
117
|
+
|
|
114
118
|
[tool.pytest.ini_options]
|
|
115
119
|
testpaths = ["tests"]
|
|
116
120
|
addopts = ["--strict-markers"]
|
|
@@ -342,12 +342,15 @@ def _generate_static_heatmaps(
|
|
|
342
342
|
# still returning the generated file so opening works as before.
|
|
343
343
|
seq, cmap = args[0][:2] # (seq, cmap, ...)
|
|
344
344
|
generated_files = [
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
345
|
+
cast(
|
|
346
|
+
"Path | None",
|
|
347
|
+
_generate_heatmap(
|
|
348
|
+
seq,
|
|
349
|
+
cmap,
|
|
350
|
+
config,
|
|
351
|
+
pivoted_dataframe,
|
|
352
|
+
return_image=False,
|
|
353
|
+
),
|
|
351
354
|
)
|
|
352
355
|
]
|
|
353
356
|
else:
|
|
@@ -808,7 +811,7 @@ def _add_grade_legend(axis: Axes, res: Axes, generated_by: str) -> None:
|
|
|
808
811
|
generated_by (str): The "Generated by" line shown as the last row.
|
|
809
812
|
"""
|
|
810
813
|
mesh = cast("QuadMesh", res.collections[0])
|
|
811
|
-
legend_row = _grade_legend_row(mesh.cmap, mesh.norm)
|
|
814
|
+
legend_row = _grade_legend_row(mesh.cmap, cast("Normalize", mesh.norm))
|
|
812
815
|
|
|
813
816
|
legend_block = VPacker(
|
|
814
817
|
children=[
|
|
@@ -13,11 +13,12 @@
|
|
|
13
13
|
# You should have received a copy of the GNU Affero General Public License
|
|
14
14
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
15
|
|
|
16
|
+
from importlib import metadata
|
|
17
|
+
|
|
16
18
|
import matplotlib as mpl
|
|
17
19
|
import pandas as pd
|
|
18
20
|
import pytest
|
|
19
21
|
import seaborn as sns
|
|
20
|
-
from PIL import Image
|
|
21
22
|
|
|
22
23
|
from heatmap_cli import __version__
|
|
23
24
|
|
|
@@ -35,5 +36,5 @@ def test_env_dependency_versions(cli_runner, option):
|
|
|
35
36
|
ret = cli_runner(option)
|
|
36
37
|
assert f"matplotlib: {mpl.__version__}" in ret.stderr
|
|
37
38
|
assert f"pandas: {pd.__version__}" in ret.stderr
|
|
38
|
-
assert f"pillow: {
|
|
39
|
+
assert f"pillow: {metadata.version('pillow')}" in ret.stderr
|
|
39
40
|
assert f"seaborn: {sns.__version__}" in ret.stderr
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# Copyright (C) 2026 Kian-Meng Ang
|
|
2
|
+
#
|
|
3
|
+
# This program is free software: you can redistribute it and/or modify
|
|
4
|
+
# it under the terms of the GNU Affero General Public License as published
|
|
5
|
+
# by the Free Software Foundation, either version 3 of the License, or
|
|
6
|
+
# (at your option) any later version.
|
|
7
|
+
#
|
|
8
|
+
# This program is distributed in the hope that it will be useful,
|
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11
|
+
# GNU Affero General Public License for more details.
|
|
12
|
+
#
|
|
13
|
+
# You should have received a copy of the GNU Affero General Public License
|
|
14
|
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
15
|
+
|
|
16
|
+
"""Test module for package entrypoint (__main__.py)."""
|
|
17
|
+
|
|
18
|
+
import runpy
|
|
19
|
+
import sys
|
|
20
|
+
from unittest.mock import patch
|
|
21
|
+
|
|
22
|
+
import pytest
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def test_main_as_script() -> None:
|
|
26
|
+
"""Run __main__.py as __main__ directly within process."""
|
|
27
|
+
with patch.object(sys, "argv", ["heatmap", "--help"]):
|
|
28
|
+
with pytest.raises(SystemExit) as exc_info:
|
|
29
|
+
runpy.run_module(
|
|
30
|
+
"heatmap_cli.__main__",
|
|
31
|
+
run_name="__main__",
|
|
32
|
+
)
|
|
33
|
+
assert exc_info.value.code in (0, 2, None)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def test_main_as_module() -> None:
|
|
37
|
+
"""Run __main__.py under regular module name."""
|
|
38
|
+
runpy.run_module(
|
|
39
|
+
"heatmap_cli.__main__",
|
|
40
|
+
run_name="heatmap_cli.__main__",
|
|
41
|
+
)
|
|
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
|
|
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
|