Skip to content

[WIP] Add high-ROI coverage targets including tests and CI visibility#1348

Merged
SkBlaz merged 1 commit intocopilot/find-coverage-gapsfrom
copilot/sub-pr-1347
Apr 15, 2026
Merged

[WIP] Add high-ROI coverage targets including tests and CI visibility#1348
SkBlaz merged 1 commit intocopilot/find-coverage-gapsfrom
copilot/sub-pr-1347

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 15, 2026

Thanks for the feedback on #1347. I've created this new PR, which merges into #1347, to address your comment. I will work on the changes and keep this PR's description up to date as I make progress.

Original PR: #1347
Triggering comment (#1347 (comment)):

@copilot I found the core issue: this job is running a very broad test matrix, but the dominant failures are from missing optional dependencies (pyarrow) and likely test/env mismatch rather than one localized regression.

Most actionable fix (likely unblocks dozens of failures)

Your logs show repeated hard failures like:

  • Py3plexFormatError: pyarrow is required for Apache Arrow format...
  • Py3plexIOError: PyArrow is required for Parquet support...

These should not fail in a default test environment unless:

  1. CI is expected to include Arrow/Parquet extras but doesn’t install them, or
  2. tests are not guarded with importorskip("pyarrow").

✅ Solution

1) Update workflow install step to include test extras + arrow

In .github/workflows/tests.yml (job that runs pytest), install:

- name: Install dependencies
  run: |
    python -m pip install --upgrade pip
    pip install -e ".[test,arrow]"

If your extras differ, equivalent explicit fallback:

pip install -e . pytest pyarrow

2) Guard Arrow/Parquet tests if optional dependency is truly optional

At top of Arrow/Parquet test modules (e.g. tests/test_roundtrip_invariants.py sections for Arrow/Parquet):

import pytest

pyarrow = pytest.importorskip("pyarrow", reason="pyarrow optional dependency not installed")

This ensures default CI won’t fail if pyarrow is intentionally not installed.


Secondary failures (after env fix)

You still have many genuine code/test contract mismatches. Prioritize these clusters:

  1. DSL Query API regressions

    • AttributeError: 'Query' object has no attribute 'summary'
    • 'list' object has no attribute '_to_ast'
    • 'dict' object has no attribute 'count' / 'to_pandas'

    These indicate return-type/API changes not reflected in tests (or accidental breaking change in builder internals).
    Fix direction: restore compatibility methods (summary, AST conversions), or update tests + adapters consistently.

  2. Semiring validation error semantics changed

    • tests expect commutativity / distributivity, got identity_plus / associativity.

    Fix direction: either restore prior validation ordering/messages or relax tests to assert error code/category instead of exact property order.

  3. UQ reducer keying changed

    • tests expect reducer names (Reducer1, TestReducer), results keyed by 'MockClass'.

    Fix direction: key outputs by reducer instance name/label (or update tests to new canonical key, consistently across provenance + outputs).

  4. Temporal view null handling

    • AttributeError: 'NoneType' object has no attribute 'edges' in empty network test.

    Fix direction: add null-safe path for empty base graph in temporal view constructor/accessors.


Minimal PR patch recommendation

  1. First PR (stabilize CI):
    • add pyarrow to CI install OR skip optional tests when missing.
  2. Second PR (API compatibility pass):
    • fix Query .summary(), AST layer list handling, consistent result wrapper (count, to_pandas).
  3. Third PR (behavioral semantics):
    • semiring/UQ expectation alignment.

This sequence should convert the current “130 failed / 20 errors” into a much smaller, tractable set quickly.

@SkBlaz SkBlaz marked this pull request as ready for review April 15, 2026 16:19
@SkBlaz SkBlaz merged commit b0fd638 into copilot/find-coverage-gaps Apr 15, 2026
1 check failed
Copilot stopped work on behalf of SkBlaz due to an error April 15, 2026 16:19
Copilot AI requested a review from SkBlaz April 15, 2026 16:19
SkBlaz added a commit that referenced this pull request Apr 18, 2026
…lper-level visualization+registry tests, and CI coverage job (#1347)

* Add focused coverage tests and dedicated CI coverage job

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Fix new tests and validate focused coverage targets

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Refine tests from review feedback and simplify coverage job setup

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Address validation feedback and finalize coverage-target changes

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Incorporate final validation feedback and tighten determinism checks

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Add type hints to new tests and finalize quality cleanup

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Polish test naming and fixture typing from final review

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/a67f213a-bfa1-4b15-a7b3-b7a9f828f8de

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Initial plan (#1348)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>

* Fix CI failures: pyarrow guards, DSL API contract drift, UQ reducer keying (#1349)

* Initial plan

* Fix CI failures: pyarrow guards, reducer keying, NoNoise identity tests, get_layers helper

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Tighten from_layers() list validation: reject non-string elements with clear ValueError

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/c6cfd34e-410c-41d4-8ed4-6457769782a6

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

* Make coverage CI non-blocking while preserving coverage artifact output

Agent-Logs-Url: https://github.com/SkBlaz/py3plex/sessions/ab8ed629-10ed-403d-aaea-5ce9d18f94e8

Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: SkBlaz <10035780+SkBlaz@users.noreply.github.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.

2 participants