wwvb 3.0.7__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.
- {wwvb-3.0.7 → wwvb-4.0.0}/.github/workflows/codeql.yml +4 -4
- {wwvb-3.0.7 → wwvb-4.0.0}/.github/workflows/cron.yml +2 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/.github/workflows/release.yml +2 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/.github/workflows/test.yml +22 -6
- {wwvb-3.0.7 → wwvb-4.0.0}/.pre-commit-config.yaml +3 -3
- {wwvb-3.0.7/src/wwvb.egg-info → wwvb-4.0.0}/PKG-INFO +1 -1
- {wwvb-3.0.7 → wwvb-4.0.0}/adafruit_datetime.pyi +1 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/conf.py +12 -12
- wwvb-4.0.0/index.rst +31 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/pyproject.toml +2 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/requirements-dev.txt +3 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/uwwvb.py +5 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/__init__.py +212 -179
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/__version__.py +2 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/decode.py +8 -9
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/gen.py +14 -16
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/iersdata.py +4 -5
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/iersdata_dist.py +4 -6
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testcli.py +8 -5
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testpm.py +2 -2
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testuwwvb.py +42 -31
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testwwvb.py +51 -40
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/updateiers.py +35 -33
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/wwvbtk.py +13 -13
- {wwvb-3.0.7 → wwvb-4.0.0/src/wwvb.egg-info}/PKG-INFO +1 -1
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb.egg-info/SOURCES.txt +1 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/.coveragerc +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/.gitignore +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/.pylintrc +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/LICENSES/Apache-2.0.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/LICENSES/CC0-1.0.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/LICENSES/GPL-3.0-only.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/LICENSES/Unlicense.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/Makefile +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/README.md +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/_static/.empty +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/codecov.yml +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/setup.cfg +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/dut1table.py +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/py.typed +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testdaylight.py +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/testls.py +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb/tz.py +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb.egg-info/dependency_links.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb.egg-info/entry_points.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb.egg-info/requires.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/src/wwvb.egg-info/top_level.txt +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/1998leapsecond +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/2012leapsecond +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/all-headers +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/bar +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/both +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/cradek +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/duration +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/enddst-phase +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/enddst-phase-2 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/endleapyear +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/leapday1 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/leapday28 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/leapday29 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/negleapsecond +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/nextdst +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/nextst +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/nonleapday1 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/nonleapday28 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/phase +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/startdst +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/startdst-phase +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/startdst-phase-2 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/startleapyear +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/startst +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/y2k +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/y2k-1 +0 -0
- {wwvb-3.0.7 → wwvb-4.0.0}/tests/y2k1 +0 -0
- {wwvb-3.0.7 → 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@
|
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@
|
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@
|
43
|
+
uses: github/codeql-action/autobuild@v3
|
44
44
|
|
45
45
|
- name: Perform CodeQL Analysis
|
46
|
-
uses: github/codeql-action/analyze@
|
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@
|
23
|
+
- uses: actions/checkout@v4
|
24
24
|
|
25
25
|
- name: Set up Python 3.10
|
26
|
-
uses: actions/setup-python@
|
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@
|
21
|
+
- uses: actions/checkout@v4
|
22
22
|
|
23
23
|
- name: Set up Python
|
24
|
-
uses: actions/setup-python@
|
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@
|
60
|
+
- uses: actions/checkout@v4
|
45
61
|
|
46
62
|
- name: Set up Python
|
47
|
-
uses: actions/setup-python@
|
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@
|
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@
|
89
|
+
- uses: actions/checkout@v4
|
74
90
|
|
75
91
|
- name: Set up Python
|
76
|
-
uses: actions/setup-python@
|
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.
|
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:
|
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.
|
23
|
+
rev: v0.5.1
|
24
24
|
hooks:
|
25
25
|
# Run the linter.
|
26
26
|
- id: ruff
|
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# ruff: noqa
|
2
2
|
# fmt: off
|
3
3
|
# Configuration file for the Sphinx documentation builder.
|
4
4
|
#
|
@@ -17,14 +17,14 @@ import re
|
|
17
17
|
import subprocess
|
18
18
|
import sys
|
19
19
|
|
20
|
-
sys.path.insert(0, os.path.abspath(
|
20
|
+
sys.path.insert(0, os.path.abspath("."))
|
21
21
|
|
22
22
|
|
23
23
|
# -- Project information -----------------------------------------------------
|
24
24
|
|
25
|
-
project =
|
26
|
-
copyright =
|
27
|
-
author =
|
25
|
+
project = "wwvb"
|
26
|
+
copyright = "2021, Jeff Epler"
|
27
|
+
author = "Jeff Epler"
|
28
28
|
|
29
29
|
# The full version, including alpha/beta/rc tags
|
30
30
|
final_version = ""
|
@@ -32,12 +32,12 @@ git_describe = subprocess.run(
|
|
32
32
|
["git", "describe", "--tags", "--dirty"],
|
33
33
|
stdout=subprocess.PIPE,
|
34
34
|
stderr=subprocess.STDOUT,
|
35
|
-
encoding="utf-8"
|
35
|
+
encoding="utf-8", check=False,
|
36
36
|
)
|
37
37
|
if git_describe.returncode == 0:
|
38
38
|
git_version = re.search(
|
39
39
|
r"^\d(?:\.\d){0,2}(?:\-(?:alpha|beta|rc)\.\d+){0,1}",
|
40
|
-
str(git_describe.stdout)
|
40
|
+
str(git_describe.stdout),
|
41
41
|
)
|
42
42
|
if git_version:
|
43
43
|
final_version = git_version[0]
|
@@ -53,16 +53,16 @@ version = release = final_version
|
|
53
53
|
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
54
54
|
# ones.
|
55
55
|
extensions = [
|
56
|
-
|
56
|
+
"sphinx.ext.autodoc",
|
57
57
|
]
|
58
58
|
|
59
59
|
# Add any paths that contain templates here, relative to this directory.
|
60
|
-
templates_path = [
|
60
|
+
templates_path = ["_templates"]
|
61
61
|
|
62
62
|
# List of patterns, relative to source directory, that match files and
|
63
63
|
# directories to ignore when looking for source files.
|
64
64
|
# This pattern also affects html_static_path and html_extra_path.
|
65
|
-
exclude_patterns = [
|
65
|
+
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]
|
66
66
|
|
67
67
|
|
68
68
|
# -- Options for HTML output -------------------------------------------------
|
@@ -70,12 +70,12 @@ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
70
70
|
# The theme to use for HTML and HTML Help pages. See the documentation for
|
71
71
|
# a list of builtin themes.
|
72
72
|
#
|
73
|
-
html_theme =
|
73
|
+
html_theme = "sphinx_rtd_theme"
|
74
74
|
|
75
75
|
# Add any paths that contain custom static files (such as style sheets) here,
|
76
76
|
# relative to this directory. They are copied after the builtin static files,
|
77
77
|
# so a file named "default.css" will overwrite the builtin "default.css".
|
78
|
-
html_static_path = [
|
78
|
+
html_static_path = ["_static"]
|
79
79
|
|
80
80
|
autodoc_typehints = "description"
|
81
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 = []
|
@@ -87,7 +90,7 @@ def get_am_bcd(seq: list[int], *poslist: int) -> int | None:
|
|
87
90
|
return result
|
88
91
|
|
89
92
|
|
90
|
-
def decode_wwvb(
|
93
|
+
def decode_wwvb(
|
91
94
|
t: list[int] | None,
|
92
95
|
) -> WWVBMinute | None:
|
93
96
|
"""Convert a received minute of wwvb symbols to a WWVBMinute. Returns None if any error is detected."""
|