Skip to content

pcgv3 refactor tests#538

Merged
akhileshh merged 12 commits into
pcgv3from
pcgv3-refactor-tests
Jun 29, 2026
Merged

pcgv3 refactor tests#538
akhileshh merged 12 commits into
pcgv3from
pcgv3-refactor-tests

Conversation

@akhileshh

Copy link
Copy Markdown
Contributor

No description provided.

akhileshh and others added 3 commits June 28, 2026 02:17
Add [tool.pytest.ini_options] with testpaths so a bare `pytest` collects
the suite; test configuration previously lived only in the tox command.

Co-Authored-By: Claude <noreply@anthropic.com>
The fixture duplicated gen_graph with file-backed edge/component I/O but
had no callers.

Co-Authored-By: Claude <noreply@anthropic.com>
Replace the duplicated `datetime.now(UTC) - timedelta(days=10)` with one
helper so the "safely old" edit/lineage timestamp has a single source;
rename local vars that collided with the helper name.

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

codecov Bot commented Jun 28, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Impacted file tree graph

@@            Coverage Diff             @@
##            pcgv3     #538      +/-   ##
==========================================
- Coverage   68.19%   67.66%   -0.54%     
==========================================
  Files          90       89       -1     
  Lines        8899     8624     -275     
  Branches     1199     1149      -50     
==========================================
- Hits         6069     5835     -234     
+ Misses       2617     2600      -17     
+ Partials      213      189      -24     
Files with missing lines Coverage Δ
pychunkedgraph/ingest/utils.py 45.26% <100.00%> (-0.45%) ⬇️
pychunkedgraph/tests/helpers.py 88.09% <100.00%> (+4.76%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

akhileshh and others added 9 commits June 28, 2026 17:26
A test graph is determined by its atomic chunks; build_graph takes only
that topology and builds the full (derivable) parent hierarchy at one
timestamp, replacing hand-listed add_parent_chunk scaffolding.

Co-Authored-By: Claude <noreply@anthropic.com>
Supervoxels are named and given as SV(x, y, z, seg) with zeros defaulting
away, so build specs carry no repeated raw coordinate tuples; build_graph
returns a BuiltGraph(cg, sv, ts) namedtuple and callers reference sv by name.
Drop the unused ts from the result; callers unpack `cg, sv = build_graph(...)`
and reference supervoxels by name.
Replace the per-fixture gen_graph + create_chunk + add_parent_chunk +
to_label scaffolding with named-supervoxel build_graph specs. The parent
hierarchy is derived from the atomic chunks rather than hand-listed, and
readable SV() coordinates replace the repeated raw (x, y, z, seg) tuples.

Co-Authored-By: Claude <noreply@anthropic.com>
Reference every node through readable SV coordinates — build_graph for
setup, the new label(cg, SV, layer) for construction/encoding tests —
instead of positional to_label tuples. Adds an assert_graph_unchanged
context manager for rejected-edit atomicity; drops the dead query fixture.

Co-Authored-By: Claude <noreply@anthropic.com>
Move the edit-operation tests into tests/graph/edits/ with a coverage
README, and lift the duplicated split/merge/undo setup graphs into shared
edits/conftest.py fixtures.

Co-Authored-By: Claude <noreply@anthropic.com>
Restore the original finite affinity (a split test must exercise the same
edge type); the migration had switched it to an inf cross-chunk edge.

Co-Authored-By: Claude <noreply@anthropic.com>
Shrink the lock-acquire backoff where the failed acquire is only setup,
lower the test lock-expiry, and skip the doomed best-effort error-artifact
write that dominated the error-path test. Assertions unchanged.

Co-Authored-By: Claude <noreply@anthropic.com>
Every test parametrizes over kvdbclient_testing.backends(); the per-backend
branches, the bigtable emulator bootstrap, and the hbase mock are gone, now
shipped by kvdbclient. bootstrap() resolves the config class via
get_config_class(). Requires kvdbclient>=0.8.0.

Co-Authored-By: Claude <noreply@anthropic.com>
@akhileshh akhileshh merged commit 8677404 into pcgv3 Jun 29, 2026
3 checks passed
@akhileshh akhileshh deleted the pcgv3-refactor-tests branch June 29, 2026 16:57
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