Skip to content

Potential - strip lines for comparison#299

Merged
jan-janssen merged 1 commit intomainfrom
strip
Jan 24, 2026
Merged

Potential - strip lines for comparison#299
jan-janssen merged 1 commit intomainfrom
strip

Conversation

@jan-janssen
Copy link
Copy Markdown
Member

@jan-janssen jan-janssen commented Jan 24, 2026

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced LAMMPS configuration file parsing to correctly handle and recognize configuration directives with leading or trailing whitespace. This improvement ensures that critical configuration parameters such as units, atom style, and dimensionality settings are accurately identified and processed regardless of formatting inconsistencies in the input files.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Walkthrough

The code now uses l.strip().startswith(...) instead of l.startswith(...) when matching LAMMPS configuration keywords ("units", "atom_style", "dimension"). This allows the matching logic to recognize configuration lines that have leading or trailing whitespace before the keyword.

Changes

Cohort / File(s) Summary
Whitespace-aware LAMMPS configuration matching
src/pyiron_lammps/compatibility/file.py
Modified three keyword matching checks to use .strip() before .startswith() for "units", "atom_style", and "dimension" lines, enabling recognition of indented or whitespace-prefixed configuration entries.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

A rabbit hops through whitespace trim,
Where LAMMPS lines once started grim,
Now .strip() makes the matching keen,
Leading spaces—no longer unseen! 🐰✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title directly describes the main change: stripping whitespace from lines before comparison in LAMMPS configuration handling.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 24, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.33%. Comparing base (a51e7f6) to head (f43d535).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #299   +/-   ##
=======================================
  Coverage   82.33%   82.33%           
=======================================
  Files          11       11           
  Lines        1155     1155           
=======================================
  Hits          951      951           
  Misses        204      204           

☔ 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 merged commit de41322 into main Jan 24, 2026
21 checks passed
@jan-janssen jan-janssen deleted the strip branch January 24, 2026 22:55
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