Issue #14 fix with decorated methods, boosted functions and multilevel
Created originally on Bitbucket by PierreBlancfat (Pierre Blanc-fatin)
Was already merged in Bitbucket before import, marked as merged by the import user
This pull request is a fix for the issue #14 (closed). Only local locally imported functions are supported yet. Now decorated methods and functions can use imported functions. This PR also support multilevel imports (i.e. a function needed by a function used by a decorated function).
I did a make black.
The coverage has passed from 91% to 92% and most of the code I have written is covered.
-
Fix issue 14, local import only
-
Issue #14 (closed) : multiple levels of import supported
-
Issue #14 (closed) imports supported by boosted functions + reorganisation + tests
Of course boosted functions support multi-levels of import as jitted function. The reorganisation was done for factoring 2 identical functions in analyse_aot() and analyse_jit(). There is a new test about multi-levels import in boosted function.
-
Report bug ModuleNotFound with a jitted method that use local imported functions
To have the error run 'make clean; pytest test_justintime.py -s' I don't understand why function at line 277 in transonic.util.py (i.e "spec.loader.exec_module(module)") doesn't find the module imported by the module in its parameter" I've written just before this line a test that looks for the existence of this module, and the test gives me a positive existence
In this commit I have only kept the test that give me this error (in test_justintime.py). Be aware that this commit contains other unrelated changes like a factorisation of the function "filter_external_code"
-
Fix ModuleNotFoundError
-
Issue #14 (closed) Decorated methods can use locally imported functions
In this commit I have changed get_exterior_code() in analyse/init.py to resolve the double files writting problem . I have also added a test for boosted methods that use a locally imported function. And finally I have fixed the boosted functions name problem.