Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
0c3b10c
checks: support numpy.int64
teto Oct 2, 2019
8545ddf
Begin dropping support for python 2
Jan 27, 2023
db00693
Out with the old
Jan 27, 2023
6da9b94
Doc updates
Feb 4, 2023
450ee99
Remove old integrations FOR NOW. They will return with proper credit …
Feb 4, 2023
8cf129e
More doc updates
Feb 4, 2023
74209d7
Update all python.org doc links to version 3
Feb 4, 2023
57f0805
Fix doc reference in argparse integration
Feb 4, 2023
1a69384
Remove Python 2 types, 'long' and 'unicode'
Feb 4, 2023
acdc26c
Fix up CI configuration, scripts, and requirements
Feb 4, 2023
4ab2219
Github action with python matrix?
Feb 4, 2023
cf0b84b
Fix stupid yaml syntax
Feb 4, 2023
c0f7d06
Actions install pip and virtualenv?
Feb 4, 2023
0324bfd
Fix actions
Feb 4, 2023
788ca7b
GitHub Workflow fixes. And badge
Feb 4, 2023
852c149
No more old plain requirements file
Feb 4, 2023
0eec71f
Update contact page. No more IRC or twitter for now.
Feb 4, 2023
88fba1f
Unbreak requirements file maybe?
Feb 5, 2023
fc7c2ed
Unbreak requirements file maybe? What is using normal reqs file?
Feb 5, 2023
8a28275
Maybe simpler now
Feb 5, 2023
c6c5724
Combine gh action steps, switch to pytest
Feb 5, 2023
0ab40b6
Get rid of old deps from requirements
Feb 5, 2023
69eeae3
Dedupe Makefile targets. Align with gh actions script
Feb 5, 2023
5b871cf
update readme/index
Feb 5, 2023
e817bcd
Seeing what's up with all this hatch packaging stuff
Feb 5, 2023
3e3fed3
Fix print statement to print function
Feb 5, 2023
5b51b9c
Fix up contributing page. Add CoC notice. Refresh CI description.
Feb 6, 2023
b36b6e4
Add more badge flair
Feb 6, 2023
3e7d458
Simple commit to trigger doc build?
Feb 6, 2023
3e72958
Doc updates, make class references working links, fuss with some exam…
Feb 6, 2023
7c3f7a3
Add docstrings to properties
Feb 6, 2023
46e8bbd
Remove a dead project link, update SymPy link
Feb 13, 2023
22ec5f7
Add pyproject.toml (replaces hatch.toml, PEP 517/518 compliant)
timlnx Apr 17, 2026
14dc2d1
Remove legacy packaging files, drop mock from requirements
timlnx Apr 17, 2026
e4eb79c
Update CI: Python 3.11-3.13 matrix, checkout@v4, setup-python@v5
timlnx Apr 17, 2026
27029bf
Add CodeQL security scanning workflow
timlnx Apr 17, 2026
8da9d46
Update GitHub handle tbielawa→timlnx, name Tim Bielawa→Tim Case
timlnx Apr 17, 2026
f0ab3c2
Fix contact.rst link text: tbielawa→timlnx
timlnx Apr 17, 2026
74a06fd
Fix conf.py.in: drop deprecated get_html_theme_path(), update author …
timlnx Apr 17, 2026
a1481e7
Fix module.rst: replace invalid :option: role with literal du -B
timlnx Apr 17, 2026
e6e5377
make docs: auto-install doc-requirements.txt before building
timlnx Apr 17, 2026
1be0049
make docs: use bitmath2 Python 3.12 venv for doc builds
timlnx Apr 17, 2026
5abeefa
Testing testing
timlnx Apr 17, 2026
351bbe3
Fix noqa codes: F841→F824 for unused global declarations
timlnx Apr 17, 2026
7d1d7ea
Add SPDX-License-Identifier: MIT to all source files
timlnx Apr 17, 2026
7df4571
Remove Python 2 compatibility code
timlnx Apr 17, 2026
e386f5b
Fix built-in sum() for bitmath objects; add bitmath.sum()
timlnx Apr 17, 2026
2a82974
Fix docs and internal docstring errors found during math rules audit
timlnx Apr 17, 2026
a60e651
Add __floor__, __ceil__, __round__ to Bitmath; document float semantics
timlnx Apr 17, 2026
9b301fe
Makefile: use 'open' on Darwin, xdg-open elsewhere for viewdocs
timlnx Apr 17, 2026
e1c10a8
Align make ci with GitHub workflow; add coverage XML for PR reporting
timlnx Apr 17, 2026
6bdff94
Fix E305: add blank line after nested() helper in test_query_device_c…
timlnx Apr 17, 2026
3e77a21
Add HTML coverage report to ci-unittests; fix viewcover for Darwin
timlnx Apr 17, 2026
4294af6
viewcover depends on ci-unittests; ci-unittests depends on virtualenv
timlnx Apr 17, 2026
c486f91
Add docstrings to __floor__/__ceil__/__round__; add test_rounding.py
timlnx Apr 17, 2026
490b8e5
Add failing tests for best_prefix() bit-family unit bug (issue #95)
timlnx Apr 17, 2026
8802bcd
Fix best_prefix() to preserve unit family; closes #95
timlnx Apr 17, 2026
fd3e748
Upgrade codeql-action v3 -> v4 to clear deprecation warnings
timlnx Apr 17, 2026
75dffb5
Upgrade actions/checkout to v6.0.2; opt into Node.js 24 now
timlnx Apr 17, 2026
57d4af6
Clarify mixed-type add/sub docs; add explicit-operand pattern
timlnx Apr 17, 2026
76c1ff1
Add a SECURITY policy for GH
timlnx Apr 17, 2026
61ddf32
SECURITY POLICY BETTER
timlnx Apr 17, 2026
52f2322
Naming, copyright, emails, housekeeping stuff
timlnx Apr 17, 2026
18bc502
Merge parse_string_unsafe into parse_string; deprecate parse_string_u…
timlnx Apr 17, 2026
0db6fa8
Add ZiB, YiB, Zib, Yib NIST units; fix int/float comparison for large…
timlnx Apr 17, 2026
4e37435
Update module.rst: reflect parse_string changes and deprecate parse_s…
timlnx Apr 17, 2026
16e2fc3
Rewrite parse_string strict=False docs: system is a tiebreaker, not a…
timlnx Apr 17, 2026
f030c64
Unify parse_string terminology: replace 'loose' with 'non-strict' thr…
timlnx Apr 17, 2026
f74a05a
Clarify system param: only consulted when unit cannot be reliably det…
timlnx Apr 17, 2026
df38816
Update simple_examples.rst: fix stale examples, add new feature sections
timlnx Apr 17, 2026
580e8cb
docs: update sum() docs to distinguish built-in sum() from bitmath.sum()
timlnx Apr 17, 2026
d2c5331
docs: add bitmath.sum() reference entry to module.rst
timlnx Apr 17, 2026
0b0303d
docs: sync SI_STEPS, NIST_STEPS, ALL_UNIT_TYPES constants with code
timlnx Apr 17, 2026
53a0b28
Fix the issue template locations
timlnx Apr 17, 2026
9e2f6b6
fix: make bitmath.format() context manager thread-safe; implement bes…
timlnx Apr 17, 2026
815a77c
docs: rewrite contributing guide; add Windows viewdocs support
timlnx Apr 17, 2026
c46de85
feat: implement __format__ for f-string and format() support
timlnx Apr 17, 2026
560cca7
docs: add Choosing a Formatting Approach guide to Getting Started
timlnx Apr 17, 2026
86f172d
docs: update feature list and test count in README and index for 2.0.0
timlnx Apr 18, 2026
bad68a7
docs: remove parenthetical from string parsing bullet
timlnx Apr 18, 2026
21c6821
docs: fix GitHub URL, update copyright year and email address
timlnx Apr 18, 2026
7631d39
Fix names and such
timlnx Apr 18, 2026
a030fb4
Remove bitmath.integrations package; add Integration Examples docs ch…
timlnx Apr 18, 2026
44eed63
Doc updates
timlnx Apr 18, 2026
1082e92
Modernize packaging: pyproject.toml sdist config, Makefile build targ…
timlnx Apr 18, 2026
f01c87b
Fix README.rst: replace Sphinx :py:func: roles with plain literals fo…
timlnx Apr 18, 2026
21550d7
Remove obsolete pip >= 1.1 note (issue #57 is 10 years old)
timlnx Apr 18, 2026
2390bd2
docs
timlnx Apr 18, 2026
e809f14
Fix coverage warning: remove redundant [run] include (conflicts with …
timlnx Apr 18, 2026
0f2664d
Replace 2.0.0 NEWS.rst stub with full release notes
timlnx Apr 18, 2026
4889c74
NEWS.rst: sync prose and links with 2.0.0-release.md hand edits
timlnx Apr 18, 2026
1010cfe
NEWS.rst: fix undefined label ref for parse_string
timlnx Apr 18, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# -*- mode: conf -*-
[run]
include = bitmath/__init__.py,bitmath/integrations.py
[report]
exclude_lines =
# These should be impossible to trigger.
Expand All @@ -14,11 +13,7 @@ exclude_lines =
# Explicitly label a line as 'do not cover'
pragma: no cover

# Stuff to skip only on Python 2.x. Insert a line like:" # pragma:
# PY2X no cover" And export the env var "PYVER" as "PY2X". To skip
# certain things on only Py3.x export PYVER as PY3X
#
# Review: http://nedbatchelder.com/code/coverage/config.html#h_Syntax if you need a refresher
# Review: https://coverage.readthedocs.io/en/stable/config.html#syntax if you need a refresher
#
# BTW, the exports happen in the Makefile on lines like (for the 3.x tests):
#
Expand Down
File renamed without changes.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.

37 changes: 37 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CodeQL Security Scan

on:
push:
branches: ["master", "bitmath2"]
pull_request:
branches: ["master"]
schedule:
- cron: "0 0 * * 0"

jobs:
analyze:
name: Analyze Python
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true

steps:
- name: Checkout repository
uses: actions/checkout@v6.0.2

- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: python

- name: Autobuild
uses: github/codeql-action/autobuild@v4

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v4
with:
category: "/language:python"
27 changes: 0 additions & 27 deletions .github/workflows/makefile.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Python CI

on: [push, pull_request]

jobs:
build:
permissions:
pull-requests: write
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: ["macos-latest", "ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: "GitHub Checks it out :sunglasses-face:"
uses: actions/checkout@v6.0.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'

- name: Verify Test Case Names Unique
run: |
./tests/test_unique_testcase_names.sh

- name: install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Pre-Tests code smell validation
run: |
pycodestyle -v --ignore=E501,E722 bitmath/__init__.py tests/*.py
flake8 --select=F bitmath/__init__.py tests/*.py

- name: Run Unit Tests
run: |
pytest -v --cov=bitmath --cov-report term-missing --cov-report term:skip-covered --cov-report xml:coverage.xml tests

- name: Coverage report on PR
if: github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-xml-coverage-path: ./coverage.xml
title: "Test Coverage Report"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ pip-log.txt

# Unit test / coverage reports
.coverage
coverage.xml
.tox
nosetests.xml

Expand All @@ -51,3 +52,4 @@ docsite/build/html
docsite/build/doctrees
bitmathenv3
bitmathenv2
bitmath2
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at timbielawa@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at bitmath@lnx.cx. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright © 2014 Tim Bielawa <timbielawa@gmail.com>
Copyright © 2014-2026 Tim Case (fmr. tbielawa) <bitmath@lnx.cx>

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 0 additions & 4 deletions MANIFEST.in

This file was deleted.

Loading
Loading