-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure pure-Python implementations **do not** invoke code from the binary extension. #160
Commits on Jan 5, 2020
-
Renaming files that have binary extension speedups.
The goal is to replace the original names with a wrapper that **only** exports the parts needed elsewhere and put the pure Python implementations by themselves. Done via: ``` git mv _curve_helpers.py _py_curve_helpers.py git mv _geometric_intersection.py _py_geometric_intersection.py git mv _helpers.py _py_helpers.py git mv _intersection_helpers.py _py_intersection_helpers.py git mv _surface_helpers.py _py_surface_helpers.py git mv _surface_intersection.py _py_surface_intersection.py ``` Found these modules via: ``` git grep -l 'if _speedup is None' ```
Configuration menu - View commit details
-
Copy full SHA for a321767 - Browse repository at this point
Copy the full SHA a321767View commit details -
These are intended to stand in for the previous modules, and the rename is intentional (and temporary) to suss out places where the imports are relying on pure Python parts vs. parts that could either by Python or speedup.
Configuration menu - View commit details
-
Copy full SHA for e4fb7be - Browse repository at this point
Copy the full SHA e4fb7beView commit details -
Configuration menu - View commit details
-
Copy full SHA for 850e93d - Browse repository at this point
Copy the full SHA 850e93dView commit details -
Configuration menu - View commit details
-
Copy full SHA for cff9a2b - Browse repository at this point
Copy the full SHA cff9a2bView commit details -
Configuration menu - View commit details
-
Copy full SHA for e83300a - Browse repository at this point
Copy the full SHA e83300aView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4c1561 - Browse repository at this point
Copy the full SHA c4c1561View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7e03452 - Browse repository at this point
Copy the full SHA 7e03452View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9554d99 - Browse repository at this point
Copy the full SHA 9554d99View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5ee32df - Browse repository at this point
Copy the full SHA 5ee32dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a4ba4d7 - Browse repository at this point
Copy the full SHA a4ba4d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for abbfa6d - Browse repository at this point
Copy the full SHA abbfa6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for da47de7 - Browse repository at this point
Copy the full SHA da47de7View commit details -
Renaming test files impacted by rename.
Done via: ``` git mv test__curve_helpers.py test_py_curve_helpers.py git mv test__geometric_intersection.py test_py_geometric_intersection.py git mv test__helpers.py test_py_helpers.py git mv test__intersection_helpers.py test_py_intersection_helpers.py git mv test__surface_helpers.py test_py_surface_helpers.py git mv test__surface_intersection.py test_py_surface_intersection.py ``` No code edits were made in this commit, but some will need to be done to fix imports and split out the "wrap" portions.
Configuration menu - View commit details
-
Copy full SHA for 6b01ee7 - Browse repository at this point
Copy the full SHA 6b01ee7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15076fd - Browse repository at this point
Copy the full SHA 15076fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b8908b - Browse repository at this point
Copy the full SHA 4b8908bView commit details -
Configuration menu - View commit details
-
Copy full SHA for ed0b554 - Browse repository at this point
Copy the full SHA ed0b554View commit details -
Configuration menu - View commit details
-
Copy full SHA for cbafd53 - Browse repository at this point
Copy the full SHA cbafd53View commit details -
Configuration menu - View commit details
-
Copy full SHA for 682bad7 - Browse repository at this point
Copy the full SHA 682bad7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30dc547 - Browse repository at this point
Copy the full SHA 30dc547View commit details -
Configuration menu - View commit details
-
Copy full SHA for 193640d - Browse repository at this point
Copy the full SHA 193640dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7b050cc - Browse repository at this point
Copy the full SHA 7b050ccView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8dd88fb - Browse repository at this point
Copy the full SHA 8dd88fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb1d9a1 - Browse repository at this point
Copy the full SHA fb1d9a1View commit details -
Renaming all
test_py*
totest__py*
to match convention.Done via: ``` cd test/unit/ git mv test_py_curve_helpers.py test__py_curve_helpers.py git mv test_py_geometric_intersection.py test__py_geometric_intersection.py git mv test_py_helpers.py test__py_helpers.py git mv test_py_intersection_helpers.py test__py_intersection_helpers.py git mv test_py_surface_helpers.py test__py_surface_helpers.py git mv test_py_surface_intersection.py test__py_surface_intersection.py ```
Configuration menu - View commit details
-
Copy full SHA for 7cc3748 - Browse repository at this point
Copy the full SHA 7cc3748View commit details
Commits on Jan 6, 2020
-
In the process had to fix a runtime import of a Python module within `_speedup.pyx`.
Configuration menu - View commit details
-
Copy full SHA for 07a2650 - Browse repository at this point
Copy the full SHA 07a2650View commit details -
Configuration menu - View commit details
-
Copy full SHA for 979d287 - Browse repository at this point
Copy the full SHA 979d287View commit details -
Configuration menu - View commit details
-
Copy full SHA for 21e4b2e - Browse repository at this point
Copy the full SHA 21e4b2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for e6de54d - Browse repository at this point
Copy the full SHA e6de54dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 518b1c7 - Browse repository at this point
Copy the full SHA 518b1c7View commit details -
Renaming
Test__{name}
toTest_{name}
.This was for functions that also occurred as `_speedup.{name}` that have now been renamed (from `_{name}`) to `{name}`. Also cleaned up the `_{name}` references in documentation wherever I could find references.
Configuration menu - View commit details
-
Copy full SHA for 8fa1eb1 - Browse repository at this point
Copy the full SHA 8fa1eb1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 074bd1b - Browse repository at this point
Copy the full SHA 074bd1bView commit details -
Removing
_wrap*
prefixes in files.This was only temporary to ensure all the old names had been properly moved. Done via: ``` git mv src/python/bezier/_wrap_curve_helpers.py src/python/bezier/_curve_helpers.py git mv src/python/bezier/_wrap_geometric_intersection.py src/python/bezier/_geometric_intersection.py git mv src/python/bezier/_wrap_helpers.py src/python/bezier/_helpers.py git mv src/python/bezier/_wrap_intersection_helpers.py src/python/bezier/_intersection_helpers.py git mv src/python/bezier/_wrap_surface_helpers.py src/python/bezier/_surface_helpers.py git mv src/python/bezier/_wrap_surface_intersection.py src/python/bezier/_surface_intersection.py git mv tests/unit/test__wrap_curve_helpers.py tests/unit/test__curve_helpers.py git mv tests/unit/test__wrap_geometric_intersection.py tests/unit/test__geometric_intersection.py git mv tests/unit/test__wrap_helpers.py tests/unit/test__helpers.py git mv tests/unit/test__wrap_intersection_helpers.py tests/unit/test__intersection_helpers.py git mv tests/unit/test__wrap_surface_helpers.py tests/unit/test__surface_helpers.py git mv tests/unit/test__wrap_surface_intersection.py tests/unit/test__surface_intersection.py ``` A subsequent commit will update the **references** to these files.
Configuration menu - View commit details
-
Copy full SHA for ccd8d30 - Browse repository at this point
Copy the full SHA ccd8d30View commit details -
Updating (most) references to
_wrap*
prefixed modules.Done via: ``` git grep -l _wrap -- ':(exclude)*.c' | xargs sed -i s/_wrap/''/g ``` Still need to follow-up to: - Resolve lint errors due to alphabetical ordering of imports - Re-generate `*.c` files with Cython
Configuration menu - View commit details
-
Copy full SHA for 6983002 - Browse repository at this point
Copy the full SHA 6983002View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7750410 - Browse repository at this point
Copy the full SHA 7750410View commit details -
Configuration menu - View commit details
-
Copy full SHA for 937de5d - Browse repository at this point
Copy the full SHA 937de5dView commit details -
Slipped in some changes where `black` does not have an "opinion". In particular, tried to make sure there is an empty line after the LICENSE header and make sure there are 2 empty lines between imports and constants.
Configuration menu - View commit details
-
Copy full SHA for da346df - Browse repository at this point
Copy the full SHA da346dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f49f9d - Browse repository at this point
Copy the full SHA 4f49f9dView commit details -
Modifying **when** the
slow
pytest marker gets applied.- Removing the `HAS_SPEEDUP` check since the tests for the pure Python implementations now eschew usage of speedups (even if present) - Explicitly re-defining the marked methods in the subclass to avoid marking them as slow
Configuration menu - View commit details
-
Copy full SHA for e55f549 - Browse repository at this point
Copy the full SHA e55f549View commit details -
Resolving pylint issue with no-op method re-definitions.
Pylint (correctly) flagged them as `useless-super-delegation` and so I disabled the rule for the few methods where I re-defined methods to drop the `slow` mark in pytest.
Configuration menu - View commit details
-
Copy full SHA for d7421e2 - Browse repository at this point
Copy the full SHA d7421e2View commit details