heatmap_cli 0.28.0__tar.gz → 0.29.0__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.
Files changed (54) hide show
  1. {heatmap_cli-0.28.0/src/heatmap_cli.egg-info → heatmap_cli-0.29.0}/PKG-INFO +3 -3
  2. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/pyproject.toml +5 -5
  3. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli/cli.py +2 -2
  4. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli/heatmap.py +2 -2
  5. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0/src/heatmap_cli.egg-info}/PKG-INFO +3 -3
  6. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_help_flag.py +22 -4
  7. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_week_option.py +1 -3
  8. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_year_option.py +4 -4
  9. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/LICENSE.md +0 -0
  10. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/README.md +0 -0
  11. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/setup.cfg +0 -0
  12. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli/__init__.py +0 -0
  13. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli/__main__.py +0 -0
  14. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli/py.typed +0 -0
  15. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli.egg-info/SOURCES.txt +0 -0
  16. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli.egg-info/dependency_links.txt +0 -0
  17. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli.egg-info/entry_points.txt +0 -0
  18. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli.egg-info/requires.txt +0 -0
  19. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/src/heatmap_cli.egg-info/top_level.txt +0 -0
  20. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_agg_backend.py +0 -0
  21. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_animate_by_week.py +0 -0
  22. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_animate_future_day.py +0 -0
  23. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_animate_no_frames.py +0 -0
  24. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_animate_open.py +0 -0
  25. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_annotate_flag.py +0 -0
  26. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_annotation_truncation.py +0 -0
  27. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_cbar_flag.py +0 -0
  28. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_cmap_option.py +0 -0
  29. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_cmax_option.py +0 -0
  30. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_cmin_option.py +0 -0
  31. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_configure_cbar.py +0 -0
  32. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_debug_flag.py +0 -0
  33. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_demo_option.py +0 -0
  34. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_end_date_option.py +0 -0
  35. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_env_flag.py +0 -0
  36. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_direct.py +0 -0
  37. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_errors.py +0 -0
  38. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_open.py +0 -0
  39. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_style_option.py +0 -0
  40. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_utils.py +0 -0
  41. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_heatmap_wrapper.py +0 -0
  42. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_iso_53_week_year.py +0 -0
  43. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_no_annotate.py +0 -0
  44. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_open_heatmap.py +0 -0
  45. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_output_dir_option.py +0 -0
  46. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_purge_flag.py +0 -0
  47. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_quiet_flag.py +0 -0
  48. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_refresh_output_dir.py +0 -0
  49. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_setup_logging.py +0 -0
  50. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_start_date_option.py +0 -0
  51. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_supported_formats.py +0 -0
  52. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_title_option.py +0 -0
  53. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_version_flag.py +0 -0
  54. {heatmap_cli-0.28.0 → heatmap_cli-0.29.0}/tests/test_yes_flag.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: heatmap_cli
3
- Version: 0.28.0
3
+ Version: 0.29.0
4
4
  Summary: A console program that generates a yearly calendar heatmap.
5
5
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -11,14 +11,14 @@ Keywords: heatmap,cli,visualization,calendar,data-viz
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: 3.15
19
19
  Classifier: Programming Language :: Python
20
20
  Classifier: Topic :: Scientific/Engineering :: Visualization
21
- Requires-Python: >=3.10
21
+ Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE.md
24
24
  Requires-Dist: matplotlib
@@ -12,7 +12,7 @@ heatmap_cli = ["py.typed"]
12
12
  name = "heatmap_cli"
13
13
  description = "A console program that generates a yearly calendar heatmap."
14
14
  authors = [{name = "Kian-Meng Ang", email = "kianmeng@cpan.org"}]
15
- requires-python = ">=3.10"
15
+ requires-python = ">=3.11"
16
16
  readme = "README.md"
17
17
  license = "AGPL-3.0-or-later"
18
18
  license-files = ["LICENSE.md"]
@@ -20,15 +20,15 @@ classifiers = [
20
20
  "Development Status :: 4 - Beta",
21
21
  "Environment :: Console",
22
22
  "Programming Language :: Python :: 3 :: Only",
23
- "Programming Language :: Python :: 3.10",
24
23
  "Programming Language :: Python :: 3.11",
25
24
  "Programming Language :: Python :: 3.12",
26
25
  "Programming Language :: Python :: 3.13",
27
26
  "Programming Language :: Python :: 3.14",
27
+ "Programming Language :: Python :: 3.15",
28
28
  "Programming Language :: Python",
29
29
  "Topic :: Scientific/Engineering :: Visualization",
30
30
  ]
31
- version = "0.28.0"
31
+ version = "0.29.0"
32
32
  keywords = ["heatmap", "cli", "visualization", "calendar", "data-viz"]
33
33
  dependencies = [
34
34
  "matplotlib",
@@ -78,7 +78,7 @@ lint = [
78
78
 
79
79
  [tool.ruff]
80
80
  line-length = 79
81
- target-version = "py310"
81
+ target-version = "py311"
82
82
  output-format = "grouped"
83
83
 
84
84
  [tool.ruff.lint]
@@ -104,7 +104,7 @@ ignore = [
104
104
  convention = "google"
105
105
 
106
106
  [tool.mypy]
107
- python_version = "3.10"
107
+ python_version = "3.11"
108
108
  strict = true
109
109
  ignore_missing_imports = true
110
110
  pretty = true
@@ -580,7 +580,7 @@ def _apply_demo_overrides(parsed_args: argparse.Namespace) -> None:
580
580
 
581
581
  iso_year = (
582
582
  datetime.datetime.now(
583
- tz=datetime.timezone.utc,
583
+ tz=datetime.UTC,
584
584
  )
585
585
  .isocalendar()
586
586
  .year
@@ -655,7 +655,7 @@ def _process_args(
655
655
 
656
656
  # Handle defaults for year and week
657
657
  (default_year, default_week) = _default_year_and_week(
658
- datetime.datetime.now(tz=datetime.timezone.utc)
658
+ datetime.datetime.now(tz=datetime.UTC)
659
659
  )
660
660
  if parsed_args.year is None:
661
661
  parsed_args.year = default_year
@@ -25,7 +25,7 @@ import os
25
25
  import re
26
26
  import shutil
27
27
  import webbrowser
28
- from datetime import date, datetime, timedelta, timezone
28
+ from datetime import UTC, date, datetime, timedelta
29
29
  from pathlib import Path
30
30
  from typing import TYPE_CHECKING, Any, cast
31
31
 
@@ -207,7 +207,7 @@ def _week_start_date(year: int, week: int) -> date:
207
207
  """
208
208
  return (
209
209
  datetime.strptime(f"{year}-W{week}-1", "%G-W%V-%u")
210
- .replace(tzinfo=timezone.utc)
210
+ .replace(tzinfo=UTC)
211
211
  .date()
212
212
  )
213
213
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: heatmap_cli
3
- Version: 0.28.0
3
+ Version: 0.29.0
4
4
  Summary: A console program that generates a yearly calendar heatmap.
5
5
  Author-email: Kian-Meng Ang <kianmeng@cpan.org>
6
6
  License-Expression: AGPL-3.0-or-later
@@ -11,14 +11,14 @@ Keywords: heatmap,cli,visualization,calendar,data-viz
11
11
  Classifier: Development Status :: 4 - Beta
12
12
  Classifier: Environment :: Console
13
13
  Classifier: Programming Language :: Python :: 3 :: Only
14
- Classifier: Programming Language :: Python :: 3.10
15
14
  Classifier: Programming Language :: Python :: 3.11
16
15
  Classifier: Programming Language :: Python :: 3.12
17
16
  Classifier: Programming Language :: Python :: 3.13
18
17
  Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: 3.15
19
19
  Classifier: Programming Language :: Python
20
20
  Classifier: Topic :: Scientific/Engineering :: Visualization
21
- Requires-Python: >=3.10
21
+ Requires-Python: >=3.11
22
22
  Description-Content-Type: text/markdown
23
23
  License-File: LICENSE.md
24
24
  Requires-Dist: matplotlib
@@ -13,6 +13,7 @@
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
+ import re
16
17
  from pathlib import Path
17
18
 
18
19
  import pytest
@@ -59,12 +60,29 @@ def test_readme_help_block_is_in_sync(cli_runner):
59
60
  "colormap set; re-run `nox -s readme`"
60
61
  )
61
62
 
63
+ ret = cli_runner("-h", expect_error=False)
64
+ assert _normalize_help(block) == _normalize_help(ret.stdout)
65
+
66
+
67
+ def _normalize_help(text: str) -> str:
68
+ """Remove formatting that varies with the Python version.
69
+
70
+ Args:
71
+ text (str): Raw ``heatmap -h`` output.
72
+
73
+ Returns:
74
+ str: Output with whitespace collapsed and option aliases
75
+ normalized, so Python 3.11's ``-y YEAR, --year YEAR``
76
+ matches Python 3.13+'s ``-y, --year YEAR``.
77
+ """
62
78
  # argparse reflows the usage block to the terminal width, so compare
63
79
  # wording only, not line wrapping.
64
- collapse_whitespace = lambda text: " ".join(text.split()) # noqa: E731
65
-
66
- ret = cli_runner("-h", expect_error=False)
67
- assert collapse_whitespace(block) == collapse_whitespace(ret.stdout)
80
+ text = " ".join(text.split())
81
+ return re.sub(
82
+ r"(-{1,2}[\w-]+) ([A-Z][A-Z0-9_]*), (-{1,2}[\w-]+) \2",
83
+ r"\1, \3 \2",
84
+ text,
85
+ )
68
86
 
69
87
 
70
88
  def test_help_output_has_no_trailing_whitespace(cli_runner):
@@ -21,9 +21,7 @@ import pytest
21
21
  def test_default_week_is_current_week(cli_runner, csv_file):
22
22
  """Test that --week defaults to the current ISO week when not provided."""
23
23
  csv = csv_file("sample.csv")
24
- expected_week = (
25
- datetime.datetime.now(tz=datetime.timezone.utc).isocalendar().week
26
- )
24
+ expected_week = datetime.datetime.now(tz=datetime.UTC).isocalendar().week
27
25
  ret = cli_runner(csv, "-y", "2024", "-d")
28
26
 
29
27
  assert f"week={expected_week}" in ret.stderr
@@ -64,21 +64,21 @@ def test_multiple_years_generates_multiple_files(cli_runner, csv_file, tmpdir):
64
64
  ("now", "expected"),
65
65
  [
66
66
  (
67
- datetime.datetime(2023, 6, 15, tzinfo=datetime.timezone.utc),
67
+ datetime.datetime(2023, 6, 15, tzinfo=datetime.UTC),
68
68
  (2023, 24),
69
69
  ),
70
70
  # The ISO year has already rolled over, so the calendar year and
71
71
  # the week number would otherwise describe different weeks.
72
72
  (
73
- datetime.datetime(2024, 12, 30, tzinfo=datetime.timezone.utc),
73
+ datetime.datetime(2024, 12, 30, tzinfo=datetime.UTC),
74
74
  (2025, 1),
75
75
  ),
76
76
  (
77
- datetime.datetime(2026, 1, 1, tzinfo=datetime.timezone.utc),
77
+ datetime.datetime(2026, 1, 1, tzinfo=datetime.UTC),
78
78
  (2026, 1),
79
79
  ),
80
80
  (
81
- datetime.datetime(2026, 12, 31, tzinfo=datetime.timezone.utc),
81
+ datetime.datetime(2026, 12, 31, tzinfo=datetime.UTC),
82
82
  (2026, 53),
83
83
  ),
84
84
  ],
File without changes
File without changes
File without changes