Skip to content

Add coverage for compatibility output parsing paths#339

Merged
jan-janssen merged 4 commits into
mainfrom
copilot/add-tests-compatibility-output
May 13, 2026
Merged

Add coverage for compatibility output parsing paths#339
jan-janssen merged 4 commits into
mainfrom
copilot/add-tests-compatibility-output

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 13, 2026

This adds targeted regression coverage for the compatibility-output path introduced on this branch. The new tests exercise parsed fixture data directly instead of only checking that expected keys exist.

  • What changed

    • Added assertions for compatibility_output fixture parsing in tests/test_compatibility_file.py
    • Verified representative parsed values for:
      • MD timesteps / atom counts
      • thermo output
      • first-frame positions / velocities
      • pressure tensor mapping
    • Added coverage for the calc_dataclass type guard by asserting invalid dataclass input raises TypeError
    • Added coverage for input_control_file entries that do not replace existing commands, ensuring they are appended to lmp.in
  • Why this matters

    • Tightens coverage around the new compatibility-output behavior so regressions are caught at the interface level
    • Ensures both parsed data content and input-file generation behavior are validated, not just presence of output keys
  • Example

    np.testing.assert_array_equal(
        parsed_output["generic"]["steps"], np.arange(0, 1100, 100)
    )
    np.testing.assert_allclose(
        parsed_output["generic"]["pressures"][0], expected_first_pressure
    )
    self.assertIn("neighbor 0.3 bin\n", content)

Copilot AI and others added 3 commits May 13, 2026 10:29
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/3b5f6980-71f4-440b-ad79-6ef217b4ce49

Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/3b5f6980-71f4-440b-ad79-6ef217b4ce49

Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
Agent-Logs-Url: https://github.com/pyiron/lammpsparser/sessions/3b5f6980-71f4-440b-ad79-6ef217b4ce49

Co-authored-by: jan-janssen <3854739+jan-janssen@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented May 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.22%. Comparing base (1416ace) to head (c02fb9d).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #339      +/-   ##
==========================================
+ Coverage   89.05%   89.22%   +0.16%     
==========================================
  Files          12       12              
  Lines        1197     1197              
==========================================
+ Hits         1066     1068       +2     
+ Misses        131      129       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@jan-janssen jan-janssen marked this pull request as ready for review May 13, 2026 10:44
@jan-janssen jan-janssen self-requested a review as a code owner May 13, 2026 10:44
@jan-janssen jan-janssen merged commit 639d227 into main May 13, 2026
21 checks passed
@jan-janssen jan-janssen deleted the copilot/add-tests-compatibility-output branch May 13, 2026 10:44
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