-
Notifications
You must be signed in to change notification settings - Fork 83
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
Support serving multiple libraries by one server #82
base: master
Are you sure you want to change the base?
Conversation
Changes has been made to support serving a list of libraries: robotframework#19
Changes has been made to support serving a list of libraries: robotframework#19
Also updates library property to be plural
14bde04
to
b4dcfd3
Compare
@srinivaschavan this PR supersedes #47 per your request to create a new PR, review feedback is appreciated :) |
@@ -34,4 +34,4 @@ def strings_should_be_equal(self, str1, str2): | |||
|
|||
|
|||
if __name__ == '__main__': | |||
RobotRemoteServer(ExampleLibrary(), *sys.argv[1:]) | |||
RobotRemoteServer([ExampleLibrary()], *sys.argv[1:]) |
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.
Felt it is best to encourage/guide any new users of the remote server to use list in the example to avoid confusion going forward. Let me know if you think we should remove the list from this example.
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.
lgtm
@srinivaschavan, thanks :) I don't have merge permissions, any idea when this can be merged in? |
I do not have the merge permissions either. Maybe we need approval from @pekkaklarck |
Thanks for the PR! On a super quick look it looks good. My plan is to release v1.1.1 now and then early next year look at v1.2 where this could be added. As an APi giving libs to expose as a list sounds good. From Robot's point of view that then creates a single big library with all keywords combined. Another thing I have been thinking is registering different libraries under different paths so that you could use e.g. |
I like the idea of serving under different url paths, though I'm not sure how that would change to the high level *** Settings ***
Library Remote http://localhost:8270/lib1
Library Remote http://localhost:8270/lib2 |
Yes, you needed to take those libraries into use separately. That way you could give them separate aliases when importing using |
In this case it may be ideal to implement a new function In my case I am not directly using the Remote library in .robot files but instead using it internally to another library written in python; so being able to dynamically detect+import all the libraries without user specification is desirable. Perhaps to maintain backward compatibility we could have As for how involved implementing this will be, I'm not certain. |
Summary
Addresses concerns from PR #47 , by
Also updates property from
_library
to_libraries
to improve clarity for reader.