wwvb 3.0.8__tar.gz → 4.0.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 (75) hide show
  1. {wwvb-3.0.8 → wwvb-4.0.0}/.github/workflows/codeql.yml +4 -4
  2. {wwvb-3.0.8 → wwvb-4.0.0}/.github/workflows/cron.yml +2 -2
  3. {wwvb-3.0.8 → wwvb-4.0.0}/.github/workflows/release.yml +2 -2
  4. {wwvb-3.0.8 → wwvb-4.0.0}/.github/workflows/test.yml +22 -6
  5. {wwvb-3.0.8 → wwvb-4.0.0}/.pre-commit-config.yaml +3 -3
  6. {wwvb-3.0.8/src/wwvb.egg-info → wwvb-4.0.0}/PKG-INFO +1 -1
  7. {wwvb-3.0.8 → wwvb-4.0.0}/adafruit_datetime.pyi +1 -0
  8. {wwvb-3.0.8 → wwvb-4.0.0}/conf.py +12 -11
  9. wwvb-4.0.0/index.rst +31 -0
  10. {wwvb-3.0.8 → wwvb-4.0.0}/pyproject.toml +2 -2
  11. {wwvb-3.0.8 → wwvb-4.0.0}/requirements-dev.txt +3 -0
  12. {wwvb-3.0.8 → wwvb-4.0.0}/src/uwwvb.py +4 -1
  13. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/__init__.py +210 -169
  14. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/__version__.py +2 -2
  15. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/decode.py +8 -9
  16. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/gen.py +14 -13
  17. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/iersdata.py +4 -5
  18. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/iersdata_dist.py +3 -3
  19. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testcli.py +8 -3
  20. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testpm.py +2 -2
  21. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testuwwvb.py +41 -28
  22. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testwwvb.py +51 -39
  23. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/updateiers.py +34 -31
  24. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/wwvbtk.py +12 -10
  25. {wwvb-3.0.8 → wwvb-4.0.0/src/wwvb.egg-info}/PKG-INFO +1 -1
  26. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb.egg-info/SOURCES.txt +1 -0
  27. {wwvb-3.0.8 → wwvb-4.0.0}/.coveragerc +0 -0
  28. {wwvb-3.0.8 → wwvb-4.0.0}/.gitignore +0 -0
  29. {wwvb-3.0.8 → wwvb-4.0.0}/.pylintrc +0 -0
  30. {wwvb-3.0.8 → wwvb-4.0.0}/LICENSES/Apache-2.0.txt +0 -0
  31. {wwvb-3.0.8 → wwvb-4.0.0}/LICENSES/CC0-1.0.txt +0 -0
  32. {wwvb-3.0.8 → wwvb-4.0.0}/LICENSES/GPL-3.0-only.txt +0 -0
  33. {wwvb-3.0.8 → wwvb-4.0.0}/LICENSES/Unlicense.txt +0 -0
  34. {wwvb-3.0.8 → wwvb-4.0.0}/Makefile +0 -0
  35. {wwvb-3.0.8 → wwvb-4.0.0}/README.md +0 -0
  36. {wwvb-3.0.8 → wwvb-4.0.0}/_static/.empty +0 -0
  37. {wwvb-3.0.8 → wwvb-4.0.0}/codecov.yml +0 -0
  38. {wwvb-3.0.8 → wwvb-4.0.0}/setup.cfg +0 -0
  39. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/dut1table.py +0 -0
  40. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/py.typed +0 -0
  41. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testdaylight.py +0 -0
  42. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/testls.py +0 -0
  43. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb/tz.py +0 -0
  44. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb.egg-info/dependency_links.txt +0 -0
  45. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb.egg-info/entry_points.txt +0 -0
  46. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb.egg-info/requires.txt +0 -0
  47. {wwvb-3.0.8 → wwvb-4.0.0}/src/wwvb.egg-info/top_level.txt +0 -0
  48. {wwvb-3.0.8 → wwvb-4.0.0}/tests/1998leapsecond +0 -0
  49. {wwvb-3.0.8 → wwvb-4.0.0}/tests/2012leapsecond +0 -0
  50. {wwvb-3.0.8 → wwvb-4.0.0}/tests/all-headers +0 -0
  51. {wwvb-3.0.8 → wwvb-4.0.0}/tests/bar +0 -0
  52. {wwvb-3.0.8 → wwvb-4.0.0}/tests/both +0 -0
  53. {wwvb-3.0.8 → wwvb-4.0.0}/tests/cradek +0 -0
  54. {wwvb-3.0.8 → wwvb-4.0.0}/tests/duration +0 -0
  55. {wwvb-3.0.8 → wwvb-4.0.0}/tests/enddst-phase +0 -0
  56. {wwvb-3.0.8 → wwvb-4.0.0}/tests/enddst-phase-2 +0 -0
  57. {wwvb-3.0.8 → wwvb-4.0.0}/tests/endleapyear +0 -0
  58. {wwvb-3.0.8 → wwvb-4.0.0}/tests/leapday1 +0 -0
  59. {wwvb-3.0.8 → wwvb-4.0.0}/tests/leapday28 +0 -0
  60. {wwvb-3.0.8 → wwvb-4.0.0}/tests/leapday29 +0 -0
  61. {wwvb-3.0.8 → wwvb-4.0.0}/tests/negleapsecond +0 -0
  62. {wwvb-3.0.8 → wwvb-4.0.0}/tests/nextdst +0 -0
  63. {wwvb-3.0.8 → wwvb-4.0.0}/tests/nextst +0 -0
  64. {wwvb-3.0.8 → wwvb-4.0.0}/tests/nonleapday1 +0 -0
  65. {wwvb-3.0.8 → wwvb-4.0.0}/tests/nonleapday28 +0 -0
  66. {wwvb-3.0.8 → wwvb-4.0.0}/tests/phase +0 -0
  67. {wwvb-3.0.8 → wwvb-4.0.0}/tests/startdst +0 -0
  68. {wwvb-3.0.8 → wwvb-4.0.0}/tests/startdst-phase +0 -0
  69. {wwvb-3.0.8 → wwvb-4.0.0}/tests/startdst-phase-2 +0 -0
  70. {wwvb-3.0.8 → wwvb-4.0.0}/tests/startleapyear +0 -0
  71. {wwvb-3.0.8 → wwvb-4.0.0}/tests/startst +0 -0
  72. {wwvb-3.0.8 → wwvb-4.0.0}/tests/y2k +0 -0
  73. {wwvb-3.0.8 → wwvb-4.0.0}/tests/y2k-1 +0 -0
  74. {wwvb-3.0.8 → wwvb-4.0.0}/tests/y2k1 +0 -0
  75. {wwvb-3.0.8 → wwvb-4.0.0}/tests/y2k1-1 +0 -0
@@ -28,21 +28,21 @@ jobs:
28
28
 
29
29
  steps:
30
30
  - name: Checkout
31
- uses: actions/checkout@v3
31
+ uses: actions/checkout@v4
32
32
 
33
33
  - name: Install Dependencies (python)
34
34
  run: pip3 install -r requirements-dev.txt
35
35
 
36
36
  - name: Initialize CodeQL
37
- uses: github/codeql-action/init@v2
37
+ uses: github/codeql-action/init@v3
38
38
  with:
39
39
  languages: ${{ matrix.language }}
40
40
  queries: +security-and-quality
41
41
 
42
42
  - name: Autobuild
43
- uses: github/codeql-action/autobuild@v2
43
+ uses: github/codeql-action/autobuild@v3
44
44
 
45
45
  - name: Perform CodeQL Analysis
46
- uses: github/codeql-action/analyze@v2
46
+ uses: github/codeql-action/analyze@v3
47
47
  with:
48
48
  category: "/language:${{ matrix.language }}"
@@ -20,10 +20,10 @@ jobs:
20
20
  GITHUB_CONTEXT: ${{ toJson(github) }}
21
21
  run: echo "$GITHUB_CONTEXT"
22
22
 
23
- - uses: actions/checkout@v3
23
+ - uses: actions/checkout@v4
24
24
 
25
25
  - name: Set up Python 3.10
26
- uses: actions/setup-python@v4
26
+ uses: actions/setup-python@v5
27
27
  with:
28
28
  python-version: "3.10"
29
29
 
@@ -18,10 +18,10 @@ jobs:
18
18
  GITHUB_CONTEXT: ${{ toJson(github) }}
19
19
  run: echo "$GITHUB_CONTEXT"
20
20
 
21
- - uses: actions/checkout@v3
21
+ - uses: actions/checkout@v4
22
22
 
23
23
  - name: Set up Python
24
- uses: actions/setup-python@v4
24
+ uses: actions/setup-python@v5
25
25
  with:
26
26
  python-version: 3.9
27
27
 
@@ -13,6 +13,22 @@ on:
13
13
  types: [rerequested]
14
14
 
15
15
  jobs:
16
+ docs:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v5
21
+ with:
22
+ python-version: '3.12'
23
+
24
+ - uses: actions/checkout@v4
25
+
26
+ - name: Install deps
27
+ run: python -mpip install -r requirements-dev.txt
28
+
29
+ - name: Build HTML docs
30
+ run: make html
31
+
16
32
  test:
17
33
  strategy:
18
34
  fail-fast: false
@@ -41,10 +57,10 @@ jobs:
41
57
 
42
58
  runs-on: ${{ matrix.os-version }}
43
59
  steps:
44
- - uses: actions/checkout@v3
60
+ - uses: actions/checkout@v4
45
61
 
46
62
  - name: Set up Python
47
- uses: actions/setup-python@v4
63
+ uses: actions/setup-python@v5
48
64
  with:
49
65
  python-version: ${{ matrix.python-version }}
50
66
 
@@ -62,18 +78,18 @@ jobs:
62
78
 
63
79
  - name: Upload Coverage as artifact
64
80
  if: always()
65
- uses: actions/upload-artifact@v3
81
+ uses: actions/upload-artifact@v4
66
82
  with:
67
- name: coverage for ${{ matrix.python-version }} on ${{ matrix.os-version }}
83
+ name: coverage for ${{ matrix.python-version }} on ${{ matrix.os-version }} ${{ matrix.coverage-core }}
68
84
  path: coverage.xml
69
85
 
70
86
  pre-commit:
71
87
  runs-on: ubuntu-latest
72
88
  steps:
73
- - uses: actions/checkout@v3
89
+ - uses: actions/checkout@v4
74
90
 
75
91
  - name: Set up Python
76
- uses: actions/setup-python@v4
92
+ uses: actions/setup-python@v5
77
93
  with:
78
94
  python-version: '3.x'
79
95
 
@@ -7,7 +7,7 @@ default_language_version:
7
7
 
8
8
  repos:
9
9
  - repo: https://github.com/pre-commit/pre-commit-hooks
10
- rev: v4.5.0
10
+ rev: v4.6.0
11
11
  hooks:
12
12
  - id: check-yaml
13
13
  - id: end-of-file-fixer
@@ -15,12 +15,12 @@ repos:
15
15
  - id: trailing-whitespace
16
16
  exclude: tests
17
17
  - repo: https://github.com/fsfe/reuse-tool
18
- rev: v3.0.1
18
+ rev: v4.0.3
19
19
  hooks:
20
20
  - id: reuse
21
21
  - repo: https://github.com/astral-sh/ruff-pre-commit
22
22
  # Ruff version.
23
- rev: v0.3.5
23
+ rev: v0.5.1
24
24
  hooks:
25
25
  # Run the linter.
26
26
  - id: ruff
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: wwvb
3
- Version: 3.0.8
3
+ Version: 4.0.0
4
4
  Summary: Generate WWVB timecodes for any desired time
5
5
  Home-page: https://github.com/jepler/wwvbpy
6
6
  Author: Jeff Epler
@@ -2,6 +2,7 @@
2
2
  #
3
3
  # SPDX-License-Identifier: Apache-2.0
4
4
 
5
+ # ruff: noqa
5
6
  import sys
6
7
  from time import struct_time
7
8
  from typing import (
@@ -1,3 +1,4 @@
1
+ # ruff: noqa
1
2
  # fmt: off
2
3
  # Configuration file for the Sphinx documentation builder.
3
4
  #
@@ -16,14 +17,14 @@ import re
16
17
  import subprocess
17
18
  import sys
18
19
 
19
- sys.path.insert(0, os.path.abspath('.'))
20
+ sys.path.insert(0, os.path.abspath("."))
20
21
 
21
22
 
22
23
  # -- Project information -----------------------------------------------------
23
24
 
24
- project = 'wwvb'
25
- copyright = '2021, Jeff Epler'
26
- author = 'Jeff Epler'
25
+ project = "wwvb"
26
+ copyright = "2021, Jeff Epler"
27
+ author = "Jeff Epler"
27
28
 
28
29
  # The full version, including alpha/beta/rc tags
29
30
  final_version = ""
@@ -31,12 +32,12 @@ git_describe = subprocess.run(
31
32
  ["git", "describe", "--tags", "--dirty"],
32
33
  stdout=subprocess.PIPE,
33
34
  stderr=subprocess.STDOUT,
34
- encoding="utf-8"
35
+ encoding="utf-8", check=False,
35
36
  )
36
37
  if git_describe.returncode == 0:
37
38
  git_version = re.search(
38
39
  r"^\d(?:\.\d){0,2}(?:\-(?:alpha|beta|rc)\.\d+){0,1}",
39
- str(git_describe.stdout)
40
+ str(git_describe.stdout),
40
41
  )
41
42
  if git_version:
42
43
  final_version = git_version[0]
@@ -52,16 +53,16 @@ version = release = final_version
52
53
  # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
53
54
  # ones.
54
55
  extensions = [
55
- 'sphinx.ext.autodoc',
56
+ "sphinx.ext.autodoc",
56
57
  ]
57
58
 
58
59
  # Add any paths that contain templates here, relative to this directory.
59
- templates_path = ['_templates']
60
+ templates_path = ["_templates"]
60
61
 
61
62
  # List of patterns, relative to source directory, that match files and
62
63
  # directories to ignore when looking for source files.
63
64
  # This pattern also affects html_static_path and html_extra_path.
64
- exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
65
+ exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
65
66
 
66
67
 
67
68
  # -- Options for HTML output -------------------------------------------------
@@ -69,12 +70,12 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
69
70
  # The theme to use for HTML and HTML Help pages. See the documentation for
70
71
  # a list of builtin themes.
71
72
  #
72
- html_theme = 'sphinx_rtd_theme'
73
+ html_theme = "sphinx_rtd_theme"
73
74
 
74
75
  # Add any paths that contain custom static files (such as style sheets) here,
75
76
  # relative to this directory. They are copied after the builtin static files,
76
77
  # so a file named "default.css" will overwrite the builtin "default.css".
77
- html_static_path = ['_static']
78
+ html_static_path = ["_static"]
78
79
 
79
80
  autodoc_typehints = "description"
80
81
  autodoc_class_signature = "separated"
wwvb-4.0.0/index.rst ADDED
@@ -0,0 +1,31 @@
1
+ .. SPDX-FileCopyrightText: 2021 Jeff Epler
2
+ ..
3
+ .. SPDX-License-Identifier: GPL-3.0-only
4
+
5
+ wwvbpy
6
+ ======
7
+
8
+ .. image:: https://github.com/jepler/wwvbpy/actions/workflows/test.yml/badge.svg
9
+ :target: https://github.com/jepler/wwvbpy/actions/workflows/test.yml
10
+ :alt: Test wwvbpy
11
+
12
+ .. image:: https://img.shields.io/pypi/v/wwvb
13
+ :target: https://pypi.org/project/wwvb
14
+ :alt: PyPI
15
+
16
+
17
+ .. toctree::
18
+ :maxdepth: 2
19
+ :caption: Contents:
20
+
21
+ wwvb module
22
+ ===========
23
+
24
+ .. automodule:: wwvb
25
+ :members:
26
+
27
+ uwwvb module
28
+ ============
29
+
30
+ .. automodule:: uwwvb
31
+ :members:
@@ -19,7 +19,7 @@ build-backend = "setuptools.build_meta"
19
19
  [tool.setuptools_scm]
20
20
  write_to = "src/wwvb/__version__.py"
21
21
  [tool.ruff.lint]
22
- select = ["E", "F"]
23
- ignore = ["E741"]
22
+ select = ["E", "F", "D", "I", "N", "UP", "YTT", "BLE", "B", "FBT", "A", "COM", "C4", "DTZ", "FA", "ISC", "ICN", "PIE", "PYI", "Q", "RET", "SIM", "TID", "TCH", "ARG", "PTH", "C", "R", "W", "FLY", "RUF", "PL"]
23
+ ignore = ["D203", "D213", "D400", "D415", "ISC001", "E741", "C901", "PLR0911", "PLR2004", "PLR0913"]
24
24
  [tool.ruff]
25
25
  line-length = 120
@@ -14,6 +14,9 @@ pre-commit
14
14
  python-dateutil
15
15
  requests; implementation_name=="cpython"
16
16
  setuptools>=68; implementation_name=="cpython"
17
+ sphinx
18
+ sphinx-autodoc-typehints
19
+ sphinx-rtd-theme
17
20
  twine; implementation_name=="cpython"
18
21
  types-beautifulsoup4
19
22
  types-python-dateutil
@@ -2,6 +2,8 @@
2
2
  #
3
3
  # SPDX-License-Identifier: GPL-3.0-only
4
4
 
5
+ # ruff: noqa: C405 PYI024 PLR2004 FBT001 FBT002
6
+
5
7
  """Implementation of a WWVB state machine & decoder for resource-constrained systems"""
6
8
 
7
9
  from __future__ import annotations
@@ -30,7 +32,8 @@ class WWVBDecoder:
30
32
  def update(self, value: int) -> list[int] | None:
31
33
  """Update the _state machine when a new symbol is received.
32
34
 
33
- If a possible complete _minute is received, return it; otherwise, return None"""
35
+ If a possible complete _minute is received, return it; otherwise, return None
36
+ """
34
37
  result = None
35
38
  if self.state == 1:
36
39
  self.minute = []