-
Notifications
You must be signed in to change notification settings - Fork 562
Support cython functions through Initializer()
#2421
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2421 +/- ##
=======================================
Coverage 85.89% 85.90%
=======================================
Files 617 617
Lines 76198 76204 +6
=======================================
+ Hits 65453 65465 +12
+ Misses 10745 10739 -6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
| try: | ||
| _args = inspect.getfullargspec(init.func) | ||
| except: | ||
| # Inspect doesn't work for some built-in callables (notably |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does one of the new tests check against this assumption?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes: test_initializer.py:531 (test_no_argspec)
Fixes #2374 .
Summary/Motivation:
This resolves issues where
Initializerdid not correctly identify all functions (notably cythonized functions). This updates the logic for processing initialization functions and expands theInitializer()unit tests.Changes proposed in this PR:
Initializerunit testspyomo.core.__init__.pythat was preventing the import ofpyomo.core.utilLegal Acknowledgement
By contributing to this software project, I have read the contribution guide and agree to the following terms and conditions for my contribution: