Fix Python discovery issue when calling sympy solver from wheel#1165
Conversation
When using the sympy visitor, the NMODL Python module by default throws an error that `NMODL_PYLIB` is not set. The solution is to set all of these env variables as soon as we load the module.
This comment has been minimized.
This comment has been minimized.
|
Need BlueBrain/spack#2320 to get merged, then the gitlab pipeline should be ✅ |
This comment has been minimized.
This comment has been minimized.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1165 +/- ##
=======================================
Coverage 88.40% 88.40%
=======================================
Files 175 175
Lines 12934 12934
=======================================
Hits 11434 11434
Misses 1500 1500 ☔ View full report in Codecov by Sentry. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1uc
left a comment
There was a problem hiding this comment.
Looks very sensible to me. My comment are all optional, please feel free to ignore them, if you think they don't make sense.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Logfiles from GitLab pipeline #195941 (:white_check_mark:) have been uploaded here! Status and direct links: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1165 +/- ##
=======================================
Coverage 87.17% 87.17%
=======================================
Files 175 175
Lines 12884 12884
=======================================
Hits 11232 11232
Misses 1652 1652 ☔ View full report in Codecov by Sentry. |
|
Minor annoyance: if we merge this, we need to add py-importlib-resources to the NMODL Spack recipe (only if we test on Python 3.8, if not, you can ignore this). |
|
That doesn't seem wrong. The dependencies changed, hence the Spack recipe needs to change. |
* Fix for Python sympy solver * Add corresponding test * Update requirements --------- Co-authored-by: Luc Grosheintz <luc.grosheintz@gmail.com>
* Fix for Python sympy solver * Add corresponding test * Update requirements --------- Co-authored-by: Luc Grosheintz <luc.grosheintz@gmail.com> NMODL Repo SHA: BlueBrain/nmodl@1baa906
(Splitting this up from #1147 as it was getting too large).
As an example (stolen from one of the notebooks):
Running this with a freshly-installed wheel on latest master (built with
python setup.py bdist_wheel) gives:Basically, due to the way loading of Python is handled, we should set the various env variables as soon as we load the module, otherwise the user may find mysterious errors.
Other changes:
importlib)BREAKPOINTstatement to activate the sympy solver)NMODL_PYLIBandNMODLHOMEenv variables (only if they are not already set!)