Skip to content

Consolidate type_utils in a way that can be reused in substitution results that need to be coerced to a specific type#438

Merged
ivanpauno merged 44 commits intomasterfrom
ivanpauno/fix-parameter-bad-interaction-frontend
Jul 29, 2020
Merged

Consolidate type_utils in a way that can be reused in substitution results that need to be coerced to a specific type#438
ivanpauno merged 44 commits intomasterfrom
ivanpauno/fix-parameter-bad-interaction-frontend

Conversation

@ivanpauno
Copy link
Copy Markdown
Member

Follow up of ros2/launch_ros#137.

This try to consolidate the launch.frontend.type_utils module, in a way it's usable from custom actions/descriptions that requires an user to specify the type.

To consolidate the coercion rules allowed I've dropped support of Union[...] and non uniform lists, we really don't need that.

I have to consolidate documentation (partially outdated), type annotations and add more test cases.

This could also be used in the future in places like:

so we always use the same rules to convert result of substitutions to specific types.

ivanpauno added 6 commits July 2, 2020 13:37
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Copy link
Copy Markdown

@hidmic hidmic left a comment

Choose a reason for hiding this comment

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

First pass, sorry for the long delay @ivanpauno !

ivanpauno and others added 17 commits July 20, 2020 14:50
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
… is_instance_of

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
… is_instance_of, coerce_to_type, coerce_list

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from hidmic July 22, 2020 20:36
@ivanpauno
Copy link
Copy Markdown
Member Author

@hidmic I'm still iterating on documentation and tests, but I've at least covered all the functions in launch.utilities.type_utils.
Can you take another look?

ivanpauno and others added 4 commits July 23, 2020 17:24
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>

Co-authored-by: Michel Hidalgo <michel@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Copy Markdown
Member Author

launch.frontend.type_utils

There's still a module called in that way, though I've moved most of the methods.
Also, a lots of the methods have been modified and renamed.

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from hidmic July 23, 2020 20:59
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
… substitution and a list of substitutions

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno ivanpauno requested a review from hidmic July 29, 2020 15:32
Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
@ivanpauno
Copy link
Copy Markdown
Member Author

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@ivanpauno ivanpauno changed the title Fix parameter bad interaction frontend Consolidate type_utils in a way that can be reused for substitutions that need to be converted to a specific type Jul 29, 2020
@ivanpauno ivanpauno changed the title Consolidate type_utils in a way that can be reused for substitutions that need to be converted to a specific type Consolidate type_utils in a way that can be reused in substitution results that need to be coerced to a specific type Jul 29, 2020
@ivanpauno ivanpauno merged commit 2159a5a into master Jul 29, 2020
@delete-merged-branch delete-merged-branch bot deleted the ivanpauno/fix-parameter-bad-interaction-frontend branch July 29, 2020 20:21
@dirk-thomas
Copy link
Copy Markdown
Member

It seems that this change resulted in a regression across all platforms: see e.g. https://ci.ros2.org/view/nightly/job/nightly_linux_debug/1641/testReport/test_launch_ros.test.test_launch_ros.frontend/test_node_frontend/test_launch_remapping_xml/

@ivanpauno Please address asap.

jacobperron pushed a commit that referenced this pull request Sep 10, 2021
…sults that need to be coerced to a specific type (#438)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
jacobperron added a commit that referenced this pull request Sep 10, 2021
Part of backporting #438 to Foxy.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron added a commit that referenced this pull request Sep 10, 2021
Part of backporting #438 to Foxy.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
jacobperron pushed a commit that referenced this pull request Nov 11, 2021
…sults that need to be coerced to a specific type (#438)

Signed-off-by: Ivan Santiago Paunovic <ivanpauno@ekumenlabs.com>
jacobperron added a commit that referenced this pull request Nov 11, 2021
Part of backporting #438 to Foxy.

Signed-off-by: Jacob Perron <jacob@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants