nmodl icon indicating copy to clipboard operation
nmodl copied to clipboard

Homogenize finding our components.

Open matz-e opened this issue 1 year ago • 13 comments

We currently rely on two files being present in predefined directories:

  • nrnunits.lib
  • libpywrapper.so (or similar)

These are searched for in:

  • CMake's binary directory for NMODL
  • CMake's install directory for NMODL
  • The environment variable NMODLHOME

Leading to some acrobatics to always set NMODLHOME correctly. This PR attempts to also find the above files relative to the NMODL executable, in the hope that some use cases of NMODLHOME can be removed.

It will now also treat nrnunits.lib and libpywrapper.so the same, before only the former was looked for in multiple directories, while the latter relied on the environment variable.

matz-e avatar Jul 10 '24 16:07 matz-e

Codecov Report

Attention: Patch coverage is 41.66667% with 7 lines in your changes missing coverage. Please review.

Project coverage is 86.90%. Comparing base (b91c0ea) to head (62a5a49). Report is 158 commits behind head on master.

Files with missing lines Patch % Lines
src/pybind/pyembed.cpp 0.00% 3 Missing :warning:
src/config/config.h 50.00% 2 Missing :warning:
src/parser/main_units.cpp 0.00% 1 Missing :warning:
src/visitors/main.cpp 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1336      +/-   ##
==========================================
+ Coverage   86.82%   86.90%   +0.07%     
==========================================
  Files         179      179              
  Lines       13684    13667      -17     
==========================================
- Hits        11881    11877       -4     
+ Misses       1803     1790      -13     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Jul 10 '24 16:07 codecov[bot]

@matz-e : Our CI doesn't cover windows. If you have option and could check if this approach/function works on windows then it would be great!

At least with MSVC, the majority of the code does not even compile...

matz-e avatar Jul 12 '24 11:07 matz-e

@pramodk I generated a tiny reproducer on Win11/MSVC that does what it should and adjusted the code accordingly.

matz-e avatar Jul 12 '24 11:07 matz-e

thanks for checking! 👍

pramodk avatar Jul 12 '24 12:07 pramodk

Logfiles from GitLab pipeline #223137 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot avatar Jul 22 '24 20:07 bbpbuildbot

Logfiles from GitLab pipeline #223205 (:no_entry:) have been uploaded here!

Status and direct links:

bbpbuildbot avatar Jul 23 '24 10:07 bbpbuildbot

This is obsolete.

matz-e avatar Mar 25 '25 08:03 matz-e