-
Notifications
You must be signed in to change notification settings - Fork 189
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
Roll out ScriptInterface
#4541
Merged
Merged
Roll out ScriptInterface
#4541
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Return std::vector objects as numpy arrays and Utils::Vector objects as array_locked. Add support for Utils::Vector3i and Utils::Vector3b. Improve get_value() exception mechanism to print the types contained in a container, e.g. `std::unordered_map<int, Variant>` is printed as `std::unordered_map<int, ScriptInterface::Variant{int, Utils::Vector3d}>` to help understand why a type conversion failed.
Move the features checking logic to a dedicated file.
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
Make the script fully reproducible by sorting feature sets and removing the absolute file path and timestamp. This makes object file caching much more efficient. Cleanup outdated comments.
This PR needs to be merged before the coding day. It currently blocks the non-bonded interaction refactoring (coding day task) and the CMake |
christophlohrmann
previously approved these changes
Aug 5, 2022
reinaual
previously approved these changes
Aug 5, 2022
reinaual
previously approved these changes
Aug 5, 2022
reinaual
approved these changes
Aug 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
ScriptInterface
framework:ScriptInterface
conversion error messages clearer by printing the contents of Python containers, so as to provide a viable alternative toutils.check_type_or_throw_except()
config.hpp
and sort features alphabetically to improveccache
efficiencysystem.periodicity
,particle.fix
,particle.rotation
[1, 1, 1]
or[0, 0, 1]
src/core
andsrc/script_interface
by grouping similar features into submodulessrc/core/*.{h,c}pp
files are now for the most part declaring or using global variables (snake case filenames), whilesrc/core/*/*.{h,c}pp
mostly contain class definitions (Pascal case filenames)src/script_interface/*.{h,c}pp
files now all contain theScriptInterface
classes and helper functions, whilesrc/script_interface/*/*.{h,c}pp
contains the consumer code that bridges the core classes to the Python classes