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

Script interface maintenance #4121

Merged
merged 15 commits into from
Mar 1, 2021

Conversation

jngrad
Copy link
Member

@jngrad jngrad commented Feb 24, 2021

Description of changes:

  • fix regressions introduced in the last script interface refactor
  • add python dict to the list of types allowed in the script interface (gets converted to std::unordered_map<int, Variant>)
  • make coupling-based fields throw an error when calling a coupling parameter setter, instead of silently ignoring the new value (the coupling object is const), and take a dict instead of having the user manually cast dict_items to list (API change)
  • improve testing of field-based constraints and shapes

Iterating a dict generates a list of keys, so it is converted to
std::vector<Variant> instead of std::unordered_map<Variant,Variant>.
Fixes regressions from 7414db9:
typo in member name and incorrect serialization.
A coupling object is created from the parameters during construction
of a field object. Changing the coupling parameters later doesn't
update the coupling object.
src/script_interface/get_value.hpp Outdated Show resolved Hide resolved
src/script_interface/get_value.hpp Outdated Show resolved Hide resolved
src/shapes/unit_tests/NoWhere_test.cpp Outdated Show resolved Hide resolved
src/shapes/unit_tests/NoWhere_test.cpp Outdated Show resolved Hide resolved
@KaiSzuttor KaiSzuttor added the automerge Merge with kodiak label Mar 1, 2021
@kodiakhq kodiakhq bot merged commit 17b310e into espressomd:python Mar 1, 2021
@jngrad jngrad deleted the script_interface_maintenance branch March 1, 2021 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants