Compare commits

..

121 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
63f2c9861a
bring workflows up to date 2023-06-14 11:06:50 -05:00
f5df740fb9
Add "v2" readthedocs setup 2023-06-14 11:06:50 -05:00
e1fe886660
Merge pull request #36 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-03-28 06:51:45 -05:00
pre-commit-ci[bot]
df98f477fa
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.17.0 → v2.17.1](https://github.com/pycqa/pylint/compare/v2.17.0...v2.17.1)
2023-03-28 03:57:03 +00:00
61ccd58bb0
Merge pull request #35 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-03-14 11:08:19 -05:00
pre-commit-ci[bot]
41712b4d84
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.16.4 → v2.17.0](https://github.com/pycqa/pylint/compare/v2.16.4...v2.17.0)
2023-03-14 05:10:47 +00:00
ad4d1d6b90
Merge pull request #34 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-03-07 10:19:33 -06:00
pre-commit-ci[bot]
b97ccb2192
[pre-commit.ci] pre-commit autoupdate
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)
2023-03-07 04:44:13 +00:00
23ea9472a4
Merge pull request #32 from jepler/use-buildsh
Use build.sh
2023-01-17 10:15:47 -06:00
181a581db1
Use build.sh 2023-01-17 10:06:15 -06:00
273513a77f
Merge pull request #31 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-01-17 08:03:55 -06:00
9c7e203e90
Fix after pylint update 2023-01-17 07:51:58 -06:00
pre-commit-ci[bot]
28a7edf0cc
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.10 → v2.16.0b0](https://github.com/pycqa/pylint/compare/v2.15.10...v2.16.0b0)
2023-01-17 03:18:26 +00:00
0bbd62bc69
Merge pull request #30 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2023-01-10 21:32:23 -06:00
pre-commit-ci[bot]
45425f3e28
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.9 → v2.15.10](https://github.com/pycqa/pylint/compare/v2.15.9...v2.15.10)
2023-01-10 02:24:24 +00:00
32bc4108ff
Merge pull request #29 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-12-20 09:57:00 -06:00
pre-commit-ci[bot]
0e2e15529b
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.8 → v2.15.9](https://github.com/pycqa/pylint/compare/v2.15.8...v2.15.9)
2022-12-20 02:11:03 +00:00
59c88b7ce5
Merge pull request #28 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-12-12 21:17:30 -06:00
pre-commit-ci[bot]
efa6a36fd9
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.10.0 → 22.12.0](https://github.com/psf/black/compare/22.10.0...22.12.0)
2022-12-13 02:10:27 +00:00
be9017615f
Merge pull request #27 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-12-05 21:48:21 -06:00
pre-commit-ci[bot]
9af60d9411
[pre-commit.ci] pre-commit autoupdate
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)
2022-12-06 01:12:54 +00:00
d46c6bc407
Merge pull request #26 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-11-28 20:45:55 -06:00
pre-commit-ci[bot]
a6d4983318
[pre-commit.ci] pre-commit autoupdate
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)
2022-11-29 02:41:22 +00:00
294906d787
Merge pull request #25 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-11-21 18:31:32 -06:00
pre-commit-ci[bot]
32856d6513
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.5 → v2.15.6](https://github.com/pycqa/pylint/compare/v2.15.5...v2.15.6)
2022-11-22 00:17:34 +00:00
722b34fc89
Merge pull request #24 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-10-24 20:19:49 -05:00
pre-commit-ci[bot]
97e49129e9
[pre-commit.ci] pre-commit autoupdate
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)
2022-10-24 23:51:23 +00:00
7b8f3a7991
Merge pull request #22 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-09-19 20:53:56 -04:00
48d050855b
Merge remote-tracking branch 'origin/main' into pre-commit-ci-update-config 2022-09-19 19:40:49 -05:00
b4430740a8
Merge pull request #23 from jepler/fix-ci-tags
Fix ci by fetching tags
2022-09-19 20:37:19 -04:00
9d768243f5
fetch tags before building circuitpython 2022-09-19 19:10:59 -05:00
pre-commit-ci[bot]
04885e60ad
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.2 → v2.15.3](https://github.com/pycqa/pylint/compare/v2.15.2...v2.15.3)
2022-09-20 00:02:42 +00:00
a703a6c702
Merge pull request #21 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-09-13 10:54:38 -04:00
pre-commit-ci[bot]
4837d7d21b
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.15.0 → v2.15.2](https://github.com/pycqa/pylint/compare/v2.15.0...v2.15.2)
2022-09-12 22:57:24 +00:00
0accf285a7
Merge pull request #20 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-09-05 20:09:10 -05:00
pre-commit-ci[bot]
b7d502e829
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/psf/black: 22.6.0 → 22.8.0](https://github.com/psf/black/compare/22.6.0...22.8.0)
2022-09-06 00:15:23 +00:00
964c9201fd
Merge pull request #19 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-08-29 18:23:35 -05:00
pre-commit-ci[bot]
e2a5906d6d
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.14.5 → v2.15.0](https://github.com/pycqa/pylint/compare/v2.14.5...v2.15.0)
2022-08-29 22:45:37 +00:00
77948e62ac
Merge pull request #18 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-07-18 18:04:14 -05:00
pre-commit-ci[bot]
9264cb70a8
[pre-commit.ci] pre-commit autoupdate
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)
2022-07-18 21:44:27 +00:00
d55a501da2
Merge pull request #17 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-06-21 07:26:04 +02:00
pre-commit-ci[bot]
b17ae8cf2f
[pre-commit.ci] pre-commit autoupdate
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)
2022-06-20 21:38:20 +00:00
aab1061615
what if pretty 2022-06-08 12:33:47 +02:00
6096ad7f98
what if stringify? 2022-06-08 12:32:09 +02:00
d120984a7d
print context with github-script 2022-06-08 12:18:36 +02:00
13c998b645
Merge pull request #16 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-06-08 11:55:21 +02:00
838dcf4087
update for new doxygen 2022-06-08 11:49:55 +02:00
0880ff7242
update pylint disables for upgraded version 2022-06-07 07:26:55 +02:00
pre-commit-ci[bot]
23302134ca
[pre-commit.ci] pre-commit autoupdate
updates:
- [github.com/pycqa/pylint: v2.13.9 → v2.14.1](https://github.com/pycqa/pylint/compare/v2.13.9...v2.14.1)
2022-06-06 21:17:02 +00:00
0e256c3c80
Merge pull request #14 from jepler/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2022-05-24 21:53:34 +02:00
9a1e49ba08
Merge remote-tracking branch 'origin/main' into pre-commit-ci-update-config 2022-05-24 21:47:13 +02:00
05669f54f5
update pylint to latest stable (not a beta) 2022-05-24 21:45:47 +02:00
6007a78601
Merge pull request #13 from jepler/pre-commit-mypy
Run mypy during pre-commit
2022-05-24 17:52:59 +02:00
pre-commit-ci[bot]
254a24a753
[pre-commit.ci] pre-commit autoupdate
updates:
- https://github.com/python/blackhttps://github.com/psf/black
- [github.com/fsfe/reuse-tool: v0.12.1 → v1.0.0](https://github.com/fsfe/reuse-tool/compare/v0.12.1...v1.0.0)
- [github.com/pre-commit/pre-commit-hooks: v2.3.0 → v4.2.0](https://github.com/pre-commit/pre-commit-hooks/compare/v2.3.0...v4.2.0)
- [github.com/pycqa/pylint: v2.12.2 → v2.14.0-b1](https://github.com/pycqa/pylint/compare/v2.12.2...v2.14.0-b1)
2022-05-23 21:05:01 +00:00
22a4a749b1
bump black version 2022-05-13 09:39:18 -05:00
0e1f74a755
Run mypy during pre-commit 2022-05-13 09:23:45 -05:00
97d2d90aea
Merge pull request #12 from jepler/pre-commit.ci
Pre commit.ci
2022-05-12 10:30:54 -05:00
Jeff Epler
3421ff43b4 bump black version 2022-05-12 10:19:45 -05:00
Jeff Epler
7d8c0f5524 try pre-commit.ci 2022-05-12 10:17:13 -05:00
Jeff Epler
c3382a04db Add pull request template 2022-05-12 10:17:13 -05:00
3d18e3594d
Merge pull request #11 from jepler/update-black-ci-etc
Upgrade pylint, black
2022-02-16 09:18:09 -06:00
7f0d4370b5
Upgrade pylint, black 2022-02-16 08:44:48 -06:00
2aeae70edf
Merge pull request #10 from jepler/update-black-ci-etc
Update pre-commit & build
2022-02-15 16:46:19 -06:00
098dab7723
Update pre-commit & build
the CI is a bit closer to a cookie-cut ci, but still its own uniqueness.
2022-02-15 16:24:11 -06:00
19 changed files with 236 additions and 413 deletions

View file

@ -8,84 +8,9 @@ on: [pull_request, push]
jobs: jobs:
test: test:
runs-on: ubuntu-20.04 runs-on: ubuntu-latest
steps: steps:
- name: Dump GitHub context - name: Run Build CI workflow
env: uses: adafruit/workflows-circuitpython-libs/build@main
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: with:
python-version: 3.7 package-prefix: jepler_udecimal
- 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: Pip install Sphinx
run: |
pip install --force-reinstall Sphinx sphinx-rtd-theme sphinx-autoapi
- name: Library version
run: git describe --dirty --always --tags
- 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/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
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
- 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/*

19
.github/workflows/failure-help-text.yml vendored Normal file
View file

@ -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

View file

@ -1,21 +0,0 @@
# SPDX-FileCopyrightText: Copyright (c) 2019 Anthony Sottile
#
# SPDX-License-Identifier: MIT
name: pre-commit
on: [pull_request, push]
jobs:
pre-commit:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
- name: set PY
run: echo >>$GITHUB_ENV "PY=$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- uses: actions/cache@v1
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v1.1.0

View file

@ -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/*

20
.github/workflows/release_gh.yml vendored Normal file
View file

@ -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

19
.github/workflows/release_pypi.yml vendored Normal file
View file

@ -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: __token__
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

@ -3,38 +3,44 @@
# SPDX-License-Identifier: Unlicense # SPDX-License-Identifier: Unlicense
repos: repos:
- repo: https://github.com/python/black - repo: https://github.com/psf/black
rev: 20.8b1 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: v0.12.1 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: v2.3.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: pylint-2.7.1 rev: v3.3.4
hooks: hooks:
- id: pylint - id: pylint
name: pylint (library code) name: lint (examples)
types: [python] types: [python]
exclude: "^(docs/|examples/|tests/|setup.py$)" files: ^examples/
- repo: local args:
hooks: - --disable=missing-docstring,invalid-name
- id: pylint_examples - id: pylint
name: pylint (examples code) name: lint (code)
description: Run pylint rules on "examples/*.py" files types: [python]
entry: /usr/bin/env bash -c exclude: "^(docs/|examples/|setup.py$)"
args: ['([[ ! -d "examples" ]] || for example in $(find . -path "./examples/*.py"); do pylint --disable=missing-docstring,invalid-name,consider-using-f-string $example; done)'] - repo: local
language: system hooks:
- id: pylint_tests - id: mypy
name: pylint (tests code) name: mypy
description: Run pylint rules on "tests/*.py" files entry: "mypy --no-warn-unused-ignores jepler_udecimal"
entry: /usr/bin/env bash -c language: python
args: ['([[ ! -d "tests" ]] || for test in $(find . -path "./tests/*.py"); do pylint --disable=missing-docstring $test; done)'] additional_dependencies: ["mypy==0.910"]
language: system types: [python]
# use require_serial so that script
# is only called once per commit
require_serial: true
# Print the number of files as a sanity-check
verbose: true
pass_filenames: false

View file

@ -56,7 +56,7 @@ confidence=
# no Warning level messages displayed, use"--disable=all --enable=classes # no Warning level messages displayed, use"--disable=all --enable=classes
# --disable=W" # --disable=W"
# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call # disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call
disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation disable=raw-checker-failed,bad-inline-option,locally-disabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,import-error,consider-using-f-string,unnecessary-dunder-call
# Enable the message, report, category or checker with the given id(s). You can # Enable the message, report, category or checker with the given id(s). You can
# either give multiple identifier separated by comma (,) or put this option # either give multiple identifier separated by comma (,) or put this option
@ -226,12 +226,6 @@ max-line-length=100
# Maximum number of lines in a module # Maximum number of lines in a module
max-module-lines=1000 max-module-lines=1000
# List of optional constructs for which whitespace checking is disabled. `dict-
# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}.
# `trailing-comma` allows a space between comma and closing bracket: (a, ).
# `empty-line` allows space-only lines.
no-space-check=trailing-comma,dict-separator
# Allow the body of a class to be on the same line as the declaration if body # Allow the body of a class to be on the same line as the declaration if body
# contains single statement. # contains single statement.
single-line-class-stmt=no single-line-class-stmt=no
@ -258,38 +252,22 @@ min-similarity-lines=4
[BASIC] [BASIC]
# Naming hint for argument names
argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Regular expression matching correct argument names # Regular expression matching correct argument names
argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Naming hint for attribute names
attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Regular expression matching correct attribute names # Regular expression matching correct attribute names
attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Bad variable names which should always be refused, separated by a comma # Bad variable names which should always be refused, separated by a comma
bad-names=foo,bar,baz,toto,tutu,tata bad-names=foo,bar,baz,toto,tutu,tata
# Naming hint for class attribute names
class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Regular expression matching correct class attribute names # Regular expression matching correct class attribute names
class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$
# Naming hint for class names
# class-name-hint=[A-Z_][a-zA-Z0-9]+$
class-name-hint=[A-Z_][a-zA-Z0-9_]+$
# Regular expression matching correct class names # Regular expression matching correct class names
# class-rgx=[A-Z_][a-zA-Z0-9]+$ # class-rgx=[A-Z_][a-zA-Z0-9]+$
class-rgx=[A-Z_][a-zA-Z0-9_]+$ class-rgx=[A-Z_][a-zA-Z0-9_]+$
# Naming hint for constant names
const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# Regular expression matching correct constant names # Regular expression matching correct constant names
const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
@ -297,9 +275,6 @@ const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$
# ones are exempt. # ones are exempt.
docstring-min-length=-1 docstring-min-length=-1
# Naming hint for function names
function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Regular expression matching correct function names # Regular expression matching correct function names
function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
@ -310,21 +285,12 @@ good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_
# Include a hint for the correct naming format with invalid-name # Include a hint for the correct naming format with invalid-name
include-naming-hint=no include-naming-hint=no
# Naming hint for inline iteration names
inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$
# Regular expression matching correct inline iteration names # Regular expression matching correct inline iteration names
inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$
# Naming hint for method names
method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Regular expression matching correct method names # Regular expression matching correct method names
method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Naming hint for module names
module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
# Regular expression matching correct module names # Regular expression matching correct module names
module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$
@ -340,9 +306,6 @@ no-docstring-rgx=^_
# to this list to register other decorators that produce valid properties. # to this list to register other decorators that produce valid properties.
property-classes=abc.abstractproperty property-classes=abc.abstractproperty
# Naming hint for variable names
variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
# Regular expression matching correct variable names # Regular expression matching correct variable names
variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$
@ -428,10 +391,3 @@ max-statements=50
# Minimum number of public methods for a class (see R0903). # Minimum number of public methods for a class (see R0903).
min-public-methods=1 min-public-methods=1
[EXCEPTIONS]
# Exceptions that will emit a warning when being caught. Defaults to
# "Exception"
overgeneral-exceptions=Exception

19
.readthedocs.yaml Normal file
View file

@ -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

View file

@ -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

View file

@ -17,6 +17,10 @@ Introduction
:target: https://github.com/psf/black :target: https://github.com/psf/black
:alt: Code Style: Black :alt: Code Style: Black
.. image:: https://results.pre-commit.ci/badge/github/jepler/Jepler_CircuitPython_udecimal/main.svg
:target: https://results.pre-commit.ci/latest/github/jepler/Jepler_CircuitPython_udecimal/main
:alt: pre-commit.ci status
Reduced version of the decimal library for CircuitPython Reduced version of the decimal library for CircuitPython

View file

@ -9,17 +9,12 @@ echo "=== Create and set up virtual environment"
. .env/bin/activate . .env/bin/activate
echo "=== Install requirements" echo "=== Install requirements"
pip3 install wheel pip3 install wheel
pip3 install -r requirements.txt pip3 install -r requirements_dev.txt
echo "=== Run pre-commit" echo "=== Run pre-commit"
pre-commit run --all-files 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" 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) [ -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 ] || ( [ -x circuitpython/ports/unix/micropython ] || (
make -C circuitpython/mpy-cross -j$(nproc) make -C circuitpython/mpy-cross -j$(nproc)
@ -30,12 +25,14 @@ make -C circuitpython/ports/unix -j$(nproc) DEBUG=1 STRIP=:
echo "=== Run tests" echo "=== Run tests"
python -m jepler_udecimal.test python -m jepler_udecimal.test
if ! env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests -d examples; then run-tests () {
for exp in *.exp; do env MICROPYPATH=. PYTHONPATH=. MICROPY_MICROPYTHON=circuitpython/ports/unix/micropython circuitpython/tests/run-tests.py "$@"
testbase=$(basename $exp .exp); }
echo -e "\nFAILURE $testbase";
diff -u $testbase.exp $testbase.out; run-tests --clean-failures
done if ! run-tests -d examples; then
run-tests --print-failures
exit 1
fi fi
PYTHONPATH=. python examples/test_udecimal.py > test_udecimal.exp PYTHONPATH=. python examples/test_udecimal.py > test_udecimal.exp

View file

@ -68,7 +68,7 @@ release = "1.0"
# #
# This is also used if you do content translation via gettext catalogs. # This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases. # Usually you set "language" from the command line for these cases.
language = None language = "en"
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
@ -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

@ -13,7 +13,7 @@
# Adapted to CircuitPython by Jeff Epler <jepler@gmail.com> # Adapted to CircuitPython by Jeff Epler <jepler@gmail.com>
# #
# pylint: disable=line-too-long,superfluous-parens,too-many-lines,redefined-builtin,bare-except # pylint: disable=line-too-long,superfluous-parens,too-many-lines,redefined-builtin,bare-except
# pylint: disable=protected-access,invalid-name,no-self-use,self-cls-assignment,no-else-return,no-else-raise,too-many-public-methods,useless-object-inheritance,invalid-unary-operand-type,unused-argument,too-many-branches,too-many-return-statements,no-else-break,unused-variable,arguments-differ,missing-function-docstring,inconsistent-return-statements,global-statement,too-many-statements,attribute-defined-outside-init,consider-using-in,dangerous-default-value,using-constant-test,too-many-locals,too-many-arguments,keyword-arg-before-vararg # pylint: disable=protected-access,invalid-name,self-cls-assignment,no-else-return,no-else-raise,too-many-public-methods,useless-object-inheritance,invalid-unary-operand-type,unused-argument,too-many-branches,too-many-return-statements,no-else-break,unused-variable,arguments-differ,missing-function-docstring,inconsistent-return-statements,global-statement,too-many-statements,attribute-defined-outside-init,consider-using-in,dangerous-default-value,using-constant-test,too-many-locals,too-many-arguments,keyword-arg-before-vararg
""" """
Reduced version of the decimal library for CircuitPython. It runs on Reduced version of the decimal library for CircuitPython. It runs on
CircuitPython as well as standard Python, though you should probably CircuitPython as well as standard Python, though you should probably
@ -141,7 +141,10 @@ try:
DecimalTuple = _namedtuple("DecimalTuple", "sign digits exponent") DecimalTuple = _namedtuple("DecimalTuple", "sign digits exponent")
except ImportError: except ImportError:
DecimalTuple = lambda *args: args
def DecimalTuple(*args): # type: ignore
return args
# Rounding # Rounding
ROUND_DOWN = "ROUND_DOWN" ROUND_DOWN = "ROUND_DOWN"
@ -154,7 +157,7 @@ ROUND_HALF_DOWN = "ROUND_HALF_DOWN"
ROUND_05UP = "ROUND_05UP" ROUND_05UP = "ROUND_05UP"
try: try:
NotImplemented NotImplemented # pylint: disable=used-before-assignment
except NameError: except NameError:
NotImplemented = object() NotImplemented = object()
@ -169,7 +172,6 @@ if sys.implementation.name == "circuitpython":
else: else:
return m, (1 << (-e)) return m, (1 << (-e))
else: else:
_as_integer_ratio = float.as_integer_ratio _as_integer_ratio = float.as_integer_ratio
@ -692,7 +694,7 @@ class Decimal(object):
context = getcontext() context = getcontext()
context._raise_error( context._raise_error(
FloatOperation, FloatOperation,
"strict semantics for mixing floats and Decimals are " "enabled", "strict semantics for mixing floats and Decimals are enabled",
) )
value = Decimal.from_float(value) value = Decimal.from_float(value)
self._exp = value._exp self._exp = value._exp
@ -739,7 +741,7 @@ class Decimal(object):
sign = 1 sign = 1
n, d = _as_integer_ratio(abs(f)) n, d = _as_integer_ratio(abs(f))
k = d.bit_length() - 1 k = d.bit_length() - 1
coeff = str(n * 5 ** k) coeff = str(n * 5**k)
else: else:
raise TypeError("argument must be int or float.") raise TypeError("argument must be int or float.")
@ -1349,9 +1351,9 @@ class Decimal(object):
op1 = _WorkRep(self) op1 = _WorkRep(self)
op2 = _WorkRep(other) op2 = _WorkRep(other)
if shift >= 0: if shift >= 0:
coeff, remainder = divmod(op1.int * 10 ** shift, op2.int) coeff, remainder = divmod(op1.int * 10**shift, op2.int)
else: else:
coeff, remainder = divmod(op1.int, op2.int * 10 ** -shift) coeff, remainder = divmod(op1.int, op2.int * 10**-shift)
if remainder: if remainder:
# result is not exact; adjust to ensure correct rounding # result is not exact; adjust to ensure correct rounding
if coeff % 5 == 0: if coeff % 5 == 0:
@ -1392,7 +1394,7 @@ class Decimal(object):
else: else:
op2.int *= 10 ** (op2.exp - op1.exp) op2.int *= 10 ** (op2.exp - op1.exp)
q, r = divmod(op1.int, op2.int) q, r = divmod(op1.int, op2.int)
if q < 10 ** context.prec: if q < 10**context.prec:
return ( return (
_dec_from_triple(sign, str(q), 0), _dec_from_triple(sign, str(q), 0),
_dec_from_triple(self._sign, str(r), ideal_exp), _dec_from_triple(self._sign, str(r), ideal_exp),
@ -1552,7 +1554,7 @@ class Decimal(object):
r -= op2.int r -= op2.int
q += 1 q += 1
if q >= 10 ** context.prec: if q >= 10**context.prec:
return context._raise_error(DivisionImpossible) return context._raise_error(DivisionImpossible)
# result has same sign as self unless r is negative # result has same sign as self unless r is negative
@ -1619,7 +1621,7 @@ class Decimal(object):
raise OverflowError("Cannot convert infinity to integer") raise OverflowError("Cannot convert infinity to integer")
s = (-1) ** self._sign s = (-1) ** self._sign
if self._exp >= 0: if self._exp >= 0:
return s * int(self._int) * 10 ** self._exp return s * int(self._int) * 10**self._exp
else: else:
return s * int(self._int[: self._exp] or "0") return s * int(self._int[: self._exp] or "0")
@ -1796,16 +1798,16 @@ class Decimal(object):
else: else:
return -self._round_down(prec) return -self._round_down(prec)
_pick_rounding_function = dict( _pick_rounding_function = {
ROUND_DOWN=_round_down, ROUND_DOWN: _round_down,
ROUND_UP=_round_up, ROUND_UP: _round_up,
ROUND_HALF_UP=_round_half_up, ROUND_HALF_UP: _round_half_up,
ROUND_HALF_DOWN=_round_half_down, ROUND_HALF_DOWN: _round_half_down,
ROUND_HALF_EVEN=_round_half_even, ROUND_HALF_EVEN: _round_half_even,
ROUND_CEILING=_round_ceiling, ROUND_CEILING: _round_ceiling,
ROUND_FLOOR=_round_floor, ROUND_FLOOR: _round_floor,
ROUND_05UP=_round_05up, ROUND_05UP: _round_05up,
) }
def __round__(self, n=None): def __round__(self, n=None):
"""Round self to the nearest integer, or to a given precision. """Round self to the nearest integer, or to a given precision.
@ -1981,7 +1983,7 @@ class Decimal(object):
ye += 1 ye += 1
if ye < 0: if ye < 0:
return None return None
exponent = xe * 10 ** ye exponent = xe * 10**ye
if y.sign == 1: if y.sign == 1:
exponent = -exponent exponent = -exponent
# if other is a nonnegative integer, use ideal exponent # if other is a nonnegative integer, use ideal exponent
@ -2040,13 +2042,13 @@ class Decimal(object):
if e > emax: if e > emax:
return None return None
xc = 5 ** e xc = 5**e
elif last_digit == 5: elif last_digit == 5:
# e >= log_5(xc) if xc is a power of 5; we have # e >= log_5(xc) if xc is a power of 5; we have
# equality all the way up to xc=5**2658 # equality all the way up to xc=5**2658
e = _nbits(xc) * 28 // 65 e = _nbits(xc) * 28 // 65
xc, remainder = divmod(5 ** e, xc) xc, remainder = divmod(5**e, xc)
if remainder: if remainder:
return None return None
while xc % 5 == 0: while xc % 5 == 0:
@ -2067,18 +2069,18 @@ class Decimal(object):
if e > emax: if e > emax:
return None return None
xc = 2 ** e xc = 2**e
else: else:
return None return None
if xc >= 10 ** p: if xc >= 10**p:
return None return None
xe = -e - xe xe = -e - xe
return _dec_from_triple(0, str(xc), xe) return _dec_from_triple(0, str(xc), xe)
# now y is positive; find m and n such that y = m/n # now y is positive; find m and n such that y = m/n
if ye >= 0: if ye >= 0:
m, n = yc * 10 ** ye, 1 m, n = yc * 10**ye, 1
else: else:
if xe != 0 and len(str(abs(yc * xe))) <= -ye: if xe != 0 and len(str(abs(yc * xe))) <= -ye:
return None return None
@ -2122,9 +2124,9 @@ class Decimal(object):
# 10**p and the result is not representable. # 10**p and the result is not representable.
if xc > 1 and m > p * 100 // _log10_lb(xc): if xc > 1 and m > p * 100 // _log10_lb(xc):
return None return None
xc = xc ** m xc = xc**m
xe *= m xe *= m
if xc > 10 ** p: if xc > 10**p:
return None return None
# by this point the result *is* exactly representable # by this point the result *is* exactly representable
@ -2569,15 +2571,15 @@ class Decimal(object):
# rescale so that c has exactly prec base 100 'digits' # rescale so that c has exactly prec base 100 'digits'
shift = prec - l shift = prec - l
if shift >= 0: if shift >= 0:
c *= 100 ** shift c *= 100**shift
exact = True exact = True
else: else:
c, remainder = divmod(c, 100 ** -shift) c, remainder = divmod(c, 100**-shift)
exact = not remainder exact = not remainder
e -= shift e -= shift
# find n = floor(sqrt(c)) using Newton's method # find n = floor(sqrt(c)) using Newton's method
n = 10 ** prec n = 10**prec
while True: while True:
q = c // n q = c // n
if n <= q: if n <= q:
@ -2590,9 +2592,9 @@ class Decimal(object):
# result is exact; rescale to use ideal exponent e # result is exact; rescale to use ideal exponent e
if shift >= 0: if shift >= 0:
# assert n % 10**shift == 0 # assert n % 10**shift == 0
n //= 10 ** shift n //= 10**shift
else: else:
n *= 10 ** -shift n *= 10**-shift
e += shift e += shift
else: else:
# result is not exact; fix last digit as described above # result is not exact; fix last digit as described above
@ -2812,7 +2814,7 @@ class Decimal(object):
return s.compare_total(o) return s.compare_total(o)
def copy_abs(self): def copy_abs(self):
"""Returns a copy with the sign set to 0. """ """Returns a copy with the sign set to 0."""
return _dec_from_triple(0, self._int, self._exp, self._is_special) return _dec_from_triple(0, self._int, self._exp, self._is_special)
def copy_negate(self): def copy_negate(self):
@ -2976,11 +2978,11 @@ class Decimal(object):
c, e = op.int, op.exp c, e = op.int, op.exp
if adj == 0: if adj == 0:
# 1 < self < 10 # 1 < self < 10
num = str(c - 10 ** -e) num = str(c - 10**-e)
den = str(c) den = str(c)
return len(num) - len(den) - (num < den) return len(num) - len(den) - (num < den)
# adj == -1, 0.1 <= self < 1 # adj == -1, 0.1 <= self < 1
return e + len(str(10 ** -e - c)) - 1 return e + len(str(10**-e - c)) - 1
def ln(self, context=None): def ln(self, context=None):
"""Returns the natural (base e) logarithm of self.""" """Returns the natural (base e) logarithm of self."""
@ -3054,11 +3056,11 @@ class Decimal(object):
c, e = op.int, op.exp c, e = op.int, op.exp
if adj == 0: if adj == 0:
# 1 < self < 10 # 1 < self < 10
num = str(c - 10 ** -e) num = str(c - 10**-e)
den = str(231 * c) den = str(231 * c)
return len(num) - len(den) - (num < den) + 2 return len(num) - len(den) - (num < den) + 2
# adj == -1, 0.1 <= self < 1 # adj == -1, 0.1 <= self < 1
num = str(10 ** -e - c) num = str(10**-e - c)
return len(num) + e - (num < "231") - 1 return len(num) + e - (num < "231") - 1
def log10(self, context=None): def log10(self, context=None):
@ -3355,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,
@ -3575,7 +3577,7 @@ class Context(object):
self._ignored_flags.remove(flag) self._ignored_flags.remove(flag)
# We inherit object.__hash__, so we must deny this explicitly # We inherit object.__hash__, so we must deny this explicitly
__hash__ = None __hash__ = None # type: ignore
def Etiny(self): def Etiny(self):
"""Returns Etiny (= Emin - prec + 1)""" """Returns Etiny (= Emin - prec + 1)"""
@ -3613,7 +3615,7 @@ class Context(object):
if isinstance(num, str) and (num != num.strip() or "_" in num): if isinstance(num, str) and (num != num.strip() or "_" in num):
return self._raise_error( return self._raise_error(
ConversionSyntax, ConversionSyntax,
"trailing or leading whitespace and " "underscores are not permitted.", "trailing or leading whitespace and underscores are not permitted.",
) )
d = Decimal(num, context=self) d = Decimal(num, context=self)
@ -4915,12 +4917,12 @@ def _decimal_lshift_exact(n, e):
if n == 0: if n == 0:
return 0 return 0
elif e >= 0: elif e >= 0:
return n * 10 ** e return n * 10**e
else: else:
# val_n = largest power of 10 dividing n. # val_n = largest power of 10 dividing n.
str_n = str(abs(n)) str_n = str(abs(n))
val_n = len(str_n) - len(str_n.rstrip("0")) val_n = len(str_n) - len(str_n.rstrip("0"))
return None if val_n < -e else n // 10 ** -e return None if val_n < -e else n // 10**-e
def _sqrt_nearest(n, a): def _sqrt_nearest(n, a):
@ -5023,12 +5025,12 @@ def _dlog10(c, e, p):
f = e + l - (e + l >= 1) f = e + l - (e + l >= 1)
if p > 0: if p > 0:
M = 10 ** p M = 10**p
k = e + p - f k = e + p - f
if k >= 0: if k >= 0:
c *= 10 ** k c *= 10**k
else: else:
c = _div_nearest(c, 10 ** -k) c = _div_nearest(c, 10**-k)
log_d = _ilog(c, M) # error < 5 + 22 = 27 log_d = _ilog(c, M) # error < 5 + 22 = 27
log_10 = _log10_digits(p) # error < 1 log_10 = _log10_digits(p) # error < 1
@ -5036,7 +5038,7 @@ def _dlog10(c, e, p):
log_tenpower = f * M # exact log_tenpower = f * M # exact
else: else:
log_d = 0 # error < 2.31 log_d = 0 # error < 2.31
log_tenpower = _div_nearest(f, 10 ** -p) # error < 0.5 log_tenpower = _div_nearest(f, 10**-p) # error < 0.5
return _div_nearest(log_tenpower + log_d, 100) return _div_nearest(log_tenpower + log_d, 100)
@ -5060,12 +5062,12 @@ def _dlog(c, e, p):
if p > 0: if p > 0:
k = e + p - f k = e + p - f
if k >= 0: if k >= 0:
c *= 10 ** k c *= 10**k
else: else:
c = _div_nearest(c, 10 ** -k) # error of <= 0.5 in c c = _div_nearest(c, 10**-k) # error of <= 0.5 in c
# _ilog magnifies existing error in c by a factor of at most 10 # _ilog magnifies existing error in c by a factor of at most 10
log_d = _ilog(c, 10 ** p) # error < 5 + 22 = 27 log_d = _ilog(c, 10**p) # error < 5 + 22 = 27
else: else:
# p <= 0: just approximate the whole thing by 0; error < 2.31 # p <= 0: just approximate the whole thing by 0; error < 2.31
log_d = 0 log_d = 0
@ -5076,7 +5078,7 @@ def _dlog(c, e, p):
if p + extra >= 0: if p + extra >= 0:
# error in f * _log10_digits(p+extra) < |f| * 1 = |f| # error in f * _log10_digits(p+extra) < |f| * 1 = |f|
# after division, error < |f|/10**extra + 0.5 < 10 + 0.5 < 11 # after division, error < |f|/10**extra + 0.5 < 10 + 0.5 < 11
f_log_ten = _div_nearest(f * _log10_digits(p + extra), 10 ** extra) f_log_ten = _div_nearest(f * _log10_digits(p + extra), 10**extra)
else: else:
f_log_ten = 0 f_log_ten = 0
else: else:
@ -5189,16 +5191,16 @@ def _dexp(c, e, p):
# rounding down # rounding down
shift = e + q shift = e + q
if shift >= 0: if shift >= 0:
cshift = c * 10 ** shift cshift = c * 10**shift
else: else:
cshift = c // 10 ** -shift cshift = c // 10**-shift
quot, rem = divmod(cshift, _log10_digits(q)) quot, rem = divmod(cshift, _log10_digits(q))
# reduce remainder back to original precision # reduce remainder back to original precision
rem = _div_nearest(rem, 10 ** extra) rem = _div_nearest(rem, 10**extra)
# error in result of _iexp < 120; error after division < 0.62 # error in result of _iexp < 120; error after division < 0.62
return _div_nearest(_iexp(rem, 10 ** p), 1000), quot - p + 3 return _div_nearest(_iexp(rem, 10**p), 1000), quot - p + 3
def _dpower(xc, xe, yc, ye, p): def _dpower(xc, xe, yc, ye, p):
@ -5225,9 +5227,9 @@ def _dpower(xc, xe, yc, ye, p):
# compute product y*log(x) = yc*lxc*10**(-p-b-1+ye) = pc*10**(-p-1) # compute product y*log(x) = yc*lxc*10**(-p-b-1+ye) = pc*10**(-p-1)
shift = ye - b shift = ye - b
if shift >= 0: if shift >= 0:
pc = lxc * yc * 10 ** shift pc = lxc * yc * 10**shift
else: else:
pc = _div_nearest(lxc * yc, 10 ** -shift) pc = _div_nearest(lxc * yc, 10**-shift)
if pc == 0: if pc == 0:
# we prefer a result that isn't exactly 1; this makes it # we prefer a result that isn't exactly 1; this makes it
@ -5235,7 +5237,7 @@ def _dpower(xc, xe, yc, ye, p):
if (len(str(xc)) + xe >= 1) == (yc > 0): # if x**y > 1: if (len(str(xc)) + xe >= 1) == (yc > 0): # if x**y > 1:
coeff, exp = 10 ** (p - 1) + 1, 1 - p coeff, exp = 10 ** (p - 1) + 1, 1 - p
else: else:
coeff, exp = 10 ** p - 1, -p coeff, exp = 10**p - 1, -p
else: else:
coeff, exp = _dexp(pc, -(p + 1), p + 1) coeff, exp = _dexp(pc, -(p + 1), p + 1)
coeff = _div_nearest(coeff, 10) coeff = _div_nearest(coeff, 10)
@ -5373,7 +5375,7 @@ ExtendedContext = Context(
try: try:
import re import re
except: except:
import ure as re import ure as re # type: ignore
_parser = re.compile( # A numeric string consists of: _parser = re.compile( # A numeric string consists of:
r"([-+])?" # an optional sign, followed by either... # 1 r"([-+])?" # an optional sign, followed by either... # 1

View file

@ -4,7 +4,7 @@
# SPDX-License-Identifier: MIT # SPDX-License-Identifier: MIT
pre-commit pre-commit
recommonmark==0.6.0 recommonmark==0.6.0
sphinx<4 sphinx
sphinx-autoapi sphinx-autoapi
sphinxcontrib-svg2pdfconverter==0.1.0 sphinxcontrib-svg2pdfconverter==0.1.0
sphinx-rtd-theme sphinx-rtd-theme

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