Simplify Python extension loading and other Python improvements#1456
Simplify Python extension loading and other Python improvements#1456ischoegl merged 6 commits intoCantera:mainfrom
Conversation
Let Cython handle the complexity of loading the extension module after Python has already been initialized. In the case of a non-Python main program, all we have to do is initialize Python and import the Cantera Python module.
Codecov Report
@@ Coverage Diff @@
## main #1456 +/- ##
==========================================
+ Coverage 69.86% 69.92% +0.06%
==========================================
Files 373 377 +4
Lines 56684 57262 +578
Branches 18883 19151 +268
==========================================
+ Hits 39600 40043 +443
- Misses 14571 14669 +98
- Partials 2513 2550 +37
... and 26 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
I created an issue (#1457) to track the needed feature. I think that's preferable to a to-do item buried somewhere in the code. |
There was a problem hiding this comment.
I created an issue (#1457) to track the needed feature. I think that's preferable to a to-do item buried somewhere in the code.
Thanks for creating the issue! I agree that it is preferable to a todo.
It did, however, occur to me that SolutionArray needs a similar sentinel, somewhere around here:
cantera/interfaces/cython/cantera/composite.py
Lines 558 to 559 in fbfd93f
Even prior to the introduction of C++
SolutionArray, adding species would have created inconsistencies in stored data.
PS: Another item I noticed is that we may want to test with Cython 3.0 again?
Currently used for testing pre-release versions of Cython
|
I've added the Python I've also added a new CI job that runs only after pushes to |
Changes proposed in this pull request
NotImplementedErrorto Python nativeNotImplementedError_SolutionBase._referencesChecklist
scons build&scons test) and unit tests address code coverage