From f8d3aec792ed9db5a621023e25ce68d1c6ced3a6 Mon Sep 17 00:00:00 2001 From: Andrea Zoppi Date: Sat, 5 Oct 2024 14:31:35 +0200 Subject: [PATCH] Updated workflows and metadata Signed-off-by: Andrea Zoppi --- .github/workflows/ci.yml | 9 ++++--- .github/workflows/packaging.yml | 3 +-- .gitignore | 5 ++-- CHANGELOG.rst | 10 ++++++-- MANIFEST.in | 1 + README.rst | 2 +- .../hexrec.formats.asciihex.AsciiHexTag.rst | 25 ++++++++++--------- .../hexrec.formats.avr.AvrTag.rst | 10 +++++++- .../hexrec.formats.ihex.IhexTag.rst | 25 ++++++++++--------- .../hexrec.formats.mos.MosTag.rst | 23 +++++++++-------- .../hexrec.formats.raw.RawTag.rst | 10 +++++++- .../hexrec.formats.srec.SrecTag.rst | 25 ++++++++++--------- .../hexrec.formats.titxt.TiTxtTag.rst | 25 ++++++++++--------- .../hexrec.formats.xtek.XtekTag.rst | 23 +++++++++-------- pyproject.toml | 1 + src/hexrec/__init__.py | 2 +- tox.ini | 9 +++---- 17 files changed, 118 insertions(+), 90 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6724594..c5d2e89 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,9 +4,12 @@ on: push: branches: - main + - rc pull_request: + workflow_dispatch: + jobs: build: runs-on: ${{ matrix.platform }} @@ -20,8 +23,6 @@ jobs: - windows-latest python-version: - - '3.7' - - '3.8' - '3.9' - '3.10' - '3.11' @@ -43,7 +44,7 @@ jobs: run: tox - name: Upload coverage - if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }} + if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }} uses: actions/upload-artifact@v4 with: name: hexrec-coverage @@ -51,7 +52,7 @@ jobs: if-no-files-found: error - name: Upload to codecov - if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.11' }} + if: ${{ matrix.platform == 'ubuntu-latest' && matrix.python-version == '3.12' }} uses: codecov/codecov-action@v4 with: fail_ci_if_error: true diff --git a/.github/workflows/packaging.yml b/.github/workflows/packaging.yml index 724442b..d8a0765 100644 --- a/.github/workflows/packaging.yml +++ b/.github/workflows/packaging.yml @@ -4,6 +4,7 @@ on: push: branches: - main + - rc pull_request: @@ -17,8 +18,6 @@ jobs: max-parallel: 4 matrix: python-version: - - '3.7' - - '3.8' - '3.9' - '3.10' - '3.11' diff --git a/.gitignore b/.gitignore index 7e90797..8ef5f83 100644 --- a/.gitignore +++ b/.gitignore @@ -10,7 +10,7 @@ dist build eggs .eggs -env +*env parts bin var @@ -20,8 +20,6 @@ develop-eggs .installed.cfg lib lib64 -venv*/ -pyvenv*/ tmp* # Installer logs @@ -48,6 +46,7 @@ tests/*.html .idea *.iml *.komodoproject +.vscode # Complexity output/*.html diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 93133e9..0f09c25 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,8 +1,14 @@ Changelog ========= -0.4.0 (TBD) ------------ +0.4.1 (2024-10-05) +------------------ + +* Minor workflow and metadata updates. + + +0.4.0 (2024-03-08) +------------------ * Library rewritten from scratch (not backwards compatible). * Added new object oriented API, hopefully more user friendly. diff --git a/MANIFEST.in b/MANIFEST.in index 0c5de14..77d182b 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -18,6 +18,7 @@ include README.rst include requirements.txt include pyproject.toml include setup.cfg +include setup.py include tox.ini global-exclude *.py[cod] __pycache__ *.so *.dylib diff --git a/README.rst b/README.rst index e4c2a1d..505c3bf 100644 --- a/README.rst +++ b/README.rst @@ -27,7 +27,7 @@ Overview .. |codecov| image:: https://codecov.io/gh/TexZK/hexrec/branch/main/graphs/badge.svg?branch=main :alt: Coverage Status - :target: https://codecov.io/github/TexZK/hexrec + :target: https://app.codecov.io/github/TexZK/hexrec .. |version| image:: https://img.shields.io/pypi/v/hexrec.svg :alt: PyPI Package latest release diff --git a/docs/_autosummary/hexrec.formats.asciihex.AsciiHexTag.rst b/docs/_autosummary/hexrec.formats.asciihex.AsciiHexTag.rst index 7424c78..99403f0 100644 --- a/docs/_autosummary/hexrec.formats.asciihex.AsciiHexTag.rst +++ b/docs/_autosummary/hexrec.formats.asciihex.AsciiHexTag.rst @@ -1,4 +1,4 @@ -AsciiHexTag +AsciiHexTag =========== .. currentmodule:: hexrec.formats.asciihex @@ -16,13 +16,13 @@ AsciiHexTag .. autosummary:: + ~AsciiHexTag.real + ~AsciiHexTag.imag + ~AsciiHexTag.numerator + ~AsciiHexTag.denominator ~AsciiHexTag.DATA ~AsciiHexTag.ADDRESS ~AsciiHexTag.CHECKSUM - ~AsciiHexTag.denominator - ~AsciiHexTag.imag - ~AsciiHexTag.numerator - ~AsciiHexTag.real @@ -34,13 +34,14 @@ AsciiHexTag .. autosummary:: :nosignatures: - ~AsciiHexTag.is_address - ~AsciiHexTag.is_checksum - ~AsciiHexTag.__init__ - ~AsciiHexTag.as_integer_ratio - ~AsciiHexTag.bit_count - ~AsciiHexTag.bit_length + ~AsciiHexTag.is_data + ~AsciiHexTag.is_file_termination ~AsciiHexTag.conjugate - ~AsciiHexTag.from_bytes + ~AsciiHexTag.bit_length + ~AsciiHexTag.bit_count ~AsciiHexTag.to_bytes + ~AsciiHexTag.from_bytes + ~AsciiHexTag.as_integer_ratio + ~AsciiHexTag.is_address + ~AsciiHexTag.is_checksum diff --git a/docs/_autosummary/hexrec.formats.avr.AvrTag.rst b/docs/_autosummary/hexrec.formats.avr.AvrTag.rst index 299b5dd..68fec85 100644 --- a/docs/_autosummary/hexrec.formats.avr.AvrTag.rst +++ b/docs/_autosummary/hexrec.formats.avr.AvrTag.rst @@ -1,4 +1,4 @@ -AvrTag +AvrTag ====== .. currentmodule:: hexrec.formats.avr @@ -23,3 +23,11 @@ AvrTag + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~AvrTag.is_data + ~AvrTag.is_file_termination + diff --git a/docs/_autosummary/hexrec.formats.ihex.IhexTag.rst b/docs/_autosummary/hexrec.formats.ihex.IhexTag.rst index ef641cb..373f7ea 100644 --- a/docs/_autosummary/hexrec.formats.ihex.IhexTag.rst +++ b/docs/_autosummary/hexrec.formats.ihex.IhexTag.rst @@ -1,4 +1,4 @@ -IhexTag +IhexTag ======= .. currentmodule:: hexrec.formats.ihex @@ -16,16 +16,16 @@ IhexTag .. autosummary:: + ~IhexTag.real + ~IhexTag.imag + ~IhexTag.numerator + ~IhexTag.denominator ~IhexTag.DATA ~IhexTag.END_OF_FILE ~IhexTag.EXTENDED_SEGMENT_ADDRESS ~IhexTag.START_SEGMENT_ADDRESS ~IhexTag.EXTENDED_LINEAR_ADDRESS ~IhexTag.START_LINEAR_ADDRESS - ~IhexTag.denominator - ~IhexTag.imag - ~IhexTag.numerator - ~IhexTag.real @@ -37,14 +37,15 @@ IhexTag .. autosummary:: :nosignatures: + ~IhexTag.is_data + ~IhexTag.is_file_termination + ~IhexTag.conjugate + ~IhexTag.bit_length + ~IhexTag.bit_count + ~IhexTag.to_bytes + ~IhexTag.from_bytes + ~IhexTag.as_integer_ratio ~IhexTag.is_eof ~IhexTag.is_extension ~IhexTag.is_start - ~IhexTag.__init__ - ~IhexTag.as_integer_ratio - ~IhexTag.bit_count - ~IhexTag.bit_length - ~IhexTag.conjugate - ~IhexTag.from_bytes - ~IhexTag.to_bytes diff --git a/docs/_autosummary/hexrec.formats.mos.MosTag.rst b/docs/_autosummary/hexrec.formats.mos.MosTag.rst index 4c6fb7d..6c69e55 100644 --- a/docs/_autosummary/hexrec.formats.mos.MosTag.rst +++ b/docs/_autosummary/hexrec.formats.mos.MosTag.rst @@ -1,4 +1,4 @@ -MosTag +MosTag ====== .. currentmodule:: hexrec.formats.mos @@ -16,12 +16,12 @@ MosTag .. autosummary:: - ~MosTag.DATA - ~MosTag.EOF - ~MosTag.denominator + ~MosTag.real ~MosTag.imag ~MosTag.numerator - ~MosTag.real + ~MosTag.denominator + ~MosTag.DATA + ~MosTag.EOF @@ -33,12 +33,13 @@ MosTag .. autosummary:: :nosignatures: - ~MosTag.is_eof - ~MosTag.__init__ - ~MosTag.as_integer_ratio - ~MosTag.bit_count - ~MosTag.bit_length + ~MosTag.is_data + ~MosTag.is_file_termination ~MosTag.conjugate - ~MosTag.from_bytes + ~MosTag.bit_length + ~MosTag.bit_count ~MosTag.to_bytes + ~MosTag.from_bytes + ~MosTag.as_integer_ratio + ~MosTag.is_eof diff --git a/docs/_autosummary/hexrec.formats.raw.RawTag.rst b/docs/_autosummary/hexrec.formats.raw.RawTag.rst index 4ac5a9f..e0db089 100644 --- a/docs/_autosummary/hexrec.formats.raw.RawTag.rst +++ b/docs/_autosummary/hexrec.formats.raw.RawTag.rst @@ -1,4 +1,4 @@ -RawTag +RawTag ====== .. currentmodule:: hexrec.formats.raw @@ -23,3 +23,11 @@ RawTag + .. rubric:: Methods + + .. autosummary:: + :nosignatures: + + ~RawTag.is_data + ~RawTag.is_file_termination + diff --git a/docs/_autosummary/hexrec.formats.srec.SrecTag.rst b/docs/_autosummary/hexrec.formats.srec.SrecTag.rst index 6826a70..e8e810d 100644 --- a/docs/_autosummary/hexrec.formats.srec.SrecTag.rst +++ b/docs/_autosummary/hexrec.formats.srec.SrecTag.rst @@ -1,4 +1,4 @@ -SrecTag +SrecTag ======= .. currentmodule:: hexrec.formats.srec @@ -16,6 +16,10 @@ SrecTag .. autosummary:: + ~SrecTag.real + ~SrecTag.imag + ~SrecTag.numerator + ~SrecTag.denominator ~SrecTag.HEADER ~SrecTag.DATA_16 ~SrecTag.DATA_24 @@ -26,10 +30,6 @@ SrecTag ~SrecTag.START_32 ~SrecTag.START_24 ~SrecTag.START_16 - ~SrecTag.denominator - ~SrecTag.imag - ~SrecTag.numerator - ~SrecTag.real @@ -41,6 +41,14 @@ SrecTag .. autosummary:: :nosignatures: + ~SrecTag.is_data + ~SrecTag.is_file_termination + ~SrecTag.conjugate + ~SrecTag.bit_length + ~SrecTag.bit_count + ~SrecTag.to_bytes + ~SrecTag.from_bytes + ~SrecTag.as_integer_ratio ~SrecTag.fit_count_tag ~SrecTag.fit_data_tag ~SrecTag.fit_start_tag @@ -51,11 +59,4 @@ SrecTag ~SrecTag.is_count ~SrecTag.is_header ~SrecTag.is_start - ~SrecTag.__init__ - ~SrecTag.as_integer_ratio - ~SrecTag.bit_count - ~SrecTag.bit_length - ~SrecTag.conjugate - ~SrecTag.from_bytes - ~SrecTag.to_bytes diff --git a/docs/_autosummary/hexrec.formats.titxt.TiTxtTag.rst b/docs/_autosummary/hexrec.formats.titxt.TiTxtTag.rst index 24d1396..61f1d1d 100644 --- a/docs/_autosummary/hexrec.formats.titxt.TiTxtTag.rst +++ b/docs/_autosummary/hexrec.formats.titxt.TiTxtTag.rst @@ -1,4 +1,4 @@ -TiTxtTag +TiTxtTag ======== .. currentmodule:: hexrec.formats.titxt @@ -16,13 +16,13 @@ TiTxtTag .. autosummary:: + ~TiTxtTag.real + ~TiTxtTag.imag + ~TiTxtTag.numerator + ~TiTxtTag.denominator ~TiTxtTag.DATA ~TiTxtTag.ADDRESS ~TiTxtTag.EOF - ~TiTxtTag.denominator - ~TiTxtTag.imag - ~TiTxtTag.numerator - ~TiTxtTag.real @@ -34,13 +34,14 @@ TiTxtTag .. autosummary:: :nosignatures: - ~TiTxtTag.is_address - ~TiTxtTag.is_eof - ~TiTxtTag.__init__ - ~TiTxtTag.as_integer_ratio - ~TiTxtTag.bit_count - ~TiTxtTag.bit_length + ~TiTxtTag.is_data + ~TiTxtTag.is_file_termination ~TiTxtTag.conjugate - ~TiTxtTag.from_bytes + ~TiTxtTag.bit_length + ~TiTxtTag.bit_count ~TiTxtTag.to_bytes + ~TiTxtTag.from_bytes + ~TiTxtTag.as_integer_ratio + ~TiTxtTag.is_address + ~TiTxtTag.is_eof diff --git a/docs/_autosummary/hexrec.formats.xtek.XtekTag.rst b/docs/_autosummary/hexrec.formats.xtek.XtekTag.rst index c8430d5..6cf06d3 100644 --- a/docs/_autosummary/hexrec.formats.xtek.XtekTag.rst +++ b/docs/_autosummary/hexrec.formats.xtek.XtekTag.rst @@ -1,4 +1,4 @@ -XtekTag +XtekTag ======= .. currentmodule:: hexrec.formats.xtek @@ -16,12 +16,12 @@ XtekTag .. autosummary:: - ~XtekTag.DATA - ~XtekTag.EOF - ~XtekTag.denominator + ~XtekTag.real ~XtekTag.imag ~XtekTag.numerator - ~XtekTag.real + ~XtekTag.denominator + ~XtekTag.DATA + ~XtekTag.EOF @@ -33,12 +33,13 @@ XtekTag .. autosummary:: :nosignatures: - ~XtekTag.is_eof - ~XtekTag.__init__ - ~XtekTag.as_integer_ratio - ~XtekTag.bit_count - ~XtekTag.bit_length + ~XtekTag.is_data + ~XtekTag.is_file_termination ~XtekTag.conjugate - ~XtekTag.from_bytes + ~XtekTag.bit_length + ~XtekTag.bit_count ~XtekTag.to_bytes + ~XtekTag.from_bytes + ~XtekTag.as_integer_ratio + ~XtekTag.is_eof diff --git a/pyproject.toml b/pyproject.toml index 330e84e..5da655a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -20,6 +20,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", # adds: typing.TypeAlias "Programming Language :: Python :: 3.11", # adds: typing.Self "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator", diff --git a/src/hexrec/__init__.py b/src/hexrec/__init__.py index 8b4f6bb..e1b9d44 100644 --- a/src/hexrec/__init__.py +++ b/src/hexrec/__init__.py @@ -23,7 +23,7 @@ # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. -__version__ = '0.4.0' +__version__ = '0.4.1' from .base import FILE_TYPES from .base import convert diff --git a/tox.ini b/tox.ini index a478ced..c3bf1e2 100644 --- a/tox.ini +++ b/tox.ini @@ -24,6 +24,7 @@ basepython = py310: {env:TOXPYTHON:python3.10} py311: {env:TOXPYTHON:python3.11} py312: {env:TOXPYTHON:python3.12} + py313: {env:TOXPYTHON:python3.13} {clean,check,report}: {env:TOXPYTHON:python3} {docs,spell}: {env:TOXPYTHON:python3} pypy3: {env:TOXPYTHON:pypy3} @@ -126,10 +127,8 @@ skip_install = true ; Settings for GitHub Actions. [gh-actions] python = - 3.7: py37 - 3.8: py38 3.9: py39 3.10: py310 - 3.11: {py311,clean,check,report,docs,spell} - 3.12: py312 - pypy-3.9: pypy3 + 3.11: py311 + 3.12: {py312,clean,check,report,docs,spell} + pypy-3.10: pypy3