Skip to content

Commit 2d0508d

Browse files
authored
Merge pull request #124 from timlnx/issue-123-docs
docs: 2.0.0 final docs update (issue #123)
2 parents 850db87 + 6cf1131 commit 2d0508d

3 files changed

Lines changed: 22 additions & 11 deletions

File tree

NEWS.rst

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,15 @@ still works exactly the same way. What 2.0.0 adds on top of that:
101101
family is now preserved. Closes `issue #95
102102
<https://github.com/timlnx/bitmath/issues/95>`_.
103103

104+
**Windows device capacity**
105+
:func:`bitmath.query_device_capacity` now works on Windows via
106+
``DeviceIoControl``. Open the device as
107+
``open(r'\\.\PhysicalDrive0', 'rb')`` (administrator privileges
108+
required). Unsupported platforms raise :exc:`NotImplementedError`.
109+
The new :data:`bitmath.SUPPORTED_PLATFORMS` constant lists all
110+
platforms where the function is available. Closes `issue #52
111+
<https://github.com/timlnx/bitmath/issues/52>`_.
112+
104113
**Flexible string parsing**
105114
:func:`bitmath.parse_string` with ``strict=False`` accepts
106115
ambiguous input such as ``"1g"`` or ``"1GB"`` and resolves it to
@@ -124,8 +133,8 @@ projects are actually maintained in 2026:
124133
``pyproject.toml``.
125134

126135
**GitHub Actions**
127-
CI now runs against Python 3.11, 3.12, and 3.13 on both Ubuntu and
128-
macOS, with actions pinned to current versions (``checkout@v4``,
136+
CI now runs against Python 3.9 through 3.13 on Ubuntu, macOS, and
137+
Windows, with actions pinned to current versions (``checkout@v6``,
129138
``setup-python@v5``). Tests run on every pull request, not just
130139
pushes.
131140

@@ -151,7 +160,7 @@ bitmath started as a small passion project of mine. A utility for
151160
thinking about and clearly expressing file sizes, and that's still
152161
exactly what it is. This 2.0.0 release doesn't change what the library
153162
does. What I've done is change the very foundation that it's built
154-
on. The test suite sits at 288 tests and 100% coverage. The
163+
on. The test suite sits at 294 tests and 99% coverage. The
155164
documentation has been comprehensively reviewed and updated. The
156165
packaging is clean enough to pass ``twine check`` on the first attempt
157166
(well, the second).

docsite/source/contributing.rst

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,7 @@ output omitted for brevity):
242242
243243
======================== NNN passed in Xs ========================
244244
245-
A passing run shows 100% coverage. The exact test count grows as new
246-
tests are added. Any regression in coverage is a failure.
245+
The exact test count grows as new tests are added.
247246

248247
The definitive pass/fail verdict comes from the GitHub Actions workflow
249248
on your pull request, which runs the suite across all supported Python

docsite/source/module.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -603,12 +603,15 @@ bitmath.query_device_capacity()
603603
Device /dev/sda capacity: 238.474937439 GiB (2.56060514304e+11 Bytes)
604604
605605
606-
.. important:: **Platform Notice**:
607-
:py:func:`bitmath.query_device_capacity` is only
608-
verified to work on **Linux** and **Mac OS X**
609-
platforms. To file a bug report, please follow the
610-
instructions in the :ref:`contributing
611-
section<contributing_issue_reporting>`.
606+
:raises NotImplementedError: if called on an unsupported platform.
607+
Supported platforms are Linux, macOS,
608+
and Windows.
609+
610+
.. note:: **Windows usage**: open the device as
611+
``open(r'\\.\PhysicalDrive0', 'rb')`` (administrator
612+
privileges required). The device path must start with
613+
``\\.\`` — passing a regular file path raises
614+
:py:exc:`ValueError`.
612615

613616
.. versionadded:: 1.2.4
614617

0 commit comments

Comments
 (0)