Code 2: Fix the error with Python >=3.9. Handle ruff and mypy#12
Code 2: Fix the error with Python >=3.9. Handle ruff and mypy#12marcinmiklitz merged 11 commits intomarcinmiklitz:developmentfrom
Conversation
|
Hey @andrewtarzia, I went through the PR and nothing stands out to me. The 3 tests that are failing, are you more familiar with the nature of the mismatch. If these failures indicate a completely different answer, or simply out of 2 similar choice the numerical errors shifted the balance towards the other? I haven't dig particularly deep yet. How worried we are here? |
|
Hey @marcinmiklitz, I think I have "solved" the tests. Basically, I think some math changed in the coordinate and ordering in the supercell generation and molecule ( Please review the last two commits of changes. |
Hey @andrewtarzia, thanks for solving this! I think this is a sensible explanation and solution. We've only had couple tests affected, not all of them, so it gives confidence that the differences were very small, hopefully not affecting results where larger samples are considered. Thanks! Merging this now. |
* Add workflows - will fail. * Bring in modern tooling (uv, pyproject.toml, justfile). * Update to name pywindowx - although this may need to change to pywindow? Update ignore. * Update min python version. * Use ubuntu latest. * Update env for docs. * Delete unused docs, setup and write cleaner docs - will fail until reorganisation of code. * Move to internal, has issues. * Run ruff fix on save on all. * Update import statements internally. * Add periodic table. * Add utility for examples (implemented later). * Remove doc page. * Remove autosummary docs until docs work. * Add os import (temporary). * Rename tests to standard for pytest. * Ruff fix. * Ruff fix. * Update tests to handle new interface. * Add example scripts - will not run currently. * Add a shortened HISTORY file to make example less expensive. * Code 2: Fix the error with Python >=3.9. Handle ruff and mypy (#12) * Add example init. * Handle interface, ruff and mypy. * Handle interface, ruff and mypy - remove _Shape preliminary. * Handle interface, ruff and mypy. * Handle interface, ruff and mypy. * Handle interface, ruff and mypy. * Include output of successfully built docs. * Handle mypy in docs. * Add input and output files. * Add input and output files to test rebuild and periodic handling. * Add some temp output for visualisation upon failure. --------- Co-authored-by: Marcin Miklitz <marcin.miklitz@gmail.com>
Note that the tests that fail in test_molecular seem like genuine changes in the numerical rebuild process. I wonder if changing versions actually has altered some of the math slightly? Any insight @marcinmiklitz ?
I do not think it is possible to fix mypy issues without significant changes to the data handling in pywindow, which is not in my timeframe at the moment. So I have ignored many with inline ignores.
To see an example of new docs: https://pywindow2--2.org.readthedocs.build/en/2/