Skip to content

fix(generate_parameter_library_py): nested mappings double dot bug#275

Open
natrad100 wants to merge 1 commit intoPickNikRobotics:mainfrom
greenroom-robotics:nathan/fix-multi-nested-maps-generate-py
Open

fix(generate_parameter_library_py): nested mappings double dot bug#275
natrad100 wants to merge 1 commit intoPickNikRobotics:mainfrom
greenroom-robotics:nathan/fix-multi-nested-maps-generate-py

Conversation

@natrad100
Copy link

  • fixes a bug with nested mapping of parameters in python (removes the double dot bug)

Minor bug where two dots appear where only a single dot should.

param_name = f"{self.prefix_}nested_param.{value_1}..{value_2}.inner_param"

now

param_name = f"{self.prefix_}nested_param.{value_1}.{value_2}.inner_param"

Let me know if you'd like me to re-write the test to align better with what you have (or remove)

* allows for nested mapping of parameters in python (removes the double dot bug)
@natrad100 natrad100 changed the title fix(generate_parameter_library_py): nested mappings double dot bug (#10) fix(generate_parameter_library_py): nested mappings double dot bug Sep 2, 2025
Copy link
Collaborator

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

I see the issue also in the current example_python.

But instead of writing a pytest for the exported code, what do you think of adding integration tests
#25?

Copy link
Collaborator

@christophfroehlich christophfroehlich left a comment

Choose a reason for hiding this comment

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

I again had a look. I think the unit test you've added is fine.

  • Can you please merge the main branch into your fork's branch? (github does not allow maintainers to change branches from an organization; you also could add me as contributor to the respective repo)
  • Can you remove the "fix" in the name and comments of the test file? (after it's merged, there is no fix any more).

Thanks!

@Mat198
Copy link

Mat198 commented Mar 11, 2026

@christophfroehlich , I reviewed the PR and it LGTM. It solved issue #307.

I think a test comparing the internal value from generate_parameter_library with the actual node value, using the get_parameter function, would be nice. Something like this. This ensures the issue related to #307 is properly tested.

@christophfroehlich
Copy link
Collaborator

I think a test comparing the internal value from generate_parameter_library with the actual node value, using the get_parameter function, would be nice. Something like this. This ensures the issue related to #307 is properly tested.

Oh this is great, do you mind polishing the file and opening a PR? Even if some test cases fails, which are fixed then here..

@Mat198
Copy link

Mat198 commented Mar 11, 2026

I think a test comparing the internal value from generate_parameter_library with the actual node value, using the get_parameter function, would be nice. Something like this. This ensures the issue related to #307 is properly tested.

Oh this is great, do you mind polishing the file and opening a PR? Even if some test cases fails, which are fixed then here..

I can do that! What do you mean by "polishing the file"? Are there guidelines for the tests?

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.

Parameter callback fails to update nested parameters on python

3 participants