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

Test separately built catalogues #1748

Merged
merged 14 commits into from
Nov 26, 2021
Merged

Conversation

bcumming
Copy link
Member

@bcumming bcumming commented Nov 8, 2021

  • add a test that tests that a catalogue built separately can be loaded via the Python interface
  • further simplification of dynamic library support
    • move all platform-specific code into the cpp implementation and out of header.

thorstenhater and others added 12 commits October 6, 2021 19:45
- Merge branch 'test_catalogue'
- move code that directly handles dl_* inside a translation unit:
    - avoid poluting other translation units with system headers.
    - remove risk of multiple definitions of functions if the dl_* code
      was ever used in more than one translation unit.
- make test that checks whether a catalogue can be loaded in python a stand alone script
- remove redundant CMake requirement that Arbor is being built on UNIX because
  Arbor only supports UNIX platforms, and the ARB_HAVE_DL definition implied
  that it was possible to build Arbor without it set (which wasn't true)
@bcumming bcumming added the test Unit tests, validation tests, test coverage, test quality. label Nov 8, 2021
namespace arb {
namespace util {

struct dl_handle {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is redundant now, it was meant as an opaque handle, but if it's not exposed, it can go.

print('ERROR: unable to open catalogue file')
sys.exit(1)

print(ctypes.CDLL(catname))
Copy link
Contributor

Choose a reason for hiding this comment

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

This is also redundant: Debugging left-overs.

arbor/util/dylib.cpp Show resolved Hide resolved
#!/usr/bin/env python3

import argparse
import ctypes
Copy link
Contributor

Choose a reason for hiding this comment

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

This can also go.

@noraabiakar
Copy link
Contributor

This PR updates pybind11, can we add that to the PR message with the version info?

@bcumming
Copy link
Member Author

@noraabiakar I can't understand why the PR shows pybind11 being updated: the pybind11 commit in the branch and in master are exactly the same, and the changes shown in the "Files changed" tab show pybind11 being updated to that same commit.

So I don't think anything is actually being changed. It looks like GitHub is getting confused by the slightly convoluted history of the commits in this PR.

Copy link
Contributor

@thorstenhater thorstenhater left a comment

Choose a reason for hiding this comment

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

Apart from a tiny typo and the pybind divergence everything's well.

arbor/util/dylib.cpp Show resolved Hide resolved
}

} // namespace util
} // namespace arbo
Copy link
Contributor

Choose a reason for hiding this comment

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

arbo?

@akuesters akuesters added this to the v0.6 milestone Nov 24, 2021
Copy link
Contributor

@thorstenhater thorstenhater left a comment

Choose a reason for hiding this comment

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

pybind11 malaise clarified offline, all good.

@bcumming bcumming merged commit aabaa87 into arbor-sim:master Nov 26, 2021
bcumming added a commit to bcumming/arbor that referenced this pull request Dec 3, 2021
* add a test that tests that a catalogue built separately can be loaded via the Python interface
* further simplification of dynamic library support
  * move all platform-specific code into the cpp implementation and out of header.
@bcumming bcumming deleted the test-catalogue branch February 22, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Unit tests, validation tests, test coverage, test quality.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants