Skip to content

Add CI - #2

Merged
remislp merged 2 commits into
masterfrom
ci
Sep 1, 2026
Merged

remislp merged 2 commits into
masterfrom
ci

Conversation

@remislp

@remislp remislp commented Sep 1, 2026

Copy link
Copy Markdown
Member

dcio has never had CI. Nothing but a local test run has ever gated a change,
and it is now becoming the record layer under SCALCS, EKDIST and HJCFIT — a
regression here reaches three other projects.

The suite runs in under two seconds, so the matrix covers every supported
Python (3.11–3.13) and all three platforms rather than one representative
build. Reading and writing SCN means struct packing and endianness, which is
exactly the kind of thing that is fine on the machine it was written on.

Three gates beyond running pytest

Example records present. Several tests take a legacy SCN from examples/
and pytest.skip when it is absent. A skip is a silent pass: if those files
ever stopped being checked out, the golden burst counts and the round-trip
checks against real records would quietly stop running while CI stayed green.
The step asserts they are there rather than trusting a skip to be noticed.

Oldest dependencies. numpy>=2.0 is declared, but nothing has ever run
against 2.0 itself, so the floor is an assertion rather than a tested fact.
NEP 50 changed scalar promotion and impose_resolution does float arithmetic
on array elements, so a drifted minimum would show up there. That job pins
Python 3.11, because numpy 2.0 has no wheel for 3.13.

Wheel and console scripts. An editable install resolves imports and entry
points from the source tree, so it cannot catch an undeclared package or an
entry point that does not resolve. The three dcio-* commands have never been
run from an installed wheel.

Checked locally first

  • All three console scripts answer --help with exit 0.
  • Full suite passes on numpy 2.1 in a clean venv — the oldest available for
    this machine's Python 3.13. numpy 2.0 itself is what the oldest-deps job
    exists to find out about; it has not been run anywhere yet.

Sequencing

pull_request workflows run from the head branch, so #1 will not be checked by
this until it is rebased. Merge this first, then rebase bursts and #1 picks
up the full matrix.

🤖 Generated with Claude Code

remislp and others added 2 commits September 1, 2026 13:42
dcio has never had CI. That was tolerable while it was one person's file
reader; it is not now that it is becoming the record layer under SCALCS,
EKDIST and HJCFIT, where a regression reaches three other projects.

The suite runs in under two seconds, so the matrix covers every supported
Python (3.11-3.13) and all three platforms rather than one representative
build. Reading and writing SCN means struct packing and endianness, which is
exactly the kind of thing that is fine on the machine it was written on.

Three gates beyond running pytest:

Example records present. Several tests take a legacy SCN from examples/ and
skip when it is absent. A skip is a silent pass: if those files ever stopped
being checked out, the golden burst counts and the round-trip checks against
real records would quietly stop running while CI stayed green.

Oldest dependencies. numpy>=2.0 is declared but nothing has ever run against
2.0 itself, so the floor is an assertion rather than a tested fact. That job
pins Python 3.11, since numpy 2.0 has no wheel for 3.13. Verified locally that
the suite passes on numpy 2.1, the oldest available for this machine's 3.13.

Wheel and console scripts. An editable install resolves imports and entry
points from the source tree, so it cannot catch an undeclared package or an
entry point that does not resolve. The three dcio-* commands have never been
run from an installed wheel; all three answer --help locally.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The import list named the burst functions from #1, which is not on this
branch. Those go in when M1 merges.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@remislp
remislp merged commit d928716 into master Sep 1, 2026
7 checks passed
@remislp
remislp deleted the ci branch September 1, 2026 12:46
remislp added a commit that referenced this pull request Sep 1, 2026
Deferred from #2, which was based on a master that did not have it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
remislp added a commit that referenced this pull request Sep 1, 2026
* Add burst segmentation to dcio.analysis

Move burst splitting into the record layer, so the one implementation sits
below SCALCS, EKDIST and HJCFIT rather than beside them. This is additive:
nothing is removed from SCALCS, whose scsim functions keep working unchanged
until they can be turned into re-exports.

The implementation is SCALCS's, chosen over EKDIST's because it is the one
with flag handling, the one with tests, and the one that reproduces the 2017
segmentation exactly. Verified identical to it over 500 random records in both
flag modes, and on examples/scn/glyr_experimental.scn at three critical times.

Adds a record-level entry point, bursts_from_record, which segments the
record's periods rather than its resolved intervals. impose_resolution emits a
fresh open interval at every change of fitted amplitude, so a record idealised
with sub-conductance levels does not alternate open/shut: the shipped
experimental example has 1770 consecutive open-open pairs in 3232 resolved
intervals, and segmenting those gives 30 of 63 bursts that end on a shut. The
missed-events likelihood needs alternating sequences. Burst count and lengths
are unaffected; openings per burst are 731 rather than 2501, counting an
opening once instead of once per sub-level.

No HJCFIT sample record contains a sub-conductance level, so this fixes
nothing currently broken there -- it removes a way for it to break later.

Tests carry over the convention cases that pinned this behaviour in SCALCS,
and add golden values for the shipped experimental record.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Check the burst API in the wheel job too

Deferred from #2, which was based on a master that did not have it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant