Skip to content
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

Clean nocmodl_mod_to_cpp by doing sed in-place #3238

Closed
wants to merge 1 commit into from

Conversation

alkino
Copy link
Member

@alkino alkino commented Nov 21, 2024

No description provided.

Copy link

sonarcloud bot commented Nov 21, 2024

${PROJECT_BINARY_DIR}/share/nrn/lib/nrnunits.lib
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/src/nrniv)
"${source_dir}/${modfile_basename}.mod" ${NRN_NMODL_--neuron} -o "${target_dir}"
COMMAND sed -i -e ${NOCMODL_SED_EXPR} "${target_dir}/${modfile_basename}.cpp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vaguely remember macs having special demands about -i.

Copy link
Member Author

@alkino alkino Nov 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You seem to be true

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like that it moves generated files into the build directory, we could bypass the issue by copying to $build_dir/$mod.cpp.tmp and then use sed to create $build_dir/$mod.cpp.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I did this patch the first time I vaguely remember that doing -i -e was how I fixed it.

Copy link

codecov bot commented Nov 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.07%. Comparing base (7f38f75) to head (d6b84bf).
Report is 32 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3238   +/-   ##
=======================================
  Coverage   67.07%   67.07%           
=======================================
  Files         569      569           
  Lines      111141   111141           
=======================================
  Hits        74549    74549           
  Misses      36592    36592           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

✔️ d6b84bf -> Azure artifacts URL

@alkino alkino closed this Dec 10, 2024
@alkino alkino deleted the cornu/sed_in_place branch December 10, 2024 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants