Skip to content

Commit bfbeb08

Browse files
committed
Prepare alpha release notes and strict distribution metadata checks
1 parent 30b2d02 commit bfbeb08

5 files changed

Lines changed: 36 additions & 4 deletions

File tree

‎.github/workflows/check-packages.yaml‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,12 @@ jobs:
2323
python-version: ${{ matrix.python-version }}
2424
- name: Build wheel and source archive
2525
run: |
26-
python -m pip install build==1.2.2
26+
python -m pip install build==1.2.2 twine
2727
python -m build
2828
- name: Check archive contents
29-
run: python maintenance/check-distribution-archives.py dist
29+
run: |
30+
python maintenance/check-distribution-archives.py dist
31+
python -m twine check --strict dist/*
3032
- name: Install and exercise each distribution separately
3133
shell: bash
3234
env:

‎MAINTENANCE_PLAN.md‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ completed repository repair programme.
137137
alpha and are tracked as follow-up work below.
138138
- [ ] Review outstanding release metadata, archive size and service/citation links.
139139
- [x] Prepare the release notes for `0.12.0a1` in `doc/UserGuide/upgrade.rst`.
140+
Release preparation now includes the completed Stage 9 previews, sorting and
141+
retained uniqueness contracts. CI package validation checks the description
142+
with strict Twine validation and reports actual archive sizes for review.
140143
- [ ] When authorised, tag and publish; record successful package/documentation
141144
jobs and verify published versions before closing release preparation.
142145

‎doc/UserGuide/upgrade.rst‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,21 @@ The :doc:`datafile` and :doc:`image` guides describe the current interfaces.
2929
These native computations do not automatically apply Stoner exclusions. Use
3030
``to_numpy()`` for a detached masked numerical export, ``Data.asarray()`` or
3131
``ImageFile.imarray`` for read-only numerical snapshots, and ``export_storage()``
32-
for lossless state with typed metadata. Broader wrapper simplification is Stage 9.
32+
for lossless state with typed metadata.
33+
34+
``Data.head(n=5)`` and ``Data.tail(n=5)`` return independent objects of the same
35+
class, preserving raw excluded measurements, masks, dtype, fill value, column
36+
headers/roles/IDs and typed metadata. Negative counts omit rows from the opposite
37+
end; zero returns an empty table. Standard previews copy only selected numerical
38+
rows, while custom clone/deepcopy hooks retain their established behaviour.
39+
40+
``Data.sort`` continues to sort in place and return the same object. Compatible
41+
real numeric keys now delegate to pandas stable sorting, with exclusions moved
42+
by the same row permutation. Complex values, other float widths, non-native byte
43+
orders and custom comparators retain numerical paths. ``reverse=True`` reverses
44+
the complete ascending permutation, including ties and NaNs. ``Data.unique``
45+
retains NumPy's sorted masked results and optional index/inverse outputs because
46+
pandas distinct-value operations have different semantics.
3347

3448
Direct native edits may change existing cells without changing dtype or geometry.
3549
Use Stoner methods for structural changes, and reacquire native references after

‎maintenance/README.md‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ allocations versus masked exports and records regional selection costs and a
7373
runtime-source fingerprint. These checks supplement the scientific regression
7474
suite; they do not replace hosted platform or installed-distribution validation.
7575

76-
`check-distribution-archives.py dist` inspects CI-built wheel/sdist contents.
76+
`check-distribution-archives.py dist` inspects CI-built wheel/sdist contents and
77+
reports compressed/uncompressed sizes and the largest retained assets. The package
78+
workflow also runs `twine check --strict` on both archives to validate their
79+
metadata and rendered package description before installed-distribution checks.
7780
`check-installed-package.py <checkout>` runs with each installed distribution from
7881
outside the checkout, checking import provenance, metadata, resources and sample
7982
data. The `Package validation` workflow provides those fresh environments; use its

‎maintenance/check-distribution-archives.py‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,20 @@ def main():
4040
raise RuntimeError(f'Expected one wheel and one source archive, found {wheels}, {sources}')
4141
with zipfile.ZipFile(wheels[0]) as archive:
4242
check(archive.namelist(), wheel=True)
43+
report_size(wheels[0], [(item.filename, item.file_size) for item in archive.infolist()])
4344
with tarfile.open(sources[0], 'r:gz') as archive:
4445
check(archive.getnames(), wheel=False)
46+
report_size(sources[0], [(item.name, item.size) for item in archive.getmembers() if item.isfile()])
4547
print('Wheel and source archive content checks passed.')
4648

4749

50+
def report_size(path, entries):
51+
"""Report actual CI archive sizes and their largest retained source assets."""
52+
print(f'{path.name}: {path.stat().st_size:,} compressed bytes; '
53+
f'{sum(size for _, size in entries):,} uncompressed bytes; {len(entries)} entries')
54+
for name, size in sorted(entries, key=lambda item: item[1], reverse=True)[:5]:
55+
print(f' {size:>12,} bytes {name}')
56+
57+
4858
if __name__ == '__main__':
4959
main()

0 commit comments

Comments
 (0)