Skip to content

Fix the implementation of include in PortNamespace.absorb#120

Merged
sphuber merged 1 commit intodevelopfrom
fix_119_expose_nested_include
Jun 27, 2019
Merged

Fix the implementation of include in PortNamespace.absorb#120
sphuber merged 1 commit intodevelopfrom
fix_119_expose_nested_include

Conversation

@sphuber
Copy link
Copy Markdown
Collaborator

@sphuber sphuber commented Jun 26, 2019

Fixes #119

Fix the implementation of include in PortNamespace.absorb

The recent introduction of support for nested namespaces in the
exclude and include rules of the PortNamespace.absorb method is
incorrect when include rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the leaf level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port have to be included as well.

@sphuber sphuber requested a review from giovannipizzi June 26, 2019 12:01
@sphuber sphuber force-pushed the fix_119_expose_nested_include branch from 601e8e7 to 27e464e Compare June 26, 2019 12:06
giovannipizzi
giovannipizzi previously approved these changes Jun 26, 2019
@sphuber
Copy link
Copy Markdown
Collaborator Author

sphuber commented Jun 26, 2019

@giovannipizzi thanks for the review, but the solution was still broken, sorry for that. I had to rewrite and add more tests. It should be good now.

@sphuber sphuber force-pushed the fix_119_expose_nested_include branch from fd13d41 to 94ee960 Compare June 27, 2019 10:12
The recent introduction of support for nested namespaces in the
`exclude` and `include` rules of the `PortNamespace.absorb` method is
incorrect when `include` rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the `leaf` level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port *have* to be included as well.
@sphuber sphuber force-pushed the fix_119_expose_nested_include branch from 94ee960 to dae8362 Compare June 27, 2019 13:03
@sphuber sphuber merged commit 1251fcf into develop Jun 27, 2019
@sphuber sphuber deleted the fix_119_expose_nested_include branch June 27, 2019 15:09
unkcpz pushed a commit to unkcpz/plumpy that referenced this pull request Dec 14, 2024
…eam#120)

The recent introduction of support for nested namespaces in the
`exclude` and `include` rules of the `PortNamespace.absorb` method is
incorrect when `include` rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the `leaf` level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port *have* to be included as well.
agoscinski pushed a commit to agoscinski/plumpy that referenced this pull request Apr 13, 2026
…eam#120)

The recent introduction of support for nested namespaces in the
`exclude` and `include` rules of the `PortNamespace.absorb` method is
incorrect when `include` rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the `leaf` level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port *have* to be included as well.
agoscinski pushed a commit that referenced this pull request Apr 13, 2026
The recent introduction of support for nested namespaces in the
`exclude` and `include` rules of the `PortNamespace.absorb` method is
incorrect when `include` rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the `leaf` level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port *have* to be included as well.
agoscinski pushed a commit that referenced this pull request Apr 13, 2026
The recent introduction of support for nested namespaces in the
`exclude` and `include` rules of the `PortNamespace.absorb` method is
incorrect when `include` rules are specified. The exclude and include
rules need to be properly unwrapped to account for nesting, however,
this needs to happen at different moments. For exclude rules, namespaces
have to be done on the `leaf` level. As soon as the rule matches exactly
the port name that is considered it should be filtered.

With the include rules it works a little different. For rules
representing nested ports, all the namespaces along the way to the leaf
port *have* to be included as well.
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.

No longer able to expose nested inputs with include

2 participants