-
Notifications
You must be signed in to change notification settings - Fork 6
Refactor Env and Interfaces from ClientConfig base class #44
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
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
98f13a4
wip: cleaner clientconfig
rihp ba0ca75
wip: error: __wrap_abort: Missing required property: externalArray: U…
rihp 8c19da1
wip: get_env and get_env_from_uri refactor
rihp eb611cc
change in client requires improvement in msgpack
rihp c7fd208
wip: msgpack cannot encode Uris, looking for workaround
rihp fdffa9e
wip
rihp 894e603
typeError: cannot serialize uri object
rihp aea8115
cleaning_code
rihp eab8a16
all_tests_passing
rihp 10b1e20
removing_comments
rihp 954da64
typeckeck_fix_client
rihp 24246d4
core typecheck fixes
rihp 51b77f2
CI_CD_build_fixes
rihp b952ce4
CI_CD_build_fixes
rihp 445994b
Clean_up
rihp eeed4b4
Clean_up
rihp fca83c9
interfaceimplementations refactor!
rihp 9734024
Merge pull request interface implementations refactor from polywrap/r…
rihp a18ada3
cleanup and typechecks
rihp e77ba66
refactor: client and msgpack
Niraj-Kamdar 53ca20d
refactor(client): remove unnecessary code and improve code quality
Niraj-Kamdar 55246d3
refactor(client): use Env alias type
Niraj-Kamdar 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
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,4 @@ | ||
| from .client import * | ||
| from .env import * | ||
| from .file_reader import * | ||
| from .invoke import * | ||
| from .uri import * | ||
|
|
||
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 |
|---|---|---|
| @@ -1,20 +1,3 @@ | ||
| from __future__ import annotations | ||
|
|
||
| from dataclasses import dataclass, field | ||
| from typing import Any, Dict | ||
|
|
||
| from .uri import Uri | ||
|
|
||
|
|
||
| @dataclass(slots=True, kw_only=True) | ||
| class Env: | ||
| """ | ||
| this type can be used to set env for a wrapper in the client | ||
|
|
||
| Args: | ||
| uri: Uri of wrapper | ||
| env: env variables used by the module | ||
| """ | ||
|
|
||
| uri: Uri | ||
| env: Dict[str, Any] = field(default_factory=dict) | ||
| Env = Dict[str, Any] |
12 changes: 0 additions & 12 deletions
12
packages/polywrap-core/polywrap_core/types/interface_implementation.py
This file was deleted.
Oops, something went wrong.
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: 2 additions & 2 deletions
4
packages/polywrap-core/polywrap_core/utils/get_env_from_uri_history.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,10 +1,10 @@ | ||
| from typing import List, Union | ||
| from typing import List, Union, Dict, Any | ||
|
|
||
| from ..types import Client, Env, Uri | ||
|
|
||
|
|
||
| def get_env_from_uri_history( | ||
| uri_history: List[Uri], client: Client | ||
| ) -> Union[Env, None]: | ||
| ) -> Union[Dict[str, Any], None]: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why not use the |
||
| for uri in uri_history: | ||
| return client.get_env_by_uri(uri) | ||
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
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.