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 keys to ModuleManager #326

Merged
merged 14 commits into from
Dec 8, 2023
Merged

Add keys to ModuleManager #326

merged 14 commits into from
Dec 8, 2023

Conversation

keceli
Copy link
Contributor

@keceli keceli commented Dec 7, 2023

PR Type

  • Breaking change
  • Feature
  • Patch

Brief Description

My intention was to enable iteration for ModuleManager in Python. The python bindings required for that is commented out in this PR as it is throwing double free or corruption (out) when tested.

Instead of that this PR adds keys method as suggested by @jboschen to return a vector of keys for the ModuleManager and python bindings for __getitem__ to enable accessing the modules with [] using the key.

Not In Scope

PR Checklist

@jwaldrop107
Copy link
Member

The docs build test can be fixed by setting sphinx_rtd_theme==1.3.0 in docs/requirements.txt.

@keceli
Copy link
Contributor Author

keceli commented Dec 7, 2023

The docs build test can be fixed by setting sphinx_rtd_theme==1.3.0 in docs/requirements.txt.

Thanks @jwaldrop107, added.

Copy link
Member

@ryanmrichard ryanmrichard left a comment

Choose a reason for hiding this comment

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

A couple of minor tweaks and then this is r2g!

include/pluginplay/module_manager.hpp Outdated Show resolved Hide resolved
src/pluginplay/detail_/module_manager_pimpl.hpp Outdated Show resolved Hide resolved
src/pluginplay/module_manager.cpp Outdated Show resolved Hide resolved
src/python/export_module_manager.cpp Outdated Show resolved Hide resolved
src/python/export_module_manager.cpp Outdated Show resolved Hide resolved
src/python/export_pluginplay.hpp Outdated Show resolved Hide resolved
Copy link
Member

@ryanmrichard ryanmrichard left a comment

Choose a reason for hiding this comment

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

This LGTM after you drop the noexcept qualifiers from keys.

include/pluginplay/module_manager.hpp Outdated Show resolved Hide resolved
src/pluginplay/detail_/module_manager_pimpl.hpp Outdated Show resolved Hide resolved
src/pluginplay/module_manager.cpp Outdated Show resolved Hide resolved
@keceli keceli merged commit 6c05005 into master Dec 8, 2023
5 checks passed
@keceli keceli deleted the more_pybindings branch December 8, 2023 17:21
@ryanmrichard
Copy link
Member

🚀 [bumpr] Bumped! New version:v1.0.17 Changes:v1.0.16...v1.0.17

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