wwvb 8.0.0rc1__tar.gz → 8.0.0rc2__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 (72) hide show
  1. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.forgejo/workflows/ci.yml +1 -1
  2. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.pre-commit-config.yaml +1 -1
  3. {wwvb-8.0.0rc1/src/wwvb.egg-info → wwvb-8.0.0rc2}/PKG-INFO +3 -6
  4. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/pyproject.toml +2 -5
  5. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/__init__.py +9 -4
  6. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/__version__.py +3 -3
  7. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/updateiers.py +4 -1
  8. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2/src/wwvb.egg-info}/PKG-INFO +3 -6
  9. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testuwwvb.py +1 -6
  10. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.forgejo/workflows/cron.yml +0 -0
  11. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.forgejo/workflows/release.yml +0 -0
  12. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.gitignore +0 -0
  13. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/.readthedocs.yaml +0 -0
  14. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/LICENSES/CC0-1.0.txt +0 -0
  15. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/LICENSES/GPL-3.0-only.txt +0 -0
  16. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/LICENSES/Unlicense.txt +0 -0
  17. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/Makefile +0 -0
  18. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/README.md +0 -0
  19. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/doc/_static/.empty +0 -0
  20. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/doc/conf.py +0 -0
  21. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/doc/index.rst +0 -0
  22. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/requirements-dev.txt +0 -0
  23. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/requirements.txt +0 -0
  24. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/setup.cfg +0 -0
  25. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/uwwvb.py +0 -0
  26. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/decode.py +0 -0
  27. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/dut1table.py +0 -0
  28. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/gen.py +0 -0
  29. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/iersdata.json +0 -0
  30. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/iersdata.json.license +0 -0
  31. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/iersdata.py +0 -0
  32. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/py.typed +0 -0
  33. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/tz.py +0 -0
  34. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb/wwvbtk.py +0 -0
  35. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb.egg-info/SOURCES.txt +0 -0
  36. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb.egg-info/dependency_links.txt +0 -0
  37. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb.egg-info/entry_points.txt +0 -0
  38. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb.egg-info/requires.txt +0 -0
  39. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/src/wwvb.egg-info/top_level.txt +0 -0
  40. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testcli.py +0 -0
  41. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testdaylight.py +0 -0
  42. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testls.py +0 -0
  43. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testpm.py +0 -0
  44. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/testwwvb.py +0 -0
  45. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/1998leapsecond +0 -0
  46. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/2012leapsecond +0 -0
  47. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/all-headers +0 -0
  48. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/bar +0 -0
  49. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/both +0 -0
  50. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/cradek +0 -0
  51. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/duration +0 -0
  52. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/enddst-phase +0 -0
  53. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/enddst-phase-2 +0 -0
  54. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/endleapyear +0 -0
  55. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/leapday1 +0 -0
  56. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/leapday28 +0 -0
  57. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/leapday29 +0 -0
  58. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/negleapsecond +0 -0
  59. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/nextdst +0 -0
  60. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/nextst +0 -0
  61. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/nonleapday1 +0 -0
  62. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/nonleapday28 +0 -0
  63. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/phase +0 -0
  64. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/startdst +0 -0
  65. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/startdst-phase +0 -0
  66. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/startdst-phase-2 +0 -0
  67. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/startleapyear +0 -0
  68. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/startst +0 -0
  69. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/y2k +0 -0
  70. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/y2k-1 +0 -0
  71. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/y2k1 +0 -0
  72. {wwvb-8.0.0rc1 → wwvb-8.0.0rc2}/test/wwvbgen_testcases/y2k1-1 +0 -0
@@ -33,7 +33,7 @@ jobs:
33
33
 
34
34
  - name: Run main tests
35
35
  run: |
36
- for version in 3.9 3.10 3.11 3.12 3.13; do
36
+ for version in 3.10 3.11 3.12 3.13; do
37
37
  echo "::group::Test with Python $version"
38
38
  uv venv --python $version _venv_${version}
39
39
  . _venv_${version}/bin/activate
@@ -32,5 +32,5 @@ repos:
32
32
  rev: v3.20.0
33
33
  hooks:
34
34
  - id: pyupgrade
35
- args: [ --py39-plus ]
35
+ args: [ --py310-plus ]
36
36
  exclude: src/uwwvb.py # CircuitPython prevailing standard!
@@ -1,19 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wwvb
3
- Version: 8.0.0rc1
3
+ Version: 8.0.0rc2
4
4
  Summary: Generate WWVB timecodes for any desired time
5
5
  Author-email: Jeff Epler <jepler@gmail.com>
6
6
  Project-URL: Source, https://codeberg.org/jepler/wwvbpy
7
- Project-URL: Documentation, https://codeberg.org/jepler/wwvbpy
7
+ Project-URL: Documentation, https://wwvbpy.readthedocs.io/en/latest/
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
9
  Classifier: Programming Language :: Python :: Implementation :: PyPy
13
10
  Classifier: Programming Language :: Python :: Implementation :: CPython
14
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
12
  Classifier: Operating System :: OS Independent
16
- Requires-Python: >=3.9
13
+ Requires-Python: >=3.10
17
14
  Description-Content-Type: text/markdown
18
15
  Requires-Dist: adafruit-circuitpython-datetime
19
16
  Requires-Dist: beautifulsoup4
@@ -29,18 +29,15 @@ description = "Generate WWVB timecodes for any desired time"
29
29
  dynamic = ["readme","version","dependencies"]
30
30
  classifiers = [
31
31
  "Programming Language :: Python :: 3",
32
- "Programming Language :: Python :: 3.9",
33
- "Programming Language :: Python :: 3.10",
34
- "Programming Language :: Python :: 3.11",
35
32
  "Programming Language :: Python :: Implementation :: PyPy",
36
33
  "Programming Language :: Python :: Implementation :: CPython",
37
34
  "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
38
35
  "Operating System :: OS Independent",
39
36
  ]
40
- requires-python = ">=3.9"
37
+ requires-python = ">=3.10"
41
38
  [project.urls]
42
39
  Source = "https://codeberg.org/jepler/wwvbpy"
43
- Documentation = "https://codeberg.org/jepler/wwvbpy"
40
+ Documentation = "https://wwvbpy.readthedocs.io/en/latest/"
44
41
  [project.scripts]
45
42
  wwvbgen = "wwvb.gen:main"
46
43
  wwvbdecode = "wwvb.decode:main"
@@ -802,7 +802,12 @@ class WWVBMinuteIERS(WWVBMinute):
802
802
 
803
803
 
804
804
  def _bcd_bits(n: int) -> Generator[bool]:
805
- """Return the bcd representation of n, starting with the least significant bit"""
805
+ """Return the (infinite) bcd representation of n, starting with the least significant bit
806
+
807
+ This continues to yield `False` forever after the nonzero bcd digits have been genrated.
808
+ This allows to `zip(strict=False)` the resulting bits together with a sequence of indices
809
+ and ensure all the upper bits are set to zero.
810
+ """
806
811
  while True:
807
812
  d = n % 10
808
813
  n = n // 10
@@ -881,7 +886,7 @@ class WWVBTimecode:
881
886
  Treating 'poslist' as a sequence of indices, update the AM signal with the value as a BCD number
882
887
  """
883
888
  pos = list(poslist)[::-1]
884
- for p, b in zip(pos, _bcd_bits(v)):
889
+ for p, b in zip(pos, _bcd_bits(v), strict=False):
885
890
  if b:
886
891
  self.am[p] = AmplitudeModulation.ONE
887
892
  else:
@@ -909,7 +914,7 @@ class WWVBTimecode:
909
914
  return ("⁰", "¹", "²", "¿")[am]
910
915
  return ("₀", "₁", "₂", "⸮")[am]
911
916
 
912
- return "".join(convert_one(i, j) for i, j in zip(self.am, self.phase))
917
+ return "".join(convert_one(i, j) for i, j in zip(self.am, self.phase, strict=True))
913
918
 
914
919
  def __repr__(self) -> str:
915
920
  """Implement repr()"""
@@ -927,7 +932,7 @@ class WWVBTimecode:
927
932
 
928
933
  def to_both_string(self, charset: list[str]) -> str:
929
934
  """Convert both channels to a string"""
930
- return "".join(charset[i + j * 3] for i, j in zip(self.am, self.phase))
935
+ return "".join(charset[i + j * 3] for i, j in zip(self.am, self.phase, strict=True))
931
936
 
932
937
 
933
938
  styles = {
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
28
28
  commit_id: COMMIT_ID
29
29
  __commit_id__: COMMIT_ID
30
30
 
31
- __version__ = version = '8.0.0rc1'
32
- __version_tuple__ = version_tuple = (8, 0, 0, 'rc1')
31
+ __version__ = version = '8.0.0rc2'
32
+ __version_tuple__ = version_tuple = (8, 0, 0, 'rc2')
33
33
 
34
- __commit_id__ = commit_id = 'g5b40d06db'
34
+ __commit_id__ = commit_id = 'g65bfd773d'
@@ -15,13 +15,16 @@ import gzip
15
15
  import io
16
16
  import json
17
17
  import pathlib
18
- from typing import Callable
18
+ from typing import TYPE_CHECKING
19
19
 
20
20
  import bs4
21
21
  import click
22
22
  import platformdirs
23
23
  import requests
24
24
 
25
+ if TYPE_CHECKING:
26
+ from collections.abc import Callable
27
+
25
28
  DIST_PATH = pathlib.Path(__file__).parent / "iersdata.json"
26
29
 
27
30
  IERS_URL = "https://datacenter.iers.org/data/csv/finals2000A.all.csv"
@@ -1,19 +1,16 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wwvb
3
- Version: 8.0.0rc1
3
+ Version: 8.0.0rc2
4
4
  Summary: Generate WWVB timecodes for any desired time
5
5
  Author-email: Jeff Epler <jepler@gmail.com>
6
6
  Project-URL: Source, https://codeberg.org/jepler/wwvbpy
7
- Project-URL: Documentation, https://codeberg.org/jepler/wwvbpy
7
+ Project-URL: Documentation, https://wwvbpy.readthedocs.io/en/latest/
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Programming Language :: Python :: 3.9
10
- Classifier: Programming Language :: Python :: 3.10
11
- Classifier: Programming Language :: Python :: 3.11
12
9
  Classifier: Programming Language :: Python :: Implementation :: PyPy
13
10
  Classifier: Programming Language :: Python :: Implementation :: CPython
14
11
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
15
12
  Classifier: Operating System :: OS Independent
16
- Requires-Python: >=3.9
13
+ Requires-Python: >=3.10
17
14
  Description-Content-Type: text/markdown
18
15
  Requires-Dist: adafruit-circuitpython-datetime
19
16
  Requires-Dist: beautifulsoup4
@@ -10,26 +10,21 @@ import random
10
10
  import sys
11
11
  import unittest
12
12
  import zoneinfo
13
- from typing import Union
14
13
 
15
14
  import adafruit_datetime
16
15
 
17
16
  import uwwvb
18
17
  import wwvb
19
18
 
20
- EitherDatetimeOrNone = Union[None, datetime.datetime, adafruit_datetime.datetime]
21
-
22
19
 
23
20
  class WWVBRoundtrip(unittest.TestCase):
24
21
  """tests of uwwvb.py"""
25
22
 
26
- def assertDateTimeEqualExceptTzInfo(self, a: EitherDatetimeOrNone, b: EitherDatetimeOrNone) -> None:
23
+ def assertDateTimeEqualExceptTzInfo(self, a: datetime.datetime, b: adafruit_datetime.datetime) -> None:
27
24
  """Test two datetime objects for equality
28
25
 
29
26
  This equality test excludes tzinfo, and allows adafruit_datetime and core datetime modules to compare equal
30
27
  """
31
- assert a
32
- assert b
33
28
  self.assertEqual(
34
29
  (a.year, a.month, a.day, a.hour, a.minute, a.second, a.microsecond),
35
30
  (b.year, b.month, b.day, b.hour, b.minute, b.second, b.microsecond),
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