diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2fe6142 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/" + schedule: + interval: "weekly" + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 24477cc..3976621 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ "ubuntu-latest", "macos-latest" ] - python-version: [ "3.7", "3.8", "3.9", "3.10" ] + python-version: [ "3.8", "3.12" ] env: OS: ${{ matrix.os }} @@ -46,11 +46,13 @@ jobs: run: | make test-coverage - - name: Upload coverage results to Codecov - uses: codecov/codecov-action@v3 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} with: - file: ./coverage.xml + files: ./coverage.xml flags: unittests env_vars: OS,PYTHON name: codecov-umbrella - fail_ci_if_error: false + fail_ci_if_error: true diff --git a/.gitignore b/.gitignore index ca91098..3f0015d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ *.egg-info /.venv* /dist +/doc/build /htmlcov .coverage coverage.xml diff --git a/CHANGES.rst b/CHANGES.rst index 9845a04..ca6b71a 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,7 +5,8 @@ CHANGES in progress =========== - +- Add support for Python 3.11 and 3.12 +- Replace ``appdirs`` with ``platformdirs`` 2022-08-05 0.13.1 ================= diff --git a/Makefile b/Makefile index 239f31c..41cf8ac 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,6 @@ $(eval twine := $(venvpath)/bin/twine) $(eval sphinx := $(venvpath)/bin/sphinx-build) $(eval nose2 := $(venvpath)/bin/nose2) $(eval coverage := $(venvpath)/bin/coverage) -$(eval flake8 := $(venvpath)/bin/pflake8) $(eval black := $(venvpath)/bin/black) $(eval isort := $(venvpath)/bin/isort) $(eval proselint := $(venvpath)/bin/proselint) @@ -101,5 +100,6 @@ format: setup-virtualenv lint: setup-virtualenv $(pip) install --requirement=requirements-utils.txt - $(flake8) beradio testing + $(black) --check beradio testing + $(isort) --check beradio testing $(proselint) *.rst doc/source/**/*.rst diff --git a/README.rst b/README.rst index 20f632e..e8fac4e 100644 --- a/README.rst +++ b/README.rst @@ -1,36 +1,43 @@ -.. image:: https://github.com/hiveeyes/beradio/workflows/Tests/badge.svg - :target: https://github.com/hiveeyes/beradio/actions?workflow=Tests +####### +BERadio +####### + +| + +.. start-badges + +|ci-tests| |ci-coverage| |license| |pypi-downloads| +|python-versions| |status| |pypi-version| + +.. |ci-tests| image:: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml/badge.svg + :target: https://github.com/hiveeyes/beradio/actions/workflows/tests.yml :alt: CI outcome -.. image:: https://codecov.io/gh/hiveeyes/beradio/branch/main/graph/badge.svg +.. |ci-coverage| image:: https://codecov.io/gh/hiveeyes/beradio/branch/main/graph/badge.svg :target: https://codecov.io/gh/hiveeyes/beradio :alt: Test suite code coverage -.. image:: https://pepy.tech/badge/beradio/month - :target: https://pypi.org/project/beradio/ +.. |pypi-downloads| image:: https://static.pepy.tech/badge/beradio/month + :target: https://pepy.tech/project/beradio :alt: PyPI downloads per month -.. image:: https://img.shields.io/pypi/v/beradio.svg +.. |pypi-version| image:: https://img.shields.io/pypi/v/beradio.svg :target: https://pypi.org/project/beradio/ :alt: Package version on PyPI -.. image:: https://img.shields.io/pypi/status/beradio.svg +.. |status| image:: https://img.shields.io/pypi/status/beradio.svg :target: https://pypi.org/project/beradio/ :alt: Project status (alpha, beta, stable) -.. image:: https://img.shields.io/pypi/pyversions/beradio.svg +.. |python-versions| image:: https://img.shields.io/pypi/pyversions/beradio.svg :target: https://pypi.org/project/beradio/ :alt: Support Python versions -.. image:: https://img.shields.io/pypi/l/beradio.svg +.. |license| image:: https://img.shields.io/pypi/l/beradio.svg :target: https://github.com/hiveeyes/beradio/blob/main/LICENSE :alt: Project license -| - -############## -BERadio README -############## +.. end-badges .. tip:: @@ -158,7 +165,7 @@ Thanks in advance for your efforts, we really appreciate any help or feedback. License ======= -This software is copyright © 2015-2022 The Hiveeyes developers. All rights reserved. +This software is copyright © 2015-2024 The Hiveeyes developers. All rights reserved. Use of the source code included here is governed by the `GNU Affero General Public License `_ and the diff --git a/beradio/protocol.py b/beradio/protocol.py index eac81b9..86533a3 100644 --- a/beradio/protocol.py +++ b/beradio/protocol.py @@ -104,7 +104,6 @@ def decode_safe(self, payload): class BERadioProtocol1(BERadioProtocolBase): - """ Example payload:: @@ -182,7 +181,6 @@ def to_v2(self, message1): class BERadioProtocol2(BERadioProtocolBase): - """ Example payload:: diff --git a/beradio/util.py b/beradio/util.py index 354664a..3d4201d 100644 --- a/beradio/util.py +++ b/beradio/util.py @@ -12,7 +12,7 @@ from uuid import uuid4 import json_store -from appdirs import user_data_dir +from platformdirs import user_data_dir from beradio.gibberish import generate_word diff --git a/doc/.gitignore b/doc/.gitignore deleted file mode 100644 index 796b96d..0000000 --- a/doc/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/build diff --git a/doc/source/conf.py b/doc/source/conf.py index 8d1d4dc..66eb60a 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -52,7 +52,7 @@ # General information about the project. project = "BERadio" -copyright = "2015-2022, The Hiveeyes Developers" +copyright = "2015-2024, The Hiveeyes Developers" author = "The Hiveeyes Developers" # The version info for the project you're documenting, acts as replacement for diff --git a/pyproject.toml b/pyproject.toml index 5d74761..ca9d92e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,9 +6,6 @@ profile = "black" line_length = 120 multi_line_output = 3 -[tool.flake8] -max-line-length = 120 - [tool.pytest.ini_options] minversion = "2.0" addopts = "-rsfEX -p pytester --strict-markers --verbosity=3 --cov --cov-report=term-missing --cov-report=xml" diff --git a/requirements-docs.txt b/requirements-docs.txt index cd47ce4..539c241 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -1,2 +1,2 @@ -Sphinx<6 -sphinx_rtd_theme<2 +sphinx<8 +sphinx-rtd-theme<3 diff --git a/requirements-release.txt b/requirements-release.txt index 236e1cd..ce722ca 100644 --- a/requirements-release.txt +++ b/requirements-release.txt @@ -1,5 +1,5 @@ build wheel bump2version<2 -twine<5 -keyring<24 +twine<6 +keyring<26 diff --git a/requirements-utils.txt b/requirements-utils.txt index 15f02a6..ec31605 100644 --- a/requirements-utils.txt +++ b/requirements-utils.txt @@ -1,5 +1,3 @@ -black -isort -pyproject-flake8 -flake8<5 -proselint +black<25 +isort<6 +proselint<0.14 diff --git a/setup.py b/setup.py index 4a4adfa..c485cab 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ "paho-mqtt<2", "bencode.py<5", "docopt<1", - "appdirs<2", + "platformdirs<5", "json-store>=3.1,<4", # 'terkin==0.0.1', ] @@ -49,6 +49,8 @@ "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", "Topic :: Communications", "Topic :: Internet", "Topic :: Scientific/Engineering", diff --git a/testing/doctests_plus.py b/testing/doctests_plus.py index d44326f..da68718 100644 --- a/testing/doctests_plus.py +++ b/testing/doctests_plus.py @@ -12,6 +12,7 @@ extensions = """ + import doctest import os