Repository navigation
Fix psize setSmallest and read Python version from VERSION - #325
Merged
Merged
Conversation
psize.py compared the nsmall list to 0, raising TypeError whenever the memory ceiling required a parallel decomposition, and used true division so reduced grid sizes became floats. Compare the reduced dimension and use floor division. apbs/_version.py hard-coded the version separately from the VERSION file used by CMake. Read VERSION when running from a source tree and fall back to installed package metadata. Include VERSION in the sdist. Fixes #62, #290, #234. Co-authored-by: Copilot <[email protected]> Copilot-Session: 3eaf20ea-3ac0-4701-958f-28527bf641fc
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.
This fixes two small pre-release issues.
psize.py (#62, #290)
Psize.setSmallest()compared thensmalllist to0, which raisesTypeErroron Python 3 whenever the memory ceiling forces a parallel decomposition.It also used true division, so reduced grid dimensions became floats instead of
32k+1integers.This compares the reduced dimension and uses floor division.
test/test_psize.pyreproduces theTypeErrorwithout the fix and checks the reduced dimensions.Python version (#234)
apbs/_version.pyhard-coded3.4.1separately from theVERSIONfile used by CMake.It now reads
VERSIONwhen running from a source tree and falls back to installed package metadata.setup.pyreadsVERSIONthroughapbs/_version.pywithout importing the package, andMANIFEST.inincludesVERSIONin the sdist.test/test_version.pychecks thatapbs.__version__matchesVERSIONand covers the parser.Validation:
pytest test: 226 passed, 5 skipped, 2 xfailed, 1 xpassed.VERSION, and a wheel built from the sdist reportsVersion: 3.4.1.VERSION,_version.pyreturns the installed metadata version.Fixes #62.
Fixes #290.
Fixes #234.