Address PR review feedback: code style and validation fixes#7
Merged
skilledwolf merged 2 commits intoFixes_B_fieldfrom Dec 3, 2025
Merged
Address PR review feedback: code style and validation fixes#7skilledwolf merged 2 commits intoFixes_B_fieldfrom
skilledwolf merged 2 commits intoFixes_B_fieldfrom
Conversation
…g, grammar, unused variable Co-authored-by: skilledwolf <18141588+skilledwolf@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Fix sign and indexing issues in quantum Hall matrix elements
Address PR review feedback: code style and validation fixes
Dec 3, 2025
There was a problem hiding this comment.
Pull request overview
This pull request addresses code quality and consistency issues across the quantumhall_matrixelements package. The changes are primarily focused on code cleanup, modernization, and improved validation, with no functional logic changes to the core algorithms.
Key changes:
- Modernized caching by replacing
lru_cache(maxsize=None)withfunctools.cache(Python 3.9+ feature) - Removed unnecessary string quotes from type annotations (leveraging
from __future__ import annotations) - Added input validation for
sign_magneticfieldparameter and cleaned up unused variable assignments - Fixed code style issues including trailing whitespace, import ordering, and comment accuracy
Reviewed changes
Copilot reviewed 8 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
tests/test_validation.py |
Updated comment to accurately reflect the 3e-3 tolerance used in assertion; added blank lines for PEP 8 compliance |
tests/test_exchange_legendre.py |
Fixed import statement ordering to follow alphabetical sorting convention |
src/quantumhall_matrixelements/planewave.py |
Removed unnecessary quotes from type annotations; added input validation for sign_magneticfield; removed trailing whitespace |
src/quantumhall_matrixelements/exchange_legendre.py |
Replaced lru_cache with cache decorator; removed unused Veff assignment in Coulomb case; removed trailing whitespace; removed unnecessary quotes from type annotations |
src/quantumhall_matrixelements/exchange_hankel.py |
Replaced lru_cache with cache decorator; removed unnecessary quotes from type annotations |
src/quantumhall_matrixelements/diagnostic.py |
Removed unnecessary quotes from type annotations |
src/quantumhall_matrixelements/__init__.py |
Fixed import ordering (standard library, then local imports); removed unnecessary quotes from type annotations |
pyproject.toml |
Removed trailing whitespace from authors line |
README.md |
Fixed grammar: changed "wavefunction used" to "wavefunction is used" |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
skilledwolf
approved these changes
Dec 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Addresses unresolved review comments from PR #2 review thread.
Changes
planewave.py,exchange_legendre.py,pyproject.tomlsign_magneticfieldvalidation inget_form_factors()public APIVeff = Noneassignment inexchange_legendre.pytest_validation.py(tolerance is 3e-3, not 1e-4)lru_cache(maxsize=None)→cache, removed unnecessary string quotes from type annotationsAll 18 tests pass.
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.