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

Add helper for parsing tuples using nanobind #3025

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

mgeplf
Copy link
Collaborator

@mgeplf mgeplf commented Aug 2, 2024

  • This can also be used for parsing args

@mgeplf mgeplf force-pushed the nanobind-parse-tuple branch from 4e5864d to 72584bc Compare August 2, 2024 09:34
Copy link

✔️ 72584bc -> Azure artifacts URL

Copy link

codecov bot commented Aug 2, 2024

Codecov Report

Attention: Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 67.27%. Comparing base (72f9ec4) to head (72584bc).

Files Patch % Lines
src/nrnpython/utils.hpp 87.50% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3025      +/-   ##
==========================================
- Coverage   67.27%   67.27%   -0.01%     
==========================================
  Files         572      573       +1     
  Lines      104944   104944              
==========================================
- Hits        70605    70597       -8     
- Misses      34339    34347       +8     

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

@bbpbuildbot

This comment has been minimized.

src/nrnpython/utils.hpp Outdated Show resolved Hide resolved
src/nrnpython/utils.hpp Outdated Show resolved Hide resolved
Copy link
Collaborator

@1uc 1uc left a comment

Choose a reason for hiding this comment

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

Minor improvements, w.r.t. naming/error messages would be nice. Other than that I think it'll provide a useful building block for modernizing a particular pattern found frequently in our code.

src/nrnpython/utils.hpp Outdated Show resolved Hide resolved
@bbpbuildbot

This comment has been minimized.

@mgeplf mgeplf force-pushed the nanobind-parse-tuple branch from 2bfe2e2 to 8ab8a6c Compare August 21, 2024 09:08
@mgeplf mgeplf force-pushed the nanobind-parse-tuple branch from 8ab8a6c to 63e575a Compare August 21, 2024 09:16
@bbpbuildbot

This comment has been minimized.

@bbpbuildbot

This comment has been minimized.

Copy link

✔️ 63e575a -> Azure artifacts URL

Copy link

Copy link

✔️ 738ff1c -> Azure artifacts URL

@bbpbuildbot

This comment has been minimized.

@mgeplf
Copy link
Collaborator Author

mgeplf commented Aug 22, 2024

@alkino / @1uc I seem to be getting errors with nanobind not being available:
https://github.com/neuronsimulator/nrn/actions/runs/10488896362/job/29052319171#step:18:2088

I'm confused as to why the tests are "automatically" including nanobind:
/usr/bin/clang++-18 -DCORENRN_BUILD=0 -DHAVE_CONFIG_H -DMPICH_SKIP_MPICXX=1 -DMPI_NO_CPPBIND=1 -DNRN_ENABLE_THREADS -DOMPI_SKIP_MPICXX=1 -DUSE_PYTHON -I/home/gevaert/tmp/nrn/src/ivoc [...] -isystem /home/gevaert/tmp/nrn/external/nanobind/include -ferror-limit=100000 -openmp-simd -g -O0 -std=c++17 -Werror=return-type -Wno-deprecated-non-prototype -pthread -o test/CMakeFiles/testneuron.dir/unit_tests/utils/cast_tuple.cpp.o -c /home/gevaert/tmp/nrn/test/unit_tests/utils/cast_tuple.cpp",
without it being specified for the tests?

My plan to deal with it is to only include the cast_tuple.cpp test when it's being compiled with python.
Give that, is there a better place to put the tests?

@bbpbuildbot

This comment has been minimized.

@alkino alkino marked this pull request as ready for review November 20, 2024 14:42
Copy link

✔️ 0df381e -> Azure artifacts URL

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.

4 participants