-
Notifications
You must be signed in to change notification settings - Fork 6
ClientConfigBuilder #53
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
Conversation
…ng structure of CCB package
…esolvers, wrappers )
|
The current build is passing, but there is a legacy module which seems to be failing (the polywrap-ccb is the one raising the error) i´m looking into ways to fix this as other tests builds are passing correctly now |
packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config_builder.py
Show resolved
Hide resolved
packages/polywrap-client-config-builder/polywrap_client_config_builder/client_config.py
Show resolved
Hide resolved
| self.config.resolver = uri_resolver | ||
| return self | ||
|
|
||
| class ClientConfigBuilder(BaseClientConfigBuilder): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reason this was left in was that initially the ClientConfigBuilder is the object we call on the JS implementation
When we have defaults configs we can add them to this object for example
So the tests we instantiate
ccb = ClientConfigBuilder,
and not
bccb = BaseClientConfigBuilder.
I understand the BaseCCB is the benchmark functionality a client should have, while ClientConfigBuilder would be particular implementations of that BaseCCB
this also brings up the question on yesterday's call of how to structure the different client configurations.
Let me know if we should remove or rename them it and i'll update the classes and the tests to fit the correct implementation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, so what I would suggest would be the following:
- In the
BaseClientConfigBuilderlet's implement the main methods (basically, all, except forbuild- this will be the only method without implementation) - In the
ClientConfigBuilderwe only implementbuild, inspired on this method from JS client. Note that currently the resolvers are not implemented so you can just return a mock object, let's just focus on the architecture now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for context, currently we have IClientConfigBuilder which is the abstract class, BaseClientConfigBuilder which is the one that implements and ClientConfigBuilder is just there to have the same API. With the suggested changes this will make that IClientConfigBuilder doesn't exists anymore and the BaseClientConfigBuilder will inherit from ABC (meaning that is the abstract class), here, we will implement all methods except build (making them abstract, in case the use that inherit from this class can define custom behavior); and ClientConfigBuilder will only implement build
packages/polywrap-client-config-builder/tests/test_client_config_builder.py
Show resolved
Hide resolved
|
continued in #54 |
The following PR implements the CCB feat with these functions need to be built:
Update 21/11 :
Was able to implement the basic set of features needed to use the config builder,
Although all the tests seem to pass, we are receiving a typecheck error, which can be found here.
https://github.com/polywrap/python-client/actions/runs/3513623139/jobs/5886667818#step:6:31
Update 22/11 : This current set up should be an MVP of the package, ready for a first review