Skip to content

test: establish baseline coverage#11

Open
sigilmakes wants to merge 3 commits into
mainfrom
test/baseline-coverage
Open

test: establish baseline coverage#11
sigilmakes wants to merge 3 commits into
mainfrom
test/baseline-coverage

Conversation

@sigilmakes

@sigilmakes sigilmakes commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator

What

Adds portable baseline coverage before the Core pipeline refactor.

Why

The staged Core pipeline refactor needs a reliable behavioural safety net first. The current tests still depended on private local_data/ pseudopotential files and did not cover several public/error paths. This PR freezes current behaviour with portable synthetic fixtures and tightens the physics assumptions around k-spacing and heavy-element detection.

Closes #10.

How to test

uv run pytest -q
uv run ruff check src tests
uv run ruff format --check src tests
uv run pre-commit run --all-files

Current local result:

37 passed
pre-commit passed: ruff check, ruff format, pytest

Changes

  • Replace local_data/ UPF parser tests with synthetic portable UPF fixtures.
  • Add CLI main() coverage without shelling out or loading a real model.
  • Add structure file loading coverage using a temporary CIF file.
  • Add structure analysis tests for transition metals, period-5 heavy elements, and lanthanides.
  • Add ML inference error-path tests.
  • Add k-mesh baseline tests that assert VASP-style KSPACING / solid-state reciprocal-lattice convention.
  • Clarify k-mesh docstrings around the reciprocal-lattice convention.
  • Change heavy-element heuristic from Z >= 57 to period 5 and heavier for SOC consideration.
  • Update README and architecture docs to describe portable test expectations, VASP-style k-spacing convention, and near-term pipeline direction.

Notes

This is a stacked draft PR based on docs/agents-md while #7 is still open. After #7 merges, this branch should be rebased onto main and the PR base updated to main before review/merge.


Written by an agent on behalf of Willow.

@sigilmakes sigilmakes force-pushed the test/baseline-coverage branch 2 times, most recently from 15212c0 to a1f79d2 Compare June 9, 2026 13:16
@sigilmakes sigilmakes marked this pull request as ready for review June 10, 2026 07:54
@sigilmakes sigilmakes requested a review from junwen94 June 10, 2026 07:54
@sigilmakes sigilmakes self-assigned this Jun 10, 2026
Replace local_data-dependent UPF parser tests with synthetic fixtures.
Add baseline coverage for CLI main, structure file loading, structure
analysis flags, ML inference error paths, and k-mesh invariants.

Refs #10
Use period-five-and-heavier elements for the heavy-element heuristic.
Make k-spacing tests assert the VASP-style reciprocal lattice convention
instead of only mirroring current numeric outputs.
@sigilmakes sigilmakes force-pushed the test/baseline-coverage branch from a1f79d2 to f535fcd Compare June 10, 2026 09:25
@sigilmakes sigilmakes changed the base branch from docs/agents-md to main June 10, 2026 09:25
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.

test: establish baseline coverage before pipeline refactor

1 participant