Refactor name mangling in NMODL ODE solver - #3543
Conversation
|
✔️ 225cc45 -> Azure artifacts URL |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #3543 +/- ##
=======================================
Coverage 68.31% 68.32%
=======================================
Files 689 689
Lines 111038 111033 -5
=======================================
- Hits 75861 75860 -1
+ Misses 35177 35173 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
✔️ 225cc45 -> artifacts URL |
|
✔️ d9e3d17 -> artifacts URL |
|
✔️ d9e3d17 -> Azure artifacts URL |
Put back whatever hackery it used before to collect the mod files, if some of the files are missing coverage I really don't care.
also add comment about using single triple quotes
…lic/refactor_coverage
|
✔️ 6059fe5 -> Azure artifacts URL |
|
✔️ 6059fe5 -> artifacts URL |
|
✔️ 8940991 -> artifacts URL |
|
✔️ 8940991 -> Azure artifacts URL |
|
✔️ 2b2f315 -> Azure artifacts URL |
|
✔️ 2b2f315 -> artifacts URL |
|
✔️ b54d8d5 -> Azure artifacts URL |
|
✔️ b54d8d5 -> artifacts URL |
|
|
✔️ b611c56 -> artifacts URL |
|
✔️ b611c56 -> Azure artifacts URL |
|
✔️ 048fbbb -> Azure artifacts URL |
|
✔️ 048fbbb -> artifacts URL |
* Improve name-mangling functions (for sympy) and add unit test. * More clean up for NMODL name-mangling and unit tests * Make variables private (in share/lib/python/neuron/nmodl/ode.py)
|
|
✔️ a8d33fc -> artifacts URL |
|
✔️ a8d33fc -> Azure artifacts URL |



Needs #3544.
Fixes #3414.
NMODL's previous way of handling identifiers was somewhat convoluted; this PR introduces 2 functions,
mangle_protected_identifiers, and its inverse,demangle_protected_identifiers, which should accomplish the same thing, in much less lines of code. The name mangling is achieved via a regex (same way as before), but this time is generalized for:sin,cos, etc.)Also sprinkled in some type hints.
Also added
test_ode.pyto coverage collection.This allows us to build NEURON with
NRN_ENABLE_NMODL=ON.TODO
integrate2c(was not using[de]mangle_identifiersbefore)