Compare commits

...

57 commits

Author SHA1 Message Date
5c9f657bdc
Merge pull request #61 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2025-02-14 08:11:18 -06:00
pre-commit-ci[bot]
b73c3456d2
[pre-commit.ci] pre-commit autoupdate
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)
2025-02-04 00:34:26 +00:00
33ebbfac4f
Merge pull request #60 from jepler/pre-commit-ci-update-config 2024-12-30 16:51:12 -06:00
pre-commit-ci[bot]
753837f65b
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.3.2 → v3.3.3](https://github.com/pycqa/pylint/compare/v3.3.2...v3.3.3)
2024-12-30 22:40:15 +00:00
86826f5bd4
Merge pull request #59 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-12-04 16:52:17 -06:00
pre-commit-ci[bot]
80c8c8d65e
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.3.1 → v3.3.2](https://github.com/pycqa/pylint/compare/v3.3.1...v3.3.2)
2024-12-03 00:02:46 +00:00
d554ce52e0
Merge pull request #57 from jepler/pre-commit-ci-update-config 2024-11-18 19:04:38 -06:00
7e87ecccbd
Merge branch 'main' into pre-commit-ci-update-config 2024-11-18 18:58:52 -06:00
aa7cdefe9a
Merge pull request #58 from jepler/fix-deprecated-theme 2024-11-18 18:58:43 -06:00
db8b44f934 remove deprecated theme setting 2024-11-18 18:55:24 -06:00
pre-commit-ci[bot]
9327605e80
[pre-commit.ci] pre-commit autoupdate
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)
2024-11-18 23:31:35 +00:00
9cd33dda57
Merge pull request #56 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-10-08 06:33:15 -05:00
pre-commit-ci[bot]
c81ed883c5
[pre-commit.ci] pre-commit autoupdate
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)
2024-10-08 01:06:51 +00:00
d84a97b2e2
Merge pull request #55 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-09-23 21:03:18 -05:00
b25a006a4b Fix new diagnostics from new pylint 2024-09-23 20:50:06 -05:00
pre-commit-ci[bot]
77b3687867
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.2.7 → v3.3.0](https://github.com/pycqa/pylint/compare/v3.2.7...v3.3.0)
2024-09-23 23:08:04 +00:00
691b96d72d
Merge pull request #54 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-09-03 07:47:51 -05:00
pre-commit-ci[bot]
93fccb242d
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.2.6 → v3.2.7](https://github.com/pycqa/pylint/compare/v3.2.6...v3.2.7)
2024-09-02 22:47:18 +00:00
2656301150
Merge pull request #53 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-08-10 17:17:32 +03:00
pre-commit-ci[bot]
7fa07ab555
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 24.4.2 → 24.8.0](https://github.com/psf/black/compare/24.4.2...24.8.0)
2024-08-05 23:38:32 +00:00
475519c0e7
Merge pull request #52 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-07-23 07:07:12 -05:00
pre-commit-ci[bot]
7a3ad56b0a
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.2.5 → v3.2.6](https://github.com/pycqa/pylint/compare/v3.2.5...v3.2.6)
2024-07-22 22:57:17 +00:00
a106856fb6
Merge pull request #51 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-07-09 21:18:58 -05:00
pre-commit-ci[bot]
c2dc55c758
[pre-commit.ci] pre-commit autoupdate
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)
2024-07-08 22:22:06 +00:00
75976b3f41
Merge pull request #50 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-07-03 21:01:02 -05:00
pre-commit-ci[bot]
b67f5ce684
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.2.3 → v3.2.4](https://github.com/pycqa/pylint/compare/v3.2.3...v3.2.4)
2024-07-02 00:52:49 +00:00
90e5cb95ac
Merge pull request #49 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-06-14 07:00:32 -05:00
pre-commit-ci[bot]
174acc986f
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.2.2 → v3.2.3](https://github.com/pycqa/pylint/compare/v3.2.2...v3.2.3)
2024-06-10 22:53:28 +00:00
98a343a738
Merge pull request #48 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-06-03 19:54:35 -05:00
pre-commit-ci[bot]
e10d32198a
[pre-commit.ci] pre-commit autoupdate
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)
2024-06-03 22:38:14 +00:00
f3e0bc8266
Merge pull request #47 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-05-21 06:32:08 -04:00
pre-commit-ci[bot]
f2a7ca44fa
[pre-commit.ci] pre-commit autoupdate
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)
2024-05-20 21:53:04 +00:00
53c53a07b5
Merge pull request #46 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-04-09 14:04:25 -05:00
pre-commit-ci[bot]
6589925608
[pre-commit.ci] pre-commit autoupdate
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)
2024-04-08 23:02:40 +00:00
a8639df435
Merge pull request #45 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2024-03-18 19:16:09 -05:00
pre-commit-ci[bot]
90fcda462f
[pre-commit.ci] pre-commit autoupdate
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)
2024-03-18 22:38:05 +00:00
e73e936673
Merge pull request #44 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-12-27 18:57:21 -06:00
pre-commit-ci[bot]
4b81cde84d
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.12.0 → 23.12.1](https://github.com/psf/black/compare/23.12.0...23.12.1)
2023-12-25 21:06:56 +00:00
56bc42853d
Merge pull request #43 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-12-18 19:17:04 -06:00
pre-commit-ci[bot]
3b011fa041
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.11.0 → 23.12.0](https://github.com/psf/black/compare/23.11.0...23.12.0)
2023-12-18 21:25:50 +00:00
e689e52f08
Merge pull request #42 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-12-11 15:46:15 -06:00
pre-commit-ci[bot]
c03f786252
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v3.0.1 → v3.0.3](https://github.com/pycqa/pylint/compare/v3.0.1...v3.0.3)
2023-12-11 21:16:58 +00:00
d0f8df59ad
Merge pull request #41 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-11-13 15:59:20 -06:00
pre-commit-ci[bot]
9de3ef9172
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.10.1 → 23.11.0](https://github.com/psf/black/compare/23.10.1...23.11.0)
2023-11-13 21:23:50 +00:00
e6dab099fb
Merge pull request #40 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-10-24 08:58:38 +02:00
pre-commit-ci[bot]
c7e572e464
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 23.9.1 → 23.10.1](https://github.com/psf/black/compare/23.9.1...23.10.1)
2023-10-23 21:15:20 +00:00
0b005af416
Merge pull request #39 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-10-10 07:48:51 +01:00
pre-commit-ci[bot]
68933efc83
[pre-commit.ci] pre-commit autoupdate
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)
2023-10-09 21:22:41 +00:00
3e885cb96c
Merge pull request #37 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-10-03 10:42:31 -05:00
58389b892c
switch to pyproject.toml packaging, thank you 2023-10-03 10:38:59 -05:00
85a0e594f6
fix toml syntax 2023-10-03 09:47:45 -05:00
ad4b93e430
try listing the package name here 2023-10-03 09:44:05 -05:00
0457a674fb
add empty tool.setuptools block for check_lib_packaging 2023-10-03 09:40:48 -05:00
pre-commit-ci[bot]
83930339ca
[pre-commit.ci] pre-commit autoupdate
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)
2023-10-03 12:24:55 +00:00
b9b484290f
pre-commit: update 2023-07-25 07:46:16 -05:00
31d1a59850
tweak secrets in release process 2023-06-14 16:17:36 -05:00
39bdd7394d
Merge pull request #38 from jepler/readthedocs-v2
Add "v2" readthedocs setup & modernize CI
2023-06-14 15:59:16 -05:00
8 changed files with 57 additions and 88 deletions

View file

@ -15,5 +15,5 @@ jobs:
- name: Run PyPI Release CI workflow - name: Run PyPI Release CI workflow
uses: adafruit/workflows-circuitpython-libs/release-pypi@main uses: adafruit/workflows-circuitpython-libs/release-pypi@main
with: with:
pypi-username: ${{ secrets.pypi_username }} pypi-username: __token__
pypi-password: ${{ secrets.pypi_password }} pypi-password: ${{ secrets.pypi_token }}

1
.gitignore vendored
View file

@ -20,3 +20,4 @@ docs/api
circuitpython circuitpython
/*.exp /*.exp
/*.out /*.out
*/__version__.py

View file

@ -4,28 +4,28 @@
repos: repos:
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 23.1.0 rev: 25.1.0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/fsfe/reuse-tool - repo: https://github.com/fsfe/reuse-tool
rev: v1.1.2 rev: v5.0.2
hooks: hooks:
- id: reuse - id: reuse
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0 rev: v5.0.0
hooks: hooks:
- id: check-yaml - id: check-yaml
- id: end-of-file-fixer - id: end-of-file-fixer
- id: trailing-whitespace - id: trailing-whitespace
- repo: https://github.com/pycqa/pylint - repo: https://github.com/pycqa/pylint
rev: v2.17.1 rev: v3.3.4
hooks: hooks:
- id: pylint - id: pylint
name: lint (examples) name: lint (examples)
types: [python] types: [python]
files: ^examples/ files: ^examples/
args: args:
- --disable=missing-docstring,invalid-name,bad-whitespace - --disable=missing-docstring,invalid-name
- id: pylint - id: pylint
name: lint (code) name: lint (code)
types: [python] types: [python]

View file

@ -109,18 +109,6 @@ napoleon_numpy_docstring = False
# #
on_rtd = os.environ.get("READTHEDOCS", None) == "True" 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, # 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, # relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css". # so a file named "default.css" will overwrite the builtin "default.css".

View file

@ -8,7 +8,9 @@
from jepler_udecimal import Decimal 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. """Convert Decimal to a money formatted string.
places: required number of places after the decimal point places: required number of places after the decimal point

View file

@ -3357,7 +3357,7 @@ class Context(object):
:param bool clamp: If true, change exponents if too high :param bool clamp: If true, change exponents if too high
""" """
def __init__( def __init__( # pylint: disable=too-many-positional-arguments
self, self,
prec=None, prec=None,
rounding=None, rounding=None,

View file

@ -2,5 +2,48 @@
# #
# SPDX-License-Identifier: Unlicense # SPDX-License-Identifier: Unlicense
[tool.black] [build-system]
target-version = ['py35'] 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"

View file

@ -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"],
)