Compare commits
No commits in common. "main" and "readthedocs-v2" have entirely different histories.
main
...
readthedoc
8 changed files with 88 additions and 57 deletions
4
.github/workflows/release_pypi.yml
vendored
4
.github/workflows/release_pypi.yml
vendored
|
|
@ -15,5 +15,5 @@ jobs:
|
|||
- name: Run PyPI Release CI workflow
|
||||
uses: adafruit/workflows-circuitpython-libs/release-pypi@main
|
||||
with:
|
||||
pypi-username: __token__
|
||||
pypi-password: ${{ secrets.pypi_token }}
|
||||
pypi-username: ${{ secrets.pypi_username }}
|
||||
pypi-password: ${{ secrets.pypi_password }}
|
||||
|
|
|
|||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -20,4 +20,3 @@ docs/api
|
|||
circuitpython
|
||||
/*.exp
|
||||
/*.out
|
||||
*/__version__.py
|
||||
|
|
|
|||
|
|
@ -4,28 +4,28 @@
|
|||
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 25.1.0
|
||||
rev: 23.1.0
|
||||
hooks:
|
||||
- id: black
|
||||
- repo: https://github.com/fsfe/reuse-tool
|
||||
rev: v5.0.2
|
||||
rev: v1.1.2
|
||||
hooks:
|
||||
- id: reuse
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v5.0.0
|
||||
rev: v4.4.0
|
||||
hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
- id: trailing-whitespace
|
||||
- repo: https://github.com/pycqa/pylint
|
||||
rev: v3.3.4
|
||||
rev: v2.17.1
|
||||
hooks:
|
||||
- id: pylint
|
||||
name: lint (examples)
|
||||
types: [python]
|
||||
files: ^examples/
|
||||
args:
|
||||
- --disable=missing-docstring,invalid-name
|
||||
- --disable=missing-docstring,invalid-name,bad-whitespace
|
||||
- id: pylint
|
||||
name: lint (code)
|
||||
types: [python]
|
||||
|
|
|
|||
12
docs/conf.py
12
docs/conf.py
|
|
@ -109,6 +109,18 @@ napoleon_numpy_docstring = False
|
|||
#
|
||||
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".
|
||||
|
|
|
|||
|
|
@ -8,9 +8,7 @@
|
|||
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
|
||||
|
|
|
|||
|
|
@ -3357,7 +3357,7 @@ class Context(object):
|
|||
:param bool clamp: If true, change exponents if too high
|
||||
"""
|
||||
|
||||
def __init__( # pylint: disable=too-many-positional-arguments
|
||||
def __init__(
|
||||
self,
|
||||
prec=None,
|
||||
rounding=None,
|
||||
|
|
|
|||
|
|
@ -2,48 +2,5 @@
|
|||
#
|
||||
# SPDX-License-Identifier: Unlicense
|
||||
|
||||
[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"
|
||||
[tool.black]
|
||||
target-version = ['py35']
|
||||
|
|
|
|||
65
setup.py
Normal file
65
setup.py
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
# 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"],
|
||||
)
|
||||
Loading…
Reference in a new issue