From b17ae8cf2f103cb2631891332d7060fc68504ec1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 Jun 2022 21:38:20 +0000 Subject: [PATCH 01/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.2.0 → v4.3.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.2.0...v4.3.0) - [github.com/pycqa/pylint: v2.14.1 → v2.14.3](https://github.com/pycqa/pylint/compare/v2.14.1...v2.14.3) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7629f6b..f2dadd5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,13 +12,13 @@ repos: hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.3.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.14.1 + rev: v2.14.3 hooks: - id: pylint name: lint (examples) From 9264cb70a89a4a81d1041161a3b2832da2deb881 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Jul 2022 21:44:27 +0000 Subject: [PATCH 02/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.3.0 → 22.6.0](https://github.com/psf/black/compare/22.3.0...22.6.0) - [github.com/pycqa/pylint: v2.14.3 → v2.14.5](https://github.com/pycqa/pylint/compare/v2.14.3...v2.14.5) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f2dadd5..b139f3f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 22.6.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.14.3 + rev: v2.14.5 hooks: - id: pylint name: lint (examples) From e2a5906d6deb04c635fbca06f646cccc0002aa94 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 29 Aug 2022 22:45:37 +0000 Subject: [PATCH 03/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.14.5 → v2.15.0](https://github.com/pycqa/pylint/compare/v2.14.5...v2.15.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b139f3f..1e2b205 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.14.5 + rev: v2.15.0 hooks: - id: pylint name: lint (examples) From b7d502e8291e7c636fb9ede9e7b0361017273498 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Sep 2022 00:15:23 +0000 Subject: [PATCH 04/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1e2b205..d25a462 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 22.6.0 + rev: 22.8.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 4837d7d21b83d418a9fa1d5c2c33a6cc713e1690 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 12 Sep 2022 22:57:24 +0000 Subject: [PATCH 05/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.0 → v2.15.2](https://github.com/pycqa/pylint/compare/v2.15.0...v2.15.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d25a462..f180233 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.0 + rev: v2.15.2 hooks: - id: pylint name: lint (examples) From 04885e60adfc13cf6a5a99ece8d6d55cc7c89ad6 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Sep 2022 00:02:42 +0000 Subject: [PATCH 06/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.2 → v2.15.3](https://github.com/pycqa/pylint/compare/v2.15.2...v2.15.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f180233..c277123 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.2 + rev: v2.15.3 hooks: - id: pylint name: lint (examples) From 9d768243f5a1c1086ea32984edcee579d9dbd144 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 19 Sep 2022 19:10:59 -0500 Subject: [PATCH 07/60] fetch tags before building circuitpython --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fa8c5d3..5ec1568 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,7 +55,7 @@ jobs: - name: Clone and build circuitpython unix port run: | set -e - [ -e circuitpython/py/py.mk ] || git clone --depth=1 https://github.com/adafruit/circuitpython + [ -e circuitpython/py/py.mk ] || (git clone --depth=1 https://github.com/adafruit/circuitpython && cd circuitpython && git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD) [ -e circuitpython/lib/libffi/autogen.sh ] || (cd circuitpython && git submodule update --init lib/libffi lib/axtls lib/berkeley-db-1.xx tools/huffman lib/uzlib extmod/ulab) [ -x circuitpython/ports/unix/micropython ] || ( make -C circuitpython/mpy-cross -j$(nproc) From 97e49129e908aa2d0f05fb256311f8b071d8f3d5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 24 Oct 2022 23:51:23 +0000 Subject: [PATCH 08/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.8.0 → 22.10.0](https://github.com/psf/black/compare/22.8.0...22.10.0) - [github.com/pycqa/pylint: v2.15.3 → v2.15.5](https://github.com/pycqa/pylint/compare/v2.15.3...v2.15.5) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c277123..bb6a44e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 22.8.0 + rev: 22.10.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.3 + rev: v2.15.5 hooks: - id: pylint name: lint (examples) From 32856d6513eef7b890e5f08702a07a42ca7e6455 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 22 Nov 2022 00:17:34 +0000 Subject: [PATCH 09/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.5 → v2.15.6](https://github.com/pycqa/pylint/compare/v2.15.5...v2.15.6) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bb6a44e..ee24791 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.5 + rev: v2.15.6 hooks: - id: pylint name: lint (examples) From a6d49833183d6bef8311d02b9ffe5c04226b27d4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 29 Nov 2022 02:41:22 +0000 Subject: [PATCH 10/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.3.0 → v4.4.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.3.0...v4.4.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ee24791..234cfc5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: check-yaml - id: end-of-file-fixer From 9af60d9411b1d9c947d16037b1751b085cb470cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 6 Dec 2022 01:12:54 +0000 Subject: [PATCH 11/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v1.0.0 → v1.1.0](https://github.com/fsfe/reuse-tool/compare/v1.0.0...v1.1.0) - [github.com/pycqa/pylint: v2.15.6 → v2.15.8](https://github.com/pycqa/pylint/compare/v2.15.6...v2.15.8) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 234cfc5..af612f7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v1.0.0 + rev: v1.1.0 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.6 + rev: v2.15.8 hooks: - id: pylint name: lint (examples) From efa6a36fd9837c9787bdbbc469528e0bf65cda84 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 13 Dec 2022 02:10:27 +0000 Subject: [PATCH 12/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index af612f7..31c0b71 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 22.10.0 + rev: 22.12.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 0e2e15529b2ee833d61960b7c521b92c3f81c088 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 20 Dec 2022 02:11:03 +0000 Subject: [PATCH 13/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.8 → v2.15.9](https://github.com/pycqa/pylint/compare/v2.15.8...v2.15.9) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 31c0b71..5ebdef9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.8 + rev: v2.15.9 hooks: - id: pylint name: lint (examples) From 45425f3e283e8ec473d028c2b25e61c8de81303f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 02:24:24 +0000 Subject: [PATCH 14/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.9 → v2.15.10](https://github.com/pycqa/pylint/compare/v2.15.9...v2.15.10) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5ebdef9..90ef545 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.9 + rev: v2.15.10 hooks: - id: pylint name: lint (examples) From 28a7edf0cc1a8a961c4bdc1c0e3d2b212ea7ab8b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 17 Jan 2023 03:18:26 +0000 Subject: [PATCH 15/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.15.10 → v2.16.0b0](https://github.com/pycqa/pylint/compare/v2.15.10...v2.16.0b0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90ef545..3485429 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.15.10 + rev: v2.16.0b0 hooks: - id: pylint name: lint (examples) From 9c7e203e902787436b4c017868d92b2ff7b1ef48 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 17 Jan 2023 07:51:58 -0600 Subject: [PATCH 16/60] Fix after pylint update --- .pylintrc | 7 ------- jepler_udecimal/__init__.py | 20 ++++++++++---------- 2 files changed, 10 insertions(+), 17 deletions(-) diff --git a/.pylintrc b/.pylintrc index a4ddafa..203e349 100644 --- a/.pylintrc +++ b/.pylintrc @@ -391,10 +391,3 @@ max-statements=50 # Minimum number of public methods for a class (see R0903). min-public-methods=1 - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/jepler_udecimal/__init__.py b/jepler_udecimal/__init__.py index d322e9f..61841d4 100644 --- a/jepler_udecimal/__init__.py +++ b/jepler_udecimal/__init__.py @@ -1798,16 +1798,16 @@ def _round_05up(self, prec): else: return -self._round_down(prec) - _pick_rounding_function = dict( - ROUND_DOWN=_round_down, - ROUND_UP=_round_up, - ROUND_HALF_UP=_round_half_up, - ROUND_HALF_DOWN=_round_half_down, - ROUND_HALF_EVEN=_round_half_even, - ROUND_CEILING=_round_ceiling, - ROUND_FLOOR=_round_floor, - ROUND_05UP=_round_05up, - ) + _pick_rounding_function = { + ROUND_DOWN: _round_down, + ROUND_UP: _round_up, + ROUND_HALF_UP: _round_half_up, + ROUND_HALF_DOWN: _round_half_down, + ROUND_HALF_EVEN: _round_half_even, + ROUND_CEILING: _round_ceiling, + ROUND_FLOOR: _round_floor, + ROUND_05UP: _round_05up, + } def __round__(self, n=None): """Round self to the nearest integer, or to a given precision. From 181a581db1ff9c8fdaacf774843395f03ac25bdc Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 17 Jan 2023 08:04:06 -0600 Subject: [PATCH 17/60] Use build.sh --- .github/workflows/build.yml | 51 +++++-------------------------------- build.sh | 23 ++++++++--------- requirements_dev.txt | 2 +- 3 files changed, 18 insertions(+), 58 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5ec1568..4ac5673 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,55 +42,18 @@ jobs: # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) run: | source actions-ci/install.sh - - name: Pip install Sphinx, pre-commit - run: | - pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit sphinx-autoapi - name: Library version run: git describe --dirty --always --tags - - name: Setup problem matchers - uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 - - name: Pre-commit hooks - run: | - pre-commit run --all-files - - name: Clone and build circuitpython unix port - run: | - set -e - [ -e circuitpython/py/py.mk ] || (git clone --depth=1 https://github.com/adafruit/circuitpython && cd circuitpython && git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD) - [ -e circuitpython/lib/libffi/autogen.sh ] || (cd circuitpython && git submodule update --init lib/libffi lib/axtls lib/berkeley-db-1.xx tools/huffman lib/uzlib extmod/ulab) - [ -x circuitpython/ports/unix/micropython ] || ( - make -C circuitpython/mpy-cross -j$(nproc) - make -C circuitpython/ports/unix -j$(nproc) deplibs - make -C circuitpython/ports/unix -j$(nproc) DEBUG=1 STRIP=: - ) - - name: Unit Test + - name: Perform build & test run: | - python -m jepler_udecimal.test - if ! env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests.py -d examples; then - for exp in *.exp; do - testbase=$(basename $exp .exp); - echo -e "\nFAILURE $testbase"; - diff -u $testbase.exp $testbase.out; - done - exit 1 - fi - - name: Build assets - run: circuitpython-build-bundles --package_folder_prefix jepler --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Build docs - working-directory: docs - run: sphinx-build -E -W -b html . _build/html + ./build.sh - name: Archive bundles uses: actions/upload-artifact@v2 with: name: bundles path: ${{ github.workspace }}/bundles/ - - name: Check For setup.py - id: need-pypi - run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) - - name: Build Python package - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - run: | - pip install --upgrade setuptools wheel twine readme_renderer testresources - python setup.py sdist - python setup.py bdist_wheel --universal - twine check dist/* + - name: Archive docs + uses: actions/upload-artifact@v2 + with: + name: docs + path: ${{ github.workspace }}/_build/html diff --git a/build.sh b/build.sh index 9d4dc37..a314d47 100755 --- a/build.sh +++ b/build.sh @@ -9,17 +9,12 @@ echo "=== Create and set up virtual environment" . .env/bin/activate echo "=== Install requirements" pip3 install wheel -pip3 install -r requirements.txt +pip3 install -r requirements_dev.txt echo "=== Run pre-commit" pre-commit run --all-files -echo "=== Run pylint" -pylint jepler_udecimal -if [ -d examples ]; then - pylint --disable=missing-docstring,invalid-name,bad-whitespace examples -fi echo "=== Clone and build circuitpython unix port" -[ -e circuitpython/py/py.mk ] || git clone --depth=1 https://github.com/adafruit/circuitpython +[ -e circuitpython/py/py.mk ] || git clone --shallow-since=2021-07-01 https://github.com/adafruit/circuitpython [ -e circuitpython/lib/libffi/autogen.sh ] || (cd circuitpython && git submodule update --init lib/libffi lib/axtls lib/berkeley-db-1.xx tools/huffman lib/uzlib extmod/ulab) [ -x circuitpython/ports/unix/micropython ] || ( make -C circuitpython/mpy-cross -j$(nproc) @@ -30,12 +25,14 @@ make -C circuitpython/ports/unix -j$(nproc) DEBUG=1 STRIP=: echo "=== Run tests" python -m jepler_udecimal.test -if ! env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests -d examples; then - for exp in *.exp; do - testbase=$(basename $exp .exp); - echo -e "\nFAILURE $testbase"; - diff -u $testbase.exp $testbase.out; - done +run-tests () { + env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests.py "$@" +} + +run-tests --clean-failures +if ! run-tests -d examples; then + run-tests --print-failures + exit 1 fi PYTHONPATH=. python examples/test_udecimal.py > test_udecimal.exp diff --git a/requirements_dev.txt b/requirements_dev.txt index 82911ac..7913ee8 100644 --- a/requirements_dev.txt +++ b/requirements_dev.txt @@ -4,7 +4,7 @@ # SPDX-License-Identifier: MIT pre-commit recommonmark==0.6.0 -sphinx<4 +sphinx sphinx-autoapi sphinxcontrib-svg2pdfconverter==0.1.0 sphinx-rtd-theme From b97ccb2192349a342681e8ab4864a4da8903a4fe Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 7 Mar 2023 04:44:13 +0000 Subject: [PATCH 18/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 22.12.0 → 23.1.0](https://github.com/psf/black/compare/22.12.0...23.1.0) - [github.com/fsfe/reuse-tool: v1.1.0 → v1.1.2](https://github.com/fsfe/reuse-tool/compare/v1.1.0...v1.1.2) - [github.com/pycqa/pylint: v2.16.0b0 → v2.16.4](https://github.com/pycqa/pylint/compare/v2.16.0b0...v2.16.4) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3485429..a21ba7d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,11 @@ repos: - repo: https://github.com/psf/black - rev: 22.12.0 + rev: 23.1.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v1.1.0 + rev: v1.1.2 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.16.0b0 + rev: v2.16.4 hooks: - id: pylint name: lint (examples) From 41712b4d8410d396d14b3c2a34d32f8ddba8ccb1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 14 Mar 2023 05:10:47 +0000 Subject: [PATCH 19/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.16.4 → v2.17.0](https://github.com/pycqa/pylint/compare/v2.16.4...v2.17.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a21ba7d..e3f82f6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.16.4 + rev: v2.17.0 hooks: - id: pylint name: lint (examples) From df98f477fae58d3b1dd678cba9b9885b8b0a373f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 28 Mar 2023 03:57:03 +0000 Subject: [PATCH 20/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v2.17.0 → v2.17.1](https://github.com/pycqa/pylint/compare/v2.17.0...v2.17.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e3f82f6..35719e7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.17.0 + rev: v2.17.1 hooks: - id: pylint name: lint (examples) From f5df740fb9fa90cf3c0651892078ca0c288ce81e Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 31 May 2023 10:21:48 -0500 Subject: [PATCH 21/60] Add "v2" readthedocs setup --- .readthedocs.yaml | 19 +++++++++++++++++++ .readthedocs.yml | 7 ------- 2 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 .readthedocs.yaml delete mode 100644 .readthedocs.yml diff --git a/.readthedocs.yaml b/.readthedocs.yaml new file mode 100644 index 0000000..33c2a61 --- /dev/null +++ b/.readthedocs.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3" + +python: + install: + - requirements: docs/requirements.txt + - requirements: requirements.txt diff --git a/.readthedocs.yml b/.readthedocs.yml deleted file mode 100644 index 338427a..0000000 --- a/.readthedocs.yml +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -python: - version: 3 -requirements_file: docs/requirements.txt From 63f2c9861a323a9adf7d2fdba52d0cedfebbc4f2 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 31 May 2023 10:32:20 -0500 Subject: [PATCH 22/60] bring workflows up to date --- .github/workflows/build.yml | 51 +---------- .github/workflows/failure-help-text.yml | 19 +++++ .github/workflows/release.yml | 85 ------------------- .github/workflows/release_gh.yml | 20 +++++ .github/workflows/release_pypi.yml | 19 +++++ ...ments_dev.txt => optional_requirements.txt | 0 6 files changed, 62 insertions(+), 132 deletions(-) create mode 100644 .github/workflows/failure-help-text.yml delete mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/release_gh.yml create mode 100644 .github/workflows/release_pypi.yml rename requirements_dev.txt => optional_requirements.txt (100%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4ac5673..84dca89 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,52 +8,9 @@ on: [pull_request, push] jobs: test: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - - name: View context attributes - uses: actions/github-script@v6 + - name: Run Build CI workflow + uses: adafruit/workflows-circuitpython-libs/build@main with: - script: console.log(JSON.stringify(context, null, 2)) - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v1 - with: - python-version: 3.x - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install dependencies - # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) - run: | - source actions-ci/install.sh - - name: Library version - run: git describe --dirty --always --tags - - name: Perform build & test - run: | - ./build.sh - - name: Archive bundles - uses: actions/upload-artifact@v2 - with: - name: bundles - path: ${{ github.workspace }}/bundles/ - - name: Archive docs - uses: actions/upload-artifact@v2 - with: - name: docs - path: ${{ github.workspace }}/_build/html + package-prefix: jepler_udecimal diff --git a/.github/workflows/failure-help-text.yml b/.github/workflows/failure-help-text.yml new file mode 100644 index 0000000..0b1194f --- /dev/null +++ b/.github/workflows/failure-help-text.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Failure help text + +on: + workflow_run: + workflows: ["Build CI"] + types: + - completed + +jobs: + post-help: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} + steps: + - name: Post comment to help + uses: adafruit/circuitpython-action-library-ci-failed@v1 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index dab7c88..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,85 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Release Actions - -on: - release: - types: [published] - -jobs: - upload-release-assets: - runs-on: ubuntu-20.04 - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.7 - uses: actions/setup-python@v1 - with: - python-version: 3.7 - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install deps - run: | - source actions-ci/install.sh - - name: Build assets - run: circuitpython-build-bundles --package_folder_prefix jepler --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Upload Release Assets - # the 'official' actions version does not yet support dynamically - # supplying asset names to upload. @csexton's version chosen based on - # discussion in the issue below, as its the simplest to implement and - # allows for selecting files with a pattern. - # https://github.com/actions/upload-release-asset/issues/4 - #uses: actions/upload-release-asset@v1.0.1 - uses: csexton/release-asset-action@master - with: - pattern: "bundles/*" - github-token: ${{ secrets.GITHUB_TOKEN }} - - upload-pypi: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v1 - - name: Check For setup.py - id: need-pypi - run: | - echo ::set-output name=setup-py::$( find . -wholename './setup.py' ) - - name: Set up Python - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - uses: actions/setup-python@v1 - with: - python-version: '3.x' - - name: Install dependencies - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - run: | - python -m pip install --upgrade pip - pip install setuptools wheel twine - - name: Build and publish - if: contains(steps.need-pypi.outputs.setup-py, 'setup.py') - env: - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.pypi_token }} - run: | - python setup.py sdist - twine upload dist/* diff --git a/.github/workflows/release_gh.yml b/.github/workflows/release_gh.yml new file mode 100644 index 0000000..26d9703 --- /dev/null +++ b/.github/workflows/release_gh.yml @@ -0,0 +1,20 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: GitHub Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Run GitHub Release CI workflow + uses: adafruit/workflows-circuitpython-libs/release-gh@main + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + upload-url: ${{ github.event.release.upload_url }} + package-prefix: jepler_udecimal diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml new file mode 100644 index 0000000..65775b7 --- /dev/null +++ b/.github/workflows/release_pypi.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: PyPI Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Run PyPI Release CI workflow + uses: adafruit/workflows-circuitpython-libs/release-pypi@main + with: + pypi-username: ${{ secrets.pypi_username }} + pypi-password: ${{ secrets.pypi_password }} diff --git a/requirements_dev.txt b/optional_requirements.txt similarity index 100% rename from requirements_dev.txt rename to optional_requirements.txt From 31d1a598501a168493f23db633de2008e3a23574 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 14 Jun 2023 16:16:40 -0500 Subject: [PATCH 23/60] tweak secrets in release process --- .github/workflows/release_pypi.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release_pypi.yml b/.github/workflows/release_pypi.yml index 65775b7..97b80f8 100644 --- a/.github/workflows/release_pypi.yml +++ b/.github/workflows/release_pypi.yml @@ -15,5 +15,5 @@ jobs: - name: Run PyPI Release CI workflow uses: adafruit/workflows-circuitpython-libs/release-pypi@main with: - pypi-username: ${{ secrets.pypi_username }} - pypi-password: ${{ secrets.pypi_password }} + pypi-username: __token__ + pypi-password: ${{ secrets.pypi_token }} From b9b484290fbb694794c35cfe47efdc3aa6d44710 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 25 Jul 2023 07:46:16 -0500 Subject: [PATCH 24/60] pre-commit: update --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 35719e7..f8e6226 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,11 @@ repos: - repo: https://github.com/psf/black - rev: 23.1.0 + rev: 23.7.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v1.1.2 + rev: v2.1.0 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks From 83930339ca23aa6ee44cee57e2b9700410624dbd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Oct 2023 12:24:55 +0000 Subject: [PATCH 25/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.7.0 → 23.9.1](https://github.com/psf/black/compare/23.7.0...23.9.1) - [github.com/pycqa/pylint: v2.17.1 → v3.0.0](https://github.com/pycqa/pylint/compare/v2.17.1...v3.0.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f8e6226..d11db8c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v2.17.1 + rev: v3.0.0 hooks: - id: pylint name: lint (examples) From 0457a674fbb1369636ce88ae99e858056185d072 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:40:19 -0500 Subject: [PATCH 26/60] add empty tool.setuptools block for check_lib_packaging --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index f3c35ae..59ee981 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,3 +4,4 @@ [tool.black] target-version = ['py35'] +[tool.setuptools] From ad4b93e430bf2aa1925fbce884560490a9a065a8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:44:05 -0500 Subject: [PATCH 27/60] try listing the package name here --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 59ee981..64763d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,3 +5,4 @@ [tool.black] target-version = ['py35'] [tool.setuptools] +packages=jepler_udecimal From 85a0e594f6efb1b86e54428c5d29c905374ff917 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 09:47:45 -0500 Subject: [PATCH 28/60] fix toml syntax --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 64763d2..cddef0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,4 +5,4 @@ [tool.black] target-version = ['py35'] [tool.setuptools] -packages=jepler_udecimal +packages=['jepler_udecimal'] From 58389b892c403f2c3a26c26a09285ff8aea8ed9b Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 3 Oct 2023 10:38:59 -0500 Subject: [PATCH 29/60] switch to pyproject.toml packaging, thank you --- .gitignore | 1 + pyproject.toml | 45 ++++++++++++++++++++++++++++++++-- setup.py | 65 -------------------------------------------------- 3 files changed, 44 insertions(+), 67 deletions(-) delete mode 100644 setup.py diff --git a/.gitignore b/.gitignore index b6dc5d2..cb1ae01 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ docs/api circuitpython /*.exp /*.out +*/__version__.py diff --git a/pyproject.toml b/pyproject.toml index cddef0b..f0d30e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,48 @@ # # SPDX-License-Identifier: Unlicense -[tool.black] -target-version = ['py35'] +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "circuitpython-jepler-udecimal" +description = "Reduced version of the decimal library for CircuitPython" +version = "0.0.0+auto.0" +readme = "README.rst" +authors = [ + {name = "Jeff Epler", email = "jepler@gmail.com"} +] +urls = { Source = "https://github.com/jepler/Jepler_CircuitPython_udecimal", Documentation = "https://jepler-udecimal.readthedocs.io/en/latest/api/jepler_udecimal/index.html", Tracker = "https://github.com/jepler/Jepler_CircuitPython_udecimal/issues" } +# "Pull Requests" = "https://github.com/jepler/Jepler_CircuitPython_udecimal/pulls", +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "udecimal", + "numeric", + "helper", + "arbitraryprecision", + "math", +] +license = {text = "MIT"} +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Embedded Systems", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "License :: OSI Approved :: Python Software Foundation License", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies", "optional-dependencies"] + + [tool.setuptools] packages=['jepler_udecimal'] +[tool.setuptools_scm] +write_to = "jepler_udecimal/__version__.py" diff --git a/setup.py b/setup.py deleted file mode 100644 index a8fbd90..0000000 --- a/setup.py +++ /dev/null @@ -1,65 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2020 jepler for Unpythonic Networks -# -# SPDX-License-Identifier: MIT - -"""A setuptools based setup module. - -See: -https://packaging.python.org/en/latest/distributing.html -https://github.com/pypa/sampleproject -""" - -from setuptools import setup, find_packages - -# To use a consistent encoding -from codecs import open -from os import path - -here = path.abspath(path.dirname(__file__)) - -# Get the long description from the README file -with open(path.join(here, "README.rst"), encoding="utf-8") as f: - long_description = f.read() - -setup( - name="jepler-circuitpython-udecimal", - use_scm_version=True, - setup_requires=["setuptools_scm"], - description="Reduced version of the decimal library for CircuitPython", - long_description=long_description, - long_description_content_type="text/x-rst", - # The project's main homepage. - url="https://github.com/jepler/Jepler_CircuitPython_udecimal", - project_urls={ - "Source": "https://github.com/jepler/Jepler_CircuitPython_udecimal", - "Documentation": "https://jepler-udecimal.readthedocs.io/en/latest/api/jepler_udecimal/index.html", - "Tracker": "https://github.com/jepler/Jepler_CircuitPython_udecimal/issues", - "Pull Requests": "https://github.com/jepler/Jepler_CircuitPython_udecimal/pulls", - }, - # Author details - author="Jeff Epler", - author_email="jepler@gmail.com", - install_requires=[], - # Choose your license - license="MIT", - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - "Development Status :: 3 - Alpha", - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "License :: OSI Approved :: MIT License", - "License :: OSI Approved :: Python Software Foundation License ", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.4", - "Programming Language :: Python :: 3.5", - "Programming Language :: Python :: 3.6", - "Programming Language :: Python :: 3.7", - ], - # What does your project relate to? - keywords="adafruit blinka circuitpython micropython udecimal numeric helper " - "arbitraryprecision math", - # You can just specify the packages manually here if your project is - # simple. Or you can use find_packages(). - packages=["jepler_udecimal"], -) From 68933efc83e977ffd143f9ad43102c9bcb3ae006 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:22:41 +0000 Subject: [PATCH 30/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pre-commit/pre-commit-hooks: v4.4.0 → v4.5.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.4.0...v4.5.0) - [github.com/pycqa/pylint: v3.0.0 → v3.0.1](https://github.com/pycqa/pylint/compare/v3.0.0...v3.0.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d11db8c..f27051f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,13 +12,13 @@ repos: hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v4.5.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.0.0 + rev: v3.0.1 hooks: - id: pylint name: lint (examples) From c7e572e464f4bb677150996f99b5fe1aa46fe382 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:15:20 +0000 Subject: [PATCH 31/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f27051f..23d269b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.9.1 + rev: 23.10.1 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 9de3ef9172d8ba856aa264e41e48d889a395d69e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Nov 2023 21:23:50 +0000 Subject: [PATCH 32/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.10.1 → 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 23d269b..09e6e36 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.10.1 + rev: 23.11.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From c03f786252d2d7c9d15d2ae4463c1a9bb98ba5ec Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 11 Dec 2023 21:16:58 +0000 Subject: [PATCH 33/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.0.1 → v3.0.3](https://github.com/pycqa/pylint/compare/v3.0.1...v3.0.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 09e6e36..a5b43a4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.0.1 + rev: v3.0.3 hooks: - id: pylint name: lint (examples) From 3b011fa0417a6dfd57c1582ca49e6808035cff0c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Dec 2023 21:25:50 +0000 Subject: [PATCH 34/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.11.0 → 23.12.0](https://github.com/psf/black/compare/23.11.0...23.12.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a5b43a4..966c1a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.11.0 + rev: 23.12.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 4b81cde84d32e06a724f939ed7246d572a7e2c42 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 25 Dec 2023 21:06:56 +0000 Subject: [PATCH 35/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.12.0 → 23.12.1](https://github.com/psf/black/compare/23.12.0...23.12.1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 966c1a9..4fad9a9 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 23.12.0 + rev: 23.12.1 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 90fcda462fe3357654df5c7d8b657dddec3d3428 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Mar 2024 22:38:05 +0000 Subject: [PATCH 36/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 23.12.1 → 24.3.0](https://github.com/psf/black/compare/23.12.1...24.3.0) - [github.com/fsfe/reuse-tool: v2.1.0 → v3.0.1](https://github.com/fsfe/reuse-tool/compare/v2.1.0...v3.0.1) - [github.com/pycqa/pylint: v3.0.3 → v3.1.0](https://github.com/pycqa/pylint/compare/v3.0.3...v3.1.0) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4fad9a9..15550ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,11 +4,11 @@ repos: - repo: https://github.com/psf/black - rev: 23.12.1 + rev: 24.3.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v2.1.0 + rev: v3.0.1 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.0.3 + rev: v3.1.0 hooks: - id: pylint name: lint (examples) From 65899256083af64aa30446abd38e7606ff919593 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 23:02:40 +0000 Subject: [PATCH 37/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v3.0.1 → v3.0.2](https://github.com/fsfe/reuse-tool/compare/v3.0.1...v3.0.2) - [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v4.6.0) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 15550ff..b0647d6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,11 +8,11 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v3.0.1 + rev: v3.0.2 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v4.6.0 hooks: - id: check-yaml - id: end-of-file-fixer From f2a7ca44fad36a1dd6ffa7247a65dd8ddb42d72e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 20 May 2024 21:53:04 +0000 Subject: [PATCH 38/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.3.0 → 24.4.2](https://github.com/psf/black/compare/24.3.0...24.4.2) - [github.com/pycqa/pylint: v3.1.0 → v3.2.2](https://github.com/pycqa/pylint/compare/v3.1.0...v3.2.2) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b0647d6..010b1b6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 24.3.0 + rev: 24.4.2 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.1.0 + rev: v3.2.2 hooks: - id: pylint name: lint (examples) From e10d32198aea515550c56f93af0e864343a56454 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 22:38:14 +0000 Subject: [PATCH 39/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v3.0.2 → v3.1.0a1](https://github.com/fsfe/reuse-tool/compare/v3.0.2...v3.1.0a1) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 010b1b6..1005971 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v3.0.2 + rev: v3.1.0a1 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks From 174acc986f9addb8d02296b4d8ff7a66a275d2e0 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 10 Jun 2024 22:53:28 +0000 Subject: [PATCH 40/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.2.2 → v3.2.3](https://github.com/pycqa/pylint/compare/v3.2.2...v3.2.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1005971..99c2a68 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.2 + rev: v3.2.3 hooks: - id: pylint name: lint (examples) From b67f5ce684facf7445d369d6715044003485b410 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 00:52:49 +0000 Subject: [PATCH 41/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.2.3 → v3.2.4](https://github.com/pycqa/pylint/compare/v3.2.3...v3.2.4) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 99c2a68..90f773b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.3 + rev: v3.2.4 hooks: - id: pylint name: lint (examples) From c2dc55c7580bca73fcf00dee7cb060c008f1f825 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Jul 2024 22:22:06 +0000 Subject: [PATCH 42/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v3.1.0a1 → v4.0.3](https://github.com/fsfe/reuse-tool/compare/v3.1.0a1...v4.0.3) - [github.com/pycqa/pylint: v3.2.4 → v3.2.5](https://github.com/pycqa/pylint/compare/v3.2.4...v3.2.5) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 90f773b..5fe3293 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v3.1.0a1 + rev: v4.0.3 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.4 + rev: v3.2.5 hooks: - id: pylint name: lint (examples) From 7a3ad56b0acacf8befaa064fefc622715d83565f Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 22 Jul 2024 22:57:17 +0000 Subject: [PATCH 43/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.2.5 → v3.2.6](https://github.com/pycqa/pylint/compare/v3.2.5...v3.2.6) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5fe3293..375f16c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.5 + rev: v3.2.6 hooks: - id: pylint name: lint (examples) From 7fa07ab555b1599b10f3fe2c6156664048d3b80c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Aug 2024 23:38:32 +0000 Subject: [PATCH 44/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.4.2 → 24.8.0](https://github.com/psf/black/compare/24.4.2...24.8.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 375f16c..2aeb8b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 24.4.2 + rev: 24.8.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool From 93fccb242d0da03b6b1df44a3d1b9128e6d1a66e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 2 Sep 2024 22:47:18 +0000 Subject: [PATCH 45/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.2.6 → v3.2.7](https://github.com/pycqa/pylint/compare/v3.2.6...v3.2.7) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2aeb8b7..f7f29f1 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.6 + rev: v3.2.7 hooks: - id: pylint name: lint (examples) From 77b3687867324b75d7bfbfdf27d42580c1ccd2cd Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 23:08:04 +0000 Subject: [PATCH 46/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.2.7 → v3.3.0](https://github.com/pycqa/pylint/compare/v3.2.7...v3.3.0) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f7f29f1..258a909 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.2.7 + rev: v3.3.0 hooks: - id: pylint name: lint (examples) From b25a006a4befbb8f9cdf8f8846850b35b03fce33 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 23 Sep 2024 20:50:06 -0500 Subject: [PATCH 47/60] Fix new diagnostics from new pylint --- .pre-commit-config.yaml | 2 +- examples/udecimal_moneyfmt.py | 4 +++- jepler_udecimal/__init__.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 258a909..b4a2f7a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,7 +25,7 @@ repos: types: [python] files: ^examples/ args: - - --disable=missing-docstring,invalid-name,bad-whitespace + - --disable=missing-docstring,invalid-name - id: pylint name: lint (code) types: [python] diff --git a/examples/udecimal_moneyfmt.py b/examples/udecimal_moneyfmt.py index d4eb10f..7ce8559 100644 --- a/examples/udecimal_moneyfmt.py +++ b/examples/udecimal_moneyfmt.py @@ -8,7 +8,9 @@ from jepler_udecimal import Decimal -def moneyfmt(value, places=2, curr="", sep=",", dp=".", pos="", neg="-", trailneg=""): +def moneyfmt( + value, *, places=2, curr="", sep=",", dp=".", pos="", neg="-", trailneg="" +): """Convert Decimal to a money formatted string. places: required number of places after the decimal point diff --git a/jepler_udecimal/__init__.py b/jepler_udecimal/__init__.py index 61841d4..84e5bcf 100644 --- a/jepler_udecimal/__init__.py +++ b/jepler_udecimal/__init__.py @@ -3357,7 +3357,7 @@ class Context(object): :param bool clamp: If true, change exponents if too high """ - def __init__( + def __init__( # pylint: disable=too-many-positional-arguments self, prec=None, rounding=None, From c81ed883c55659bf47d09d4b45f9bd5f89c37e0e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 8 Oct 2024 01:06:51 +0000 Subject: [PATCH 48/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.8.0 → 24.10.0](https://github.com/psf/black/compare/24.8.0...24.10.0) - [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.6.0...v5.0.0) - [github.com/pycqa/pylint: v3.3.0 → v3.3.1](https://github.com/pycqa/pylint/compare/v3.3.0...v3.3.1) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b4a2f7a..9938cfd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 24.10.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -12,13 +12,13 @@ repos: hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v5.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.3.0 + rev: v3.3.1 hooks: - id: pylint name: lint (examples) From 9327605e80a9f80183c55db4498a629de882f32b Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 23:31:35 +0000 Subject: [PATCH 49/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v4.0.3 → v5.0.2](https://github.com/fsfe/reuse-tool/compare/v4.0.3...v5.0.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9938cfd..ef9fdb2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v4.0.3 + rev: v5.0.2 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks From db8b44f9348623fcf3e3ee332bfc9989b31f8eaa Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 18 Nov 2024 18:55:00 -0600 Subject: [PATCH 50/60] remove deprecated theme setting --- docs/conf.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c77900d..24510c2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -109,18 +109,6 @@ # on_rtd = os.environ.get("READTHEDOCS", None) == "True" -if not on_rtd: # only import and set the theme if we're building docs locally - try: - import sphinx_rtd_theme - - html_theme = "sphinx_rtd_theme" - html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), "."] - except: - html_theme = "default" - html_theme_path = ["."] -else: - html_theme_path = ["."] - # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". From 80c8c8d65ed4bb6ee8e6ee81094c4af698862ae2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 3 Dec 2024 00:02:46 +0000 Subject: [PATCH 51/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.3.1 → v3.3.2](https://github.com/pycqa/pylint/compare/v3.3.1...v3.3.2) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ef9fdb2..c4f6513 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.3.1 + rev: v3.3.2 hooks: - id: pylint name: lint (examples) From 753837f65b98589c75c461b537beb35adf96224e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 30 Dec 2024 22:40:15 +0000 Subject: [PATCH 52/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/pycqa/pylint: v3.3.2 → v3.3.3](https://github.com/pycqa/pylint/compare/v3.3.2...v3.3.3) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c4f6513..3788d6d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.3.2 + rev: v3.3.3 hooks: - id: pylint name: lint (examples) From b73c3456d24c8217ed8022d1d063154f1229f446 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 00:34:26 +0000 Subject: [PATCH 53/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/psf/black: 24.10.0 → 25.1.0](https://github.com/psf/black/compare/24.10.0...25.1.0) - [github.com/pycqa/pylint: v3.3.3 → v3.3.4](https://github.com/pycqa/pylint/compare/v3.3.3...v3.3.4) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3788d6d..db7cade 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/psf/black - rev: 24.10.0 + rev: 25.1.0 hooks: - id: black - repo: https://github.com/fsfe/reuse-tool @@ -18,7 +18,7 @@ repos: - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.3.3 + rev: v3.3.4 hooks: - id: pylint name: lint (examples) From e469cb8334ce3047cdf216666b44a0024d671543 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 21:13:16 +0000 Subject: [PATCH 54/60] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/fsfe/reuse-tool: v5.0.2 → v5.1.1](https://github.com/fsfe/reuse-tool/compare/v5.0.2...v5.1.1) - [github.com/pre-commit/pre-commit-hooks: v5.0.0 → v6.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v5.0.0...v6.0.0) - [github.com/pycqa/pylint: v3.3.4 → v3.3.8](https://github.com/pycqa/pylint/compare/v3.3.4...v3.3.8) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db7cade..a99a1f2 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,17 +8,17 @@ repos: hooks: - id: black - repo: https://github.com/fsfe/reuse-tool - rev: v5.0.2 + rev: v5.1.1 hooks: - id: reuse - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v5.0.0 + rev: v6.0.0 hooks: - id: check-yaml - id: end-of-file-fixer - id: trailing-whitespace - repo: https://github.com/pycqa/pylint - rev: v3.3.4 + rev: v3.3.8 hooks: - id: pylint name: lint (examples) From 252c0af2531280356e10a575ca5b513733c9d92d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 10:32:59 -0500 Subject: [PATCH 55/60] docs: Always use sphinx_rtd_theme --- docs/conf.py | 3 ++- docs/requirements.txt | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 24510c2..b7c4b6f 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -19,6 +19,7 @@ "sphinx.ext.intersphinx", "sphinx.ext.napoleon", "sphinx.ext.todo", + "sphinx_rtd_theme", ] autoapi_keep_files = True @@ -107,7 +108,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -on_rtd = os.environ.get("READTHEDOCS", None) == "True" +html_theme = "sphinx_rtd_theme" # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/requirements.txt b/docs/requirements.txt index 8912f83..b187142 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -4,3 +4,4 @@ sphinx>=4.0.0 sphinx-autoapi +sphinx-rtd-theme From f45947df84b583766dd6614ac9c3f569e395a4eb Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 10:49:57 -0500 Subject: [PATCH 56/60] README: document the incorrect pypi URL --- README.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9bd113f..288b456 100644 --- a/README.rst +++ b/README.rst @@ -23,9 +23,15 @@ Introduction Reduced version of the decimal library for CircuitPython +Important Note +============== +From version 1.0.9 through 1.0.12, this package was incorrectly published on pypi under the name +`circuitpython-jepler-udecimal `_. +The correct package name is +`jepler-circuitpython-udecimal `_. Dependencies -============= +============ This library depends on: * `Adafruit CircuitPython `_ From 1d08c653f692d11a9a35e29cfcd06b43db5d5150 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 10:50:11 -0500 Subject: [PATCH 57/60] build: Revamp it's been broken since the switch to pyproject. --- build.sh | 64 +++++++++++++++++++++++++++------------ optional_requirements.txt | 1 + 2 files changed, 46 insertions(+), 19 deletions(-) diff --git a/build.sh b/build.sh index a314d47..00dc322 100755 --- a/build.sh +++ b/build.sh @@ -1,54 +1,80 @@ #!/bin/bash set -eo pipefail +in_section=false +if [ "${CI}" -eq "true" ]; then + start_section () { + if $in_section; then end_section; fi + echo "::group::$*" + export in_section=true + } + end_section () { + echo "::endgroup::$*" + in_section=false + } +else + start_section () { + if $in_section; then end_section; fi + echo "=== $*" + export in_section=true + } + end_section () { + echo + in_section=false + } +fi + repo_name=`git config remote.origin.url | sed -e 's,^.*/,,;s/\.git$//' | tr A-Z_ a-z-` -echo "=== Building package: $repo_name" +echo "*** Building package: $repo_name" -echo "=== Create and set up virtual environment" +start_section "Create and set up virtual environment" [ -d .venv ] || python3 -m venv .env . .env/bin/activate -echo "=== Install requirements" +start_section "Install requirements" pip3 install wheel -pip3 install -r requirements_dev.txt -echo "=== Run pre-commit" +pip3 install -r optional_requirements.txt +start_section "Run pre-commit" pre-commit run --all-files -echo "=== Clone and build circuitpython unix port" +start_section "Clone and build circuitpython unix port" [ -e circuitpython/py/py.mk ] || git clone --shallow-since=2021-07-01 https://github.com/adafruit/circuitpython [ -e circuitpython/lib/libffi/autogen.sh ] || (cd circuitpython && git submodule update --init lib/libffi lib/axtls lib/berkeley-db-1.xx tools/huffman lib/uzlib extmod/ulab) [ -x circuitpython/ports/unix/micropython ] || ( make -C circuitpython/mpy-cross -j$(nproc) -make -C circuitpython/ports/unix -j$(nproc) deplibs +make -C circuitpython/ports/unix -j$(nproc) deplibs submodules make -C circuitpython/ports/unix -j$(nproc) DEBUG=1 STRIP=: ) -echo "=== Run tests" +start_section "Run tests" python -m jepler_udecimal.test -run-tests () { - env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests.py "$@" +run_tests () { + env MICROPYPATH="`readlink -f .`" PYTHONPATH="`readlink -f .`" MICROPY_MICROPYTHON=circuitpython/ports/unix/build-standard/micropython circuitpython/tests/run-tests.py --keep-path "$@" } -run-tests --clean-failures -if ! run-tests -d examples; then - run-tests --print-failures +run_tests --clean-failures +if ! run_tests -d examples; then + run_tests --print-failures exit 1 fi PYTHONPATH=. python examples/test_udecimal.py > test_udecimal.exp -echo "=== Build CircuitPython bundle" +start_section "Build CircuitPython bundle" circuitpython-build-bundles --package_folder_prefix jepler --filename_prefix $repo_name --library_location . -echo "=== Build docs" +start_section "Build docs" rm -rf docs/_build (cd docs && sphinx-build -E -W -b html . _build/html) -echo "=== Build pypi files" -python setup.py sdist -python setup.py bdist_wheel --universal +start_section "Build pypi files" +python -m build -echo "=== Check pypi files" +start_section "Check pypi files" twine check dist/* +end_section + +echo "=== Success" + # SPDX-FileCopyrightText: Copyright (c) 2020 jepler for Unpythonic Networks # # SPDX-License-Identifier: MIT diff --git a/optional_requirements.txt b/optional_requirements.txt index 7913ee8..6000f3f 100644 --- a/optional_requirements.txt +++ b/optional_requirements.txt @@ -2,6 +2,7 @@ # SPDX-FileCopyrightText: Copyright (c) 2020 jepler for Unpythonic Networks # # SPDX-License-Identifier: MIT +build pre-commit recommonmark==0.6.0 sphinx From e5a3a6e5dae83169e9af247753686b4c4dd642e0 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 10:54:17 -0500 Subject: [PATCH 58/60] rtd churn --- .readthedocs.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 33c2a61..2b59355 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -13,6 +13,9 @@ build: tools: python: "3" +sphinx: + configuration: docs/conf.py + python: install: - requirements: docs/requirements.txt From 774acdf5574cd7d7c6f031fcef76152b7c7e1a5c Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 11:01:23 -0500 Subject: [PATCH 59/60] pyproject: correct package name, use dynamic versioning --- pyproject.toml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f0d30e6..447f080 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,16 +6,15 @@ requires = [ "setuptools", "wheel", - "setuptools-scm", + "setuptools_scm[toml]>=6.0", ] [project] -name = "circuitpython-jepler-udecimal" +name = "jepler-circuitpython-udecimal" description = "Reduced version of the decimal library for CircuitPython" -version = "0.0.0+auto.0" readme = "README.rst" authors = [ - {name = "Jeff Epler", email = "jepler@gmail.com"} + {name = "Jeff Epler", email = "jepler@unpythonic.net"} ] urls = { Source = "https://github.com/jepler/Jepler_CircuitPython_udecimal", Documentation = "https://jepler-udecimal.readthedocs.io/en/latest/api/jepler_udecimal/index.html", Tracker = "https://github.com/jepler/Jepler_CircuitPython_udecimal/issues" } # "Pull Requests" = "https://github.com/jepler/Jepler_CircuitPython_udecimal/pulls", @@ -40,7 +39,7 @@ classifiers = [ "License :: OSI Approved :: Python Software Foundation License", "Programming Language :: Python :: 3", ] -dynamic = ["dependencies", "optional-dependencies"] +dynamic = ["version", "dependencies", "optional-dependencies"] [tool.setuptools] From 8793f7560b1f0cc2736d92308656a4da1e06ba78 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 11 Sep 2025 11:02:53 -0500 Subject: [PATCH 60/60] pyproject: Remove deprecated elements --- pyproject.toml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 447f080..674646d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,14 +29,12 @@ keywords = [ "arbitraryprecision", "math", ] -license = {text = "MIT"} +license = "MIT" classifiers = [ "Intended Audience :: Developers", "Topic :: Software Development :: Libraries", "Topic :: Software Development :: Embedded Systems", "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "License :: OSI Approved :: Python Software Foundation License", "Programming Language :: Python :: 3", ] dynamic = ["version", "dependencies", "optional-dependencies"]