-
Notifications
You must be signed in to change notification settings - Fork 32
🐛 ooil can now escape quadruple $ used by OsparcVariableIdentifier
#8118
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
Merged
mergify
merged 9 commits into
ITISFoundation:master
from
GitHK:pr-osparc-ooil-escape-additional-env-vars
Jul 18, 2025
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
66a231a
quadruple dollar escape
844b0f4
removed patch solution
2dc3eb9
using env vars in discriminators
0ab5c37
Merge remote-tracking branch 'upstream/master' into pr-osparc-ooil-es…
96a4167
fixed ytping
806ff14
updated compose spec
d341fdd
mypy
6f7f276
copilot
0e21209
Merge branch 'master' into pr-osparc-ooil-escape-additional-env-vars
mergify[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| from functools import lru_cache | ||
| from typing import Annotated, Any, Union, get_args, get_origin | ||
|
|
||
|
|
||
| @lru_cache | ||
| def get_types_from_annotated_union(annotated_alias: Any) -> tuple[type, ...]: | ||
| """ | ||
| Introspects a complex Annotated alias to extract the base types from its inner Union. | ||
| """ | ||
| if get_origin(annotated_alias) is not Annotated: | ||
| msg = "Expected an Annotated type." | ||
| raise TypeError(msg) | ||
|
|
||
| # Get the contents of Annotated, e.g., (Union[...], Discriminator(...)) | ||
| annotated_args = get_args(annotated_alias) | ||
| union_type = annotated_args[0] | ||
|
|
||
| # The Union can be from typing.Union or the | operator | ||
| if get_origin(union_type) is not Union: | ||
| msg = "Expected a Union inside the Annotated type." | ||
| raise TypeError(msg) | ||
|
|
||
| # Get the members of the Union, e.g., (Annotated[TypeA, ...], Annotated[TypeB, ...]) | ||
| union_members = get_args(union_type) | ||
|
|
||
| extracted_types = [] | ||
| for member in union_members: | ||
| # Each member is also Annotated, so we extract its base type | ||
| if get_origin(member) is Annotated: | ||
| extracted_types.append(get_args(member)[0]) | ||
| else: | ||
| extracted_types.append(member) # Handle non-annotated members in the union | ||
|
|
||
| return tuple(extracted_types) |
This file contains hidden or 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
4 changes: 1 addition & 3 deletions
4
packages/service-integration/src/service_integration/__init__.py
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,3 @@ | ||
| """ Library to facilitate the integration of user services running in osparc-simcore | ||
|
|
||
| """ | ||
| """Library to facilitate the integration of user services running in osparc-simcore""" | ||
|
|
||
| from ._meta import __version__ |
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.