countdown-cli 1.0.2__tar.gz → 1.0.3__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.
@@ -1,22 +1,22 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: countdown-cli
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: Terminal program to display countdown timer
5
5
  Home-page: https://github.com/treyhunner/countdown-cli
6
6
  License: MIT
7
7
  Author: Trey Hunner
8
8
  Author-email: trey@treyhunner.com
9
- Requires-Python: >=3.7,<4.0
9
+ Requires-Python: >=3.8.1,<4.0.0
10
10
  Classifier: Development Status :: 4 - Beta
11
11
  Classifier: License :: OSI Approved :: MIT License
12
12
  Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.9
13
14
  Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.7
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
15
17
  Classifier: Programming Language :: Python :: 3.8
16
- Classifier: Programming Language :: Python :: 3.9
17
18
  Requires-Dist: click (>=8.0.1,<9.0.0)
18
19
  Project-URL: Changelog, https://github.com/treyhunner/countdown-cli/releases
19
- Project-URL: Documentation, https://countdown-cli.readthedocs.io
20
20
  Project-URL: Repository, https://github.com/treyhunner/countdown-cli
21
21
  Description-Content-Type: text/x-rst
22
22
 
@@ -25,7 +25,7 @@ countdown-cli
25
25
 
26
26
  |PyPI| |Status| |Python Version| |License|
27
27
 
28
- |Read the Docs| |Tests| |Codecov|
28
+ |Tests| |Codecov|
29
29
 
30
30
  |pre-commit| |Black|
31
31
 
@@ -41,9 +41,6 @@ countdown-cli
41
41
  .. |License| image:: https://img.shields.io/pypi/l/countdown-cli
42
42
  :target: https://opensource.org/licenses/MIT
43
43
  :alt: License
44
- .. |Read the Docs| image:: https://img.shields.io/readthedocs/countdown-cli/latest.svg?label=Read%20the%20Docs
45
- :target: https://countdown-cli.readthedocs.io/
46
- :alt: Read the documentation at https://countdown-cli.readthedocs.io/
47
44
  .. |Tests| image:: https://github.com/treyhunner/countdown-cli/workflows/Tests/badge.svg
48
45
  :target: https://github.com/treyhunner/countdown-cli/actions?workflow=Tests
49
46
  :alt: Tests
@@ -62,11 +59,15 @@ If you're working on that exercise right now, please **don't look at the source
62
59
 
63
60
  |Logo|
64
61
 
65
- .. |Logo| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/python-morsels-logo.png
62
+ .. |Logo| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/python-morsels-logo.png
66
63
  :target: https://www.pythonmorsels.com
67
64
  :width: 400
68
65
  :alt: an adorable snake taking a bite out of a cookie with the words Python Morsels next to it (Python Morsels logo)
69
66
 
67
+ Wondering how this package works?
68
+ **Don't look at the source code just yet!**
69
+ Instead, try implementing this package with the `Python Morsels "countdown" exercise <https://www.pythonmorsels.com/exercises/fc3be8467c634f978eae0c315f5677d1/>`_!
70
+
70
71
 
71
72
  Features
72
73
  --------
@@ -78,11 +79,11 @@ Features
78
79
 
79
80
  |14:57|
80
81
 
81
- .. |32:53| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/3253.png
82
+ .. |32:53| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/3253.png
82
83
  :width: 500
83
84
  :alt: 32:53 shown in large letters in center of an xterm window (black background with white text)
84
85
 
85
- .. |14:57| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/1457.png
86
+ .. |14:57| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/1457.png
86
87
  :width: 500
87
88
  :alt: 14:57 shown in large letters in center of terminal window (light background with darker text)
88
89
 
@@ -103,12 +104,6 @@ You can install *countdown-cli* via pip_ from PyPI_:
103
104
  $ python3 -m pip install countdown-cli
104
105
 
105
106
 
106
- Usage
107
- -----
108
-
109
- Please see the `Command-line Reference <Usage_>`_ for details.
110
-
111
-
112
107
  Contributing
113
108
  ------------
114
109
 
@@ -145,5 +140,4 @@ This project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter
145
140
  .. _pip: https://pip.pypa.io/
146
141
  .. github-only
147
142
  .. _Contributor Guide: CONTRIBUTING.rst
148
- .. _Usage: https://countdown-cli.readthedocs.io/en/latest/usage.html
149
143
 
@@ -3,7 +3,7 @@ countdown-cli
3
3
 
4
4
  |PyPI| |Status| |Python Version| |License|
5
5
 
6
- |Read the Docs| |Tests| |Codecov|
6
+ |Tests| |Codecov|
7
7
 
8
8
  |pre-commit| |Black|
9
9
 
@@ -19,9 +19,6 @@ countdown-cli
19
19
  .. |License| image:: https://img.shields.io/pypi/l/countdown-cli
20
20
  :target: https://opensource.org/licenses/MIT
21
21
  :alt: License
22
- .. |Read the Docs| image:: https://img.shields.io/readthedocs/countdown-cli/latest.svg?label=Read%20the%20Docs
23
- :target: https://countdown-cli.readthedocs.io/
24
- :alt: Read the documentation at https://countdown-cli.readthedocs.io/
25
22
  .. |Tests| image:: https://github.com/treyhunner/countdown-cli/workflows/Tests/badge.svg
26
23
  :target: https://github.com/treyhunner/countdown-cli/actions?workflow=Tests
27
24
  :alt: Tests
@@ -40,11 +37,15 @@ If you're working on that exercise right now, please **don't look at the source
40
37
 
41
38
  |Logo|
42
39
 
43
- .. |Logo| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/python-morsels-logo.png
40
+ .. |Logo| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/python-morsels-logo.png
44
41
  :target: https://www.pythonmorsels.com
45
42
  :width: 400
46
43
  :alt: an adorable snake taking a bite out of a cookie with the words Python Morsels next to it (Python Morsels logo)
47
44
 
45
+ Wondering how this package works?
46
+ **Don't look at the source code just yet!**
47
+ Instead, try implementing this package with the `Python Morsels "countdown" exercise <https://www.pythonmorsels.com/exercises/fc3be8467c634f978eae0c315f5677d1/>`_!
48
+
48
49
 
49
50
  Features
50
51
  --------
@@ -56,11 +57,11 @@ Features
56
57
 
57
58
  |14:57|
58
59
 
59
- .. |32:53| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/3253.png
60
+ .. |32:53| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/3253.png
60
61
  :width: 500
61
62
  :alt: 32:53 shown in large letters in center of an xterm window (black background with white text)
62
63
 
63
- .. |14:57| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/1457.png
64
+ .. |14:57| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/images/1457.png
64
65
  :width: 500
65
66
  :alt: 14:57 shown in large letters in center of terminal window (light background with darker text)
66
67
 
@@ -81,12 +82,6 @@ You can install *countdown-cli* via pip_ from PyPI_:
81
82
  $ python3 -m pip install countdown-cli
82
83
 
83
84
 
84
- Usage
85
- -----
86
-
87
- Please see the `Command-line Reference <Usage_>`_ for details.
88
-
89
-
90
85
  Contributing
91
86
  ------------
92
87
 
@@ -123,4 +118,3 @@ This project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter
123
118
  .. _pip: https://pip.pypa.io/
124
119
  .. github-only
125
120
  .. _Contributor Guide: CONTRIBUTING.rst
126
- .. _Usage: https://countdown-cli.readthedocs.io/en/latest/usage.html
@@ -1,55 +1,52 @@
1
1
  [tool.poetry]
2
2
  name = "countdown-cli"
3
- version = "1.0.2"
3
+ version = "1.0.3"
4
4
  description = "Terminal program to display countdown timer"
5
5
  authors = ["Trey Hunner <trey@treyhunner.com>"]
6
6
  license = "MIT"
7
7
  readme = "README.rst"
8
8
  homepage = "https://github.com/treyhunner/countdown-cli"
9
9
  repository = "https://github.com/treyhunner/countdown-cli"
10
- documentation = "https://countdown-cli.readthedocs.io"
11
10
  packages = [
12
11
  { include = "countdown", from = "src" },
13
12
  ]
14
13
  classifiers = [
15
14
  "Development Status :: 4 - Beta",
15
+ "Programming Language :: Python :: 3.8",
16
+ "Programming Language :: Python :: 3.9",
17
+ "Programming Language :: Python :: 3.10",
18
+ "Programming Language :: Python :: 3.11",
19
+ "Programming Language :: Python :: 3.12",
16
20
  ]
17
21
 
18
22
  [tool.poetry.urls]
19
23
  Changelog = "https://github.com/treyhunner/countdown-cli/releases"
20
24
 
21
25
  [tool.poetry.dependencies]
22
- python = "^3.7"
26
+ python = "^3.8.1"
23
27
  click = "^8.0.1"
24
28
 
25
29
  [tool.poetry.dev-dependencies]
26
- pytest = "^7.0.0"
27
- coverage = {extras = ["toml"], version = "^6.2"}
28
- safety = "^1.10.3"
29
- mypy = "^0.931"
30
- typeguard = "^2.13.3"
31
- xdoctest = {extras = ["colors"], version = "^0.15.10"}
32
- sphinx = "^4.3.2"
33
- sphinx-autobuild = ">=2021.3.14"
30
+ pytest = "^8.2.0"
31
+ coverage = {extras = ["toml"], version = "^7.5.1"}
34
32
  pre-commit = "^2.16.0"
35
- flake8 = "^4.0.1"
36
- black = ">=21.10b0"
37
- flake8-bandit = "^2.1.2"
38
- flake8-bugbear = "^22.1.11"
39
- flake8-docstrings = "^1.6.0"
40
- flake8-rst-docstrings = "^0.2.5"
41
- pep8-naming = "^0.12.1"
42
- darglint = "^1.8.1"
43
- reorder-python-imports = "^2.6.0"
44
- pre-commit-hooks = "^4.1.0"
45
- sphinx-click = "^3.0.2"
46
- Pygments = "^2.11.2"
47
- pyupgrade = "^2.31.0"
48
- furo = ">=2021.11.12"
33
+ flake8 = "^7.0.0"
34
+ black = "^24.4.2"
35
+ flake8-bandit = "^4.1.1"
36
+ flake8-bugbear = "^24.4.26"
37
+ flake8-docstrings = "^1.7.0"
38
+ flake8-rst-docstrings = "^0.3.0"
39
+ pep8-naming = "^0.13.3"
40
+ reorder-python-imports = "^3.12.0"
41
+ pre-commit-hooks = "^4.6.0"
42
+ docutils = { version = "!=0.21.post1", optional = true }
49
43
 
50
44
  [tool.poetry.scripts]
51
45
  countdown = "countdown.__main__:main"
52
46
 
47
+ [tool.poetry.group.dev.dependencies]
48
+ tomli = "^2.0.1"
49
+
53
50
  [tool.coverage.paths]
54
51
  source = ["src", "*/site-packages"]
55
52
  tests = ["tests", "*/tests"]
@@ -60,7 +57,7 @@ source = ["countdown", "tests"]
60
57
 
61
58
  [tool.coverage.report]
62
59
  show_missing = true
63
- fail_under = 100
60
+ fail_under = 96
64
61
 
65
62
  [tool.mypy]
66
63
  strict = true
@@ -1,5 +1,4 @@
1
1
  """Command-line interface."""
2
- from __future__ import annotations
3
2
 
4
3
  import re
5
4
  import shutil
@@ -46,7 +45,7 @@ CHARS = {
46
45
  CLEAR = "\033[H\033[J"
47
46
 
48
47
 
49
- def duration(string: str) -> int:
48
+ def duration(string):
50
49
  """Convert given XmXs string to seconds (as an integer)."""
51
50
  match = DURATION_RE.search(string)
52
51
  if not match:
@@ -58,7 +57,7 @@ def duration(string: str) -> int:
58
57
  @click.command()
59
58
  @click.version_option(package_name="countdown-cli")
60
59
  @click.argument("duration", type=duration)
61
- def main(duration: int) -> None:
60
+ def main(duration):
62
61
  """Countdown from the given duration to 0.
63
62
 
64
63
  DURATION should be a number followed by m or s for minutes or seconds.
@@ -67,7 +66,7 @@ def main(duration: int) -> None:
67
66
 
68
67
  \b
69
68
  - 5m (5 minutes)
70
- - 45s (30 seconds)
69
+ - 45s (45 seconds)
71
70
  - 2m30s (2 minutes and 30 seconds)
72
71
  """ # noqa: D301
73
72
  enable_ansi_escape_codes()
@@ -83,7 +82,7 @@ def main(duration: int) -> None:
83
82
  print(SHOW_CURSOR + DISABLE_ALT_BUFFER, end="")
84
83
 
85
84
 
86
- def enable_ansi_escape_codes() -> None:
85
+ def enable_ansi_escape_codes():
87
86
  """If running on Windows, enable ANSI escape codes."""
88
87
  if sys.platform == "win32": # pragma: no cover
89
88
  from ctypes import windll
@@ -101,7 +100,7 @@ def enable_ansi_escape_codes() -> None:
101
100
  )
102
101
 
103
102
 
104
- def print_full_screen(lines: list[str]) -> None:
103
+ def print_full_screen(lines):
105
104
  """Print the given lines centered in the middle of the terminal window."""
106
105
  width, height = shutil.get_terminal_size()
107
106
  width -= max(len(line) for line in lines)
@@ -111,7 +110,7 @@ def print_full_screen(lines: list[str]) -> None:
111
110
  print(CLEAR + vertical_pad + padded_text, flush=True)
112
111
 
113
112
 
114
- def get_number_lines(seconds: int) -> list[str]:
113
+ def get_number_lines(seconds):
115
114
  """Return list of lines which make large MM:SS glyphs for given seconds."""
116
115
  lines = [""] * 5
117
116
  minutes, seconds = divmod(seconds, 60)
@@ -1,38 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- from setuptools import setup
3
-
4
- package_dir = \
5
- {'': 'src'}
6
-
7
- packages = \
8
- ['countdown']
9
-
10
- package_data = \
11
- {'': ['*']}
12
-
13
- install_requires = \
14
- ['click>=8.0.1,<9.0.0']
15
-
16
- entry_points = \
17
- {'console_scripts': ['countdown = countdown.__main__:main']}
18
-
19
- setup_kwargs = {
20
- 'name': 'countdown-cli',
21
- 'version': '1.0.2',
22
- 'description': 'Terminal program to display countdown timer',
23
- 'long_description': "countdown-cli\n=============\n\n|PyPI| |Status| |Python Version| |License|\n\n|Read the Docs| |Tests| |Codecov|\n\n|pre-commit| |Black|\n\n.. |PyPI| image:: https://img.shields.io/pypi/v/countdown-cli.svg\n :target: https://pypi.org/project/countdown-cli/\n :alt: PyPI\n.. |Status| image:: https://img.shields.io/pypi/status/countdown-cli.svg\n :target: https://pypi.org/project/countdown-cli/\n :alt: Status\n.. |Python Version| image:: https://img.shields.io/pypi/pyversions/countdown-cli\n :target: https://pypi.org/project/countdown-cli\n :alt: Python Version\n.. |License| image:: https://img.shields.io/pypi/l/countdown-cli\n :target: https://opensource.org/licenses/MIT\n :alt: License\n.. |Read the Docs| image:: https://img.shields.io/readthedocs/countdown-cli/latest.svg?label=Read%20the%20Docs\n :target: https://countdown-cli.readthedocs.io/\n :alt: Read the documentation at https://countdown-cli.readthedocs.io/\n.. |Tests| image:: https://github.com/treyhunner/countdown-cli/workflows/Tests/badge.svg\n :target: https://github.com/treyhunner/countdown-cli/actions?workflow=Tests\n :alt: Tests\n.. |Codecov| image:: https://codecov.io/gh/treyhunner/countdown-cli/branch/main/graph/badge.svg\n :target: https://codecov.io/gh/treyhunner/countdown-cli\n :alt: Codecov\n.. |pre-commit| image:: https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white\n :target: https://github.com/pre-commit/pre-commit\n :alt: pre-commit\n.. |Black| image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n :alt: Black\n\nThis project is based on a `Python Morsels`_ exercise for a command-line countdown timer.\nIf you're working on that exercise right now, please **don't look at the source code** for this. 😉\n\n|Logo|\n\n.. |Logo| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/python-morsels-logo.png\n :target: https://www.pythonmorsels.com\n :width: 400\n :alt: an adorable snake taking a bite out of a cookie with the words Python Morsels next to it (Python Morsels logo)\n\n\nFeatures\n--------\n\n* Full-screen countdown timer, centered in the terminal window\n* Command-line interface for Linux/Mac/Windows\n\n|32:53|\n\n|14:57|\n\n.. |32:53| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/3253.png\n :width: 500\n :alt: 32:53 shown in large letters in center of an xterm window (black background with white text)\n\n.. |14:57| image:: https://raw.githubusercontent.com/treyhunner/countdown-cli/main/docs/images/1457.png\n :width: 500\n :alt: 14:57 shown in large letters in center of terminal window (light background with darker text)\n\n\nRequirements\n------------\n\n* Python 3.7+\n\n\nInstallation\n------------\n\nYou can install *countdown-cli* via pip_ from PyPI_:\n\n.. code:: console\n\n $ python3 -m pip install countdown-cli\n\n\nUsage\n-----\n\nPlease see the `Command-line Reference <Usage_>`_ for details.\n\n\nContributing\n------------\n\nContributions are very welcome.\nTo learn more, see the `Contributor Guide`_.\n\n\nLicense\n-------\n\nDistributed under the terms of the `MIT license`_,\n*countdown-cli* is free and open source software.\n\n\nIssues\n------\n\nIf you encounter any problems,\nplease `file an issue`_ along with a detailed description.\n\n\nCredits\n-------\n\nThis project was generated from `@cjolowicz`_'s `Hypermodern Python Cookiecutter`_ template.\n\n.. _Python Morsels: https://www.pythonmorsels.com\n.. _@cjolowicz: https://github.com/cjolowicz\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _MIT license: https://opensource.org/licenses/MIT\n.. _PyPI: https://pypi.org/project/countdown-cli/\n.. _Hypermodern Python Cookiecutter: https://github.com/cjolowicz/cookiecutter-hypermodern-python\n.. _file an issue: https://github.com/treyhunner/countdown-cli/issues\n.. _pip: https://pip.pypa.io/\n.. github-only\n.. _Contributor Guide: CONTRIBUTING.rst\n.. _Usage: https://countdown-cli.readthedocs.io/en/latest/usage.html\n",
24
- 'author': 'Trey Hunner',
25
- 'author_email': 'trey@treyhunner.com',
26
- 'maintainer': None,
27
- 'maintainer_email': None,
28
- 'url': 'https://github.com/treyhunner/countdown-cli',
29
- 'package_dir': package_dir,
30
- 'packages': packages,
31
- 'package_data': package_data,
32
- 'install_requires': install_requires,
33
- 'entry_points': entry_points,
34
- 'python_requires': '>=3.7,<4.0',
35
- }
36
-
37
-
38
- setup(**setup_kwargs)
File without changes
File without changes